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

Add use_repo_add and use_repo_remove commands #1152

Merged
merged 4 commits into from
Apr 12, 2023

Conversation

fmeum
Copy link
Contributor

@fmeum fmeum commented Mar 30, 2023

These commands can be used to programmatically update use_repo calls in MODULE.bazel files. In the future, Bazel will emit buildozer fixups relying on this command when it detects that such calls are out-of-date.

Fixes #1149
Work towards bazelbuild/bazel#17908

@fmeum fmeum marked this pull request as ready for review March 30, 2023 09:18
@fmeum
Copy link
Contributor Author

fmeum commented Mar 30, 2023

@Wyverald Could you review for the Bzlmod aspects?

@fmeum fmeum force-pushed the use_repo branch 2 times, most recently from 6c8bede to 7db5b82 Compare March 30, 2023 09:21
edit/bzlmod/bzlmod.go Outdated Show resolved Hide resolved
@fmeum
Copy link
Contributor Author

fmeum commented Mar 30, 2023

This is soft-blocked on #1150 as otherwise the //MODULE.bazel:__pkg__ target syntax is broken.

These commands can be used to programmatically update `use_repo` calls
in MODULE.bazel files. In the future, Bazel will emit buildozer fixups
relying on this command when it detects that such calls are out-of-date.
@fmeum
Copy link
Contributor Author

fmeum commented Apr 1, 2023

@fmeum
Copy link
Contributor Author

fmeum commented Apr 12, 2023

@vladmos Are you available to review this PR?

@vladmos
Copy link
Member

vladmos commented Apr 12, 2023

Sorry, I was conducting a large scale change because of some incompatible changes of formatting rules and temporarily put all other PRs on hold. LGTM

@vladmos vladmos merged commit a3f457d into bazelbuild:master Apr 12, 2023
@fmeum fmeum deleted the use_repo branch April 12, 2023 14:02
apattidb pushed a commit to databricks/buildtools that referenced this pull request May 10, 2024
* Preserve compactness of `use_repo` and `use_extension` calls

* Add `use_repo_add` and `use_repo_remove` commands

These commands can be used to programmatically update `use_repo` calls
in MODULE.bazel files. In the future, Bazel will emit buildozer fixups
relying on this command when it detects that such calls are out-of-date.

* Adapt label normalization to be closer to upstream

* Fix CI
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.

Proposal: Add command that manages use_repo calls
3 participants