Describe the bug
A flake input that is path:/some/absolute/path treats path as the root of an otherwise disconnected file hierarchy, e.g. by copying it to the store, or as a SourceAccessor.
A flake input that is path:./relative does not. It is just a reference to a flake.nix that does not affect the flake's sourceInfo.outPath and does not forbid relative/flake.nix to access files in relative/...
Steps To Reproduce
Expected behavior
All path: inputs behave the same. Either all cut out the parent, or all allow access to the parent.
Both options are feasible.
Option A: Cut away from the parent
- Deprecate
path:./relative inputs.
- Wait
- Start isolating their file access
May postpone stabilization
Option B: YOLO absolute paths
If users use absolute paths, they're already in some pretty hard to reproduce territory.
Maybe it isn't all that wrong to allow access to the file system.
Does not even defeat caching if you have a tracing cache, but it is entirely unhermetic.
Compatible with earlier stabilization
Option C: Keep the quirk
Users and Nix maintainers will have to live with the extended learning curve and burden.
Compatible with earlier stabilization
Metadata
Additional context
- Discovered through STF project
Checklist
Add 👍 to issues you find important.
Describe the bug
A flake input that is
path:/some/absolute/pathtreatspathas the root of an otherwise disconnected file hierarchy, e.g. by copying it to the store, or as aSourceAccessor.A flake input that is
path:./relativedoes not. It is just a reference to aflake.nixthat does not affect the flake'ssourceInfo.outPathand does not forbidrelative/flake.nixto access files inrelative/...Steps To Reproduce
Expected behavior
All
path:inputs behave the same. Either all cut out the parent, or all allow access to the parent.Both options are feasible.
Option A: Cut away from the parent
path:./relativeinputs.May postpone stabilization
Option B: YOLO absolute paths
If users use absolute paths, they're already in some pretty hard to reproduce territory.
Maybe it isn't all that wrong to allow access to the file system.
Does not even defeat caching if you have a tracing cache, but it is entirely unhermetic.
Compatible with earlier stabilization
Option C: Keep the quirk
Users and Nix maintainers will have to live with the extended learning curve and burden.
Compatible with earlier stabilization
Metadata
Additional context
Checklist
Add 👍 to issues you find important.