Update to Go 1.24, restrict file writes to the specified output directory for --multi#850
Merged
johnbartholomew merged 4 commits intogoogle:masterfrom Feb 18, 2026
Merged
Conversation
02639f1 to
35c3e5f
Compare
e5a0d60 to
98c4814
Compare
98c4814 to
a3ea08a
Compare
This brings things more into line with modern conventions for build target names, and means we have fewer sources of truth for the minimum Go version that's needed.
a3ea08a to
acd4ea2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Restricting file writes, for #527.
This relies on the
os.Rootfunctionality that was added to the Go standard library in 1.24: https://go.dev/doc/go1.24#directory-limited-filesystem-accessAlso it needs a few helper functions that can be removed once we update again to Go 1.25, which adds
Root.ReadFile,Root.WriteFile,Root.MkdirAll.Bumping the Go version requirement is actually a bit annoying, I'm not sure I've updated everything correctly (every time I have to touch Gazelle and the Bazel Go rules I have to re-learn how they work)