Skip to content

Update to Go 1.24, restrict file writes to the specified output directory for --multi#850

Merged
johnbartholomew merged 4 commits into
google:masterfrom
johnbartholomew:restrict-writes
Feb 18, 2026
Merged

Update to Go 1.24, restrict file writes to the specified output directory for --multi#850
johnbartholomew merged 4 commits into
google:masterfrom
johnbartholomew:restrict-writes

Conversation

@johnbartholomew
Copy link
Copy Markdown
Collaborator

Restricting file writes, for #527.

This relies on the os.Root functionality that was added to the Go standard library in 1.24: https://go.dev/doc/go1.24#directory-limited-filesystem-access

Also 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)

@coveralls
Copy link
Copy Markdown

coveralls commented Feb 18, 2026

Coverage Status

coverage: 44.131% (-0.2%) from 44.282%
when pulling acd4ea2 on johnbartholomew:restrict-writes
into fb23cdf on google:master.

@johnbartholomew johnbartholomew force-pushed the restrict-writes branch 2 times, most recently from e5a0d60 to 98c4814 Compare February 18, 2026 22:45
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.
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