fix(engine): always remove write permissions from generated files - #16388
Merged
Merged
Conversation
Record writable legacy outputs without caching and read-only outputs on shared-cache misses and hits in copy and hardlink modes. Check all write bits and preserve executable bits. Validation: targeted cram test and dune fmt pass. The full @check @fmt @runtest check is blocked by existing bubblewrap uid-map permission errors in sandbox-actions/basic.t and with-bwrap.t. Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
rgrinberg
force-pushed
the
push-knxlvmvqnwyt
branch
2 times, most recently
from
September 13, 2026 08:26
c8ebc84 to
e52dc9c
Compare
Remove the execution-parameter flag and the pre-2.4 language-version opt-out. Older dune-project declarations remain accepted, but no longer leave generated files writable. Preserve executable permissions and existing symlink handling. Bump the rule digest version to rebuild previously writable targets. Update the legacy dependency-mutation tests and document the unconditional behavior. Validation: @check, @fmt, and focused engine, cache, directory-target, sandbox, and dependency-mutation tests pass. The full @check @fmt @runtest check has only the same baseline bubblewrap uid-map permission failures in sandbox-actions/basic.t and with-bwrap.t. Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
rgrinberg
force-pushed
the
push-knxlvmvqnwyt
branch
from
September 13, 2026 09:10
e52dc9c to
e048394
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.
Remove the pre-2.4 language-version opt-out for generated-file permissions. Older dune-project declarations remain accepted, but generated files are always made read-only, with executable bits preserved. This makes builds consistent with the shared cache in both copy and hardlink modes.
This is a breaking change, but there's no reasonable way to support this mode with the hard link based shared cache, and we'd like projects pre-2.4 to not work differently based on whether the cache is enabled or not.