Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update bzlmod files for first publish #787

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

luispadron
Copy link
Collaborator

Copy link

@fmeum fmeum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks okay assuming that building everything doesn't require dev dependencies: They will not be available in the BCR test setup which works by creating a synthetic empty module depending on your root module - your module won't be the root module.

@luispadron
Copy link
Collaborator Author

This looks okay assuming that building everything doesn't require dev dependencies: They will not be available in the BCR test setup which works by creating a synthetic empty module depending on your root module - your module won't be the root module.

Makes sense, so i'll make this more strict to just build //rules since some other things require dev dependencies.

@luispadron luispadron force-pushed the luis/update-presubmit-for-bzlmod branch from 8623d2b to 95dfb84 Compare October 24, 2023 15:08
@luispadron
Copy link
Collaborator Author

Noticing some more changes I need to make to MODULE.bazel, testing with path override. Will update this PR.

@luispadron luispadron force-pushed the luis/update-presubmit-for-bzlmod branch from 95dfb84 to 8addeff Compare October 24, 2023 15:33
@luispadron
Copy link
Collaborator Author

Had to make two changes:

  • Mark bazel_skylib as a non-dev dependency, this is loaded by our rules so it cant be development only.
  • Move the buildifier target from //:BUILD.bazel to //tools:BUILD.bazel, this allows us to move the load out of the rules path and allows us to keep buildifier as a dev depenedency
    • I added an alias so you can still do bazel run //:buildifier

With these changes, I get a green build depending on rules_ios from another bzlmod module:

bazel build @rules_ios//rules/...        
                                                                                                     
INFO: Analyzed 67 targets (134 packages loaded, 17858 targets configured).
INFO: Found 67 targets...
INFO: From Linking external/rules_ios~override/rules/hmap/hmaptest:
ld: warning: ignoring duplicate libraries: '-lc++'
INFO: From Linking external/rules_ios~override/rules/hmap/hmaptool:
ld: warning: ignoring duplicate libraries: '-lc++'
INFO: From Linking external/rules_ios~override/rules/hmap/hmapdump:
ld: warning: ignoring duplicate libraries: '-lc++'
INFO: Elapsed time: 28.322s, Critical Path: 7.12s
INFO: 442 processes: 257 internal, 142 darwin-sandbox, 43 local.
INFO: Build completed successfully, 442 total actions

@luispadron luispadron changed the title Update presubmit.yml for bzlmod Update bzlmod files for first publish Oct 24, 2023
@luispadron luispadron enabled auto-merge (squash) October 24, 2023 16:06
@luispadron luispadron enabled auto-merge (squash) October 24, 2023 16:07
@luispadron luispadron merged commit 0d27ebd into master Oct 24, 2023
9 checks passed
@luispadron luispadron deleted the luis/update-presubmit-for-bzlmod branch October 24, 2023 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants