-
Notifications
You must be signed in to change notification settings - Fork 6
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
[tools] Finish porting to bzlmod #108
Conversation
+@zachfang for review, please? FYI @rpoyner-tri |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will catch up on bzlmod a bit.
Reviewed 9 of 9 files at r1.
Reviewable status: 1 unresolved discussion (waiting on @jwnimmer-tri)
tools/upgrade_helper.py
line 48 at r1 (raw file):
"""Overwrites ``.bazelversion`` with the new version of bazel.""" with open(".bazelversion", "w", encoding="utf-8") as f: f.write(f"{new}\n")
nit. I assume these two functions can be removed as well as they are only called by _upgrade_bazel()
.
Code quote:
def _get_current_bazel_version() -> str:
"""Parses ``.bazelversion`` for the old version of bazel."""
with open(".bazelversion", encoding="utf-8") as f:
lines = f.read().splitlines()
(line,) = lines
return line.strip()
def _write_bazel_version(new):
"""Overwrites ``.bazelversion`` with the new version of bazel."""
with open(".bazelversion", "w", encoding="utf-8") as f:
f.write(f"{new}\n")
Specifically, respell the "download buildifier release binaries from github" into something bzlmod is happy with. While we're here, also remove custom upgrade scripting for `bazel`. Dependabot handles that upgrade automation for us now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all discussions resolved, LGTM from assignee zachfang (waiting on @zachfang)
tools/upgrade_helper.py
line 48 at r1 (raw file):
Previously, zachfang wrote…
nit. I assume these two functions can be removed as well as they are only called by
_upgrade_bazel()
.
Right! Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2.
Reviewable status: complete! all discussions resolved, LGTM from assignee zachfang (waiting on @jwnimmer-tri)
Specifically, respell the "download buildifier release binaries from github" into something bzlmod is happy with.
While we're here, also remove custom upgrade scripting for
bazel
. Dependabot handles that upgrade automation for us now (see e.g. #100).This change is