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

Switch from bazeliskrc to bazelversion #4612

Merged
merged 5 commits into from
Dec 3, 2024

Conversation

jonmeow
Copy link
Contributor

@jonmeow jonmeow commented Dec 2, 2024

The only documentation I can find for .bazelversion is in https://github.com/bazelbuild/bazelisk/blob/master/README.md. However, bazel will error out if it doesn't match the .bazelversion. For example:

╚╡/usr/bin/bazel build :all
ERROR: The project you're trying to build requires Bazel 7.3.0 (specified in [elided]/carbon-lang/.bazelversion), but it wasn't found in /usr/bin.

Switching to this because the MODULE.bazel requires tighter version pinning in order to avoid churn, and this should help catch mistakes early.

In MODULE.bazel, demote mention of the version issue because it should only really occur now when the version is being deliberately changed, so the connection should be more apparent.

Copy link
Contributor

@chandlerc chandlerc left a comment

Choose a reason for hiding this comment

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

Nice, does seem to be a much nicer flow here. And as you say, with module files, it's an important constraint.

I'm nervous about the complete lack of docs, but it seems to be intended to be supported and there is a 4 year old bug to document it: bazelbuild/bazel#11264

Not sure if you want to link that anywhere, but generally LG.

@jonmeow
Copy link
Contributor Author

jonmeow commented Dec 3, 2024

I can't put any comments in the file or it doesn't work. Other than that, I couldn't think of a really good spot to put documents, and it hadn't seemed hard enough to figure out (put differently, I think the current documentation is pretty similar to the .bazeliskrc, I was mainly commenting for the PR).

@jonmeow jonmeow added this pull request to the merge queue Dec 3, 2024
@jonmeow
Copy link
Contributor Author

jonmeow commented Dec 3, 2024

Note, part of my thought is that bazelversion nuance feels a little more detailed "how the infrastructure works" than what's currently in contribution tools, which is more "here's how to get set up".

Merged via the queue into carbon-language:trunk with commit 0c2ed1b Dec 3, 2024
8 checks passed
@jonmeow jonmeow deleted the bazelversion branch December 3, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants