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

[7.2.0] Make bazel mod tidy work with include() #22540

Merged
merged 1 commit into from
May 24, 2024

Conversation

Wyverald
Copy link
Member

We now generate fixup commands targeting include()d segments in addition to the root MODULE.bazel file itself. Fixup commands are grouped by file, and then passed to Buildozer using -f - (i.e. multiple commands for multiple files, passed in using stdin).

  • For repos to add, we find the first usage with the correct prod/dev type and add them there.
  • For repos to remove, we remove them from whichever usage had them.
  • At the end, all module files and included segments are formatted.

Fixes #22063

Closes #22455.

PiperOrigin-RevId: 636680730
Change-Id: Id894a449d8d1cdf39271ea3a724a91aebc51befb

We now generate fixup commands targeting `include()`d segments in addition to the root MODULE.bazel file itself. Fixup commands are grouped by file, and then passed to Buildozer using `-f -` (i.e. multiple commands for multiple files, passed in using stdin).

- For repos to add, we find the first usage with the correct prod/dev type and add them there.
- For repos to remove, we remove them from whichever usage had them.
- At the end, all module files and included segments are formatted.

Fixes #22063

Closes #22455.

PiperOrigin-RevId: 636680730
Change-Id: Id894a449d8d1cdf39271ea3a724a91aebc51befb
@Wyverald Wyverald requested a review from a team as a code owner May 24, 2024 22:05
@github-actions github-actions bot added awaiting-review PR is awaiting review from an assigned reviewer team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. labels May 24, 2024
@Wyverald
Copy link
Member Author

I couldn't get #22527 to rebase on top of the latest commit, so sending this one instead. Let's see if this is actually fixed by b3f5c62!

@Wyverald Wyverald enabled auto-merge May 24, 2024 22:17
@keertk keertk self-requested a review May 24, 2024 23:07
@Wyverald Wyverald added this pull request to the merge queue May 24, 2024
Merged via the queue into release-7.2.0 with commit 3b6069d May 24, 2024
35 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label May 24, 2024
@Wyverald Wyverald deleted the wyv-720-c902fbd branch May 28, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants