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

[bazel] Enable bzlmod in hybrid mode #24781

Merged
merged 4 commits into from
Nov 29, 2024
Merged

[bazel] Enable bzlmod in hybrid mode #24781

merged 4 commits into from
Nov 29, 2024

Conversation

jwnrt
Copy link
Contributor

@jwnrt jwnrt commented Oct 14, 2024

This PR enables Bazel's bzlmod feature in hybrid mode. Dependencies are loaded from both WORKSPACE.bzlmod and MODULE.bazel (which is currently empty).

I've had to update rules_python because our current version doesn't work with hybrid mode (fixed in 0.37.0).

See #24365

After this merges, we can begin gradually moving dependencies from WORKSPACE.bzlmod to MODULE.bazel.

@jwnrt jwnrt force-pushed the hybrid-mode branch 11 times, most recently from 8ae38b3 to 6d30992 Compare October 15, 2024 14:58
@jwnrt jwnrt requested a review from pamaury October 15, 2024 14:58
@jwnrt jwnrt changed the title [EXPERIMENT] Enable bzlmod in hybrid mode [bazel] Enable bzlmod in hybrid mode Oct 15, 2024
@jwnrt jwnrt mentioned this pull request Oct 15, 2024
16 tasks
@jwnrt jwnrt marked this pull request as ready for review October 15, 2024 15:23
@jwnrt jwnrt force-pushed the hybrid-mode branch 3 times, most recently from d44d639 to 2001819 Compare November 15, 2024 11:54
@jwnrt jwnrt requested a review from engdoreis November 15, 2024 12:09
@jwnrt jwnrt force-pushed the hybrid-mode branch 2 times, most recently from 19ac6a9 to a652a6e Compare November 21, 2024 13:05
Required for the python toolchain to be registered from `WORKSPACE` when
using Bazel in hybrid mode.

Signed-off-by: James Wainwright <[email protected]>
These are now handled by the `bazel sync` further above. They are
different under bzlmod, so we remove them here.

Signed-off-by: James Wainwright <[email protected]>
This commit adds a `MODULE.bazel` file and enables the bzlmod feature,
but actually continues to use the existing `WORKSPACE` dependency
management by moving to `WORKSPACE.bzlmod`.

Dependencies can be gradually migrated from `WORKSPACE` to
`MODULE.bazel`.

Signed-off-by: James Wainwright <[email protected]>
Bazel seems to need these when Bzlmod is enabled.

Signed-off-by: James Wainwright <[email protected]>
@jwnrt
Copy link
Contributor Author

jwnrt commented Nov 29, 2024

The RFC was approved, I'm going to merge

@jwnrt jwnrt merged commit 0657f7d into lowRISC:master Nov 29, 2024
40 checks passed
@jwnrt jwnrt deleted the hybrid-mode branch November 29, 2024 10:42
@jwnrt jwnrt added the CherryPick:earlgrey_1.0.0 This PR should be cherry-picked to earlgrey_1.0.0 label Dec 11, 2024
Copy link

Backport failed for earlgrey_1.0.0, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin earlgrey_1.0.0
git worktree add -d .worktree/backport-24781-to-earlgrey_1.0.0 origin/earlgrey_1.0.0
cd .worktree/backport-24781-to-earlgrey_1.0.0
git switch --create backport-24781-to-earlgrey_1.0.0
git cherry-pick -x 38438293e136f99deae2d13d5012b3eec792883c d29961818c5c5683e60e7312a3624471ca39b864 1035a33250c782a9b6619aaab8a5d836ceec2b41 8520242713815cda0b5cd060ea7d6c3c5a9952cf

@github-actions github-actions bot added the Manually CherryPick This PR should be manually cherry picked. label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CherryPick:earlgrey_1.0.0 This PR should be cherry-picked to earlgrey_1.0.0 Manually CherryPick This PR should be manually cherry picked.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants