docs: use .bazelversion for tutorial Bazel project #2312
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
bazelisk
is the recommended launcher for Bazel and is likely to be used by default by many users.If a
.bazelversion
file exists in the current directory or recursively any parent directory, it will read the file and use the version specified in it (see the bazelisk docs). However, thetutorial
directory is a workspace on it's own so it defaults to the official latest Bazel release.Based on my tests
console output
the
tutorial
project is not compatible with the latest Bazel version, so I believe it would be a reasonable precaution to match the supported version to what we have for the actual rules workspace. If the tutorial reader doesn't use bazelisk, they would at least get an indication of the compatible version so that they can ensure they are using the right version.A follow-up work would be modernize the codebase to build it using a more modern Bazel version, if desired.