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

[tools] Finish porting to bzlmod #108

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

jwnimmer-tri
Copy link
Contributor

@jwnimmer-tri jwnimmer-tri commented Dec 9, 2024

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 Reviewable

@jwnimmer-tri
Copy link
Contributor Author

+@zachfang for review, please?

FYI @rpoyner-tri

Copy link
Contributor

@zachfang zachfang left a comment

Choose a reason for hiding this comment

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

:lgtm: 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.
Copy link
Contributor Author

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: 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.

Copy link
Contributor

@zachfang zachfang left a 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: :shipit: complete! all discussions resolved, LGTM from assignee zachfang (waiting on @jwnimmer-tri)

@jwnimmer-tri jwnimmer-tri merged commit ba0e90a into RobotLocomotion:main Dec 10, 2024
2 checks passed
@jwnimmer-tri jwnimmer-tri deleted the bzlmod branch December 10, 2024 15:03
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.

2 participants