Describe the bug
#5385 added the dirtyRev attribute, which is rejected by Nix versions < 2.16.
A similar situation will arise whenever previously unknown attributes are added to the lock.
On the one hand this error seems redundant because of narHash. However, it may be unclear how the attributes should be treated.
Steps To Reproduce
- Lock a dirty input with Nix 2.17
- Evaluate again with Nix <= 2.16
error: unsupported Git input attribute 'dirtyRev'
Expected behavior
dirtyRev and the other attribute are just ignore? Not sure.
nix-env --version output
Additional context
Maybe it should be breaking because of
This is unfortunate.
Should the lock file have an field that's open for extension? For metadata that must not affect the value of the fetched file system objects, but is added to the returned attributes.
This might be a flake level thing instead of a fetcher level thing, although libfetchers is responsible for getting that metadata. Maybe in-between? libfetchers provides a meta attr in which such attributes are nested. So not a flake thing after all, but still something that's easily discerned by the libfetchers user.
Of course in some cases breaking is the only sensible thing to do, though it will require everyone to upgrade their Nix.
Priorities
Add 👍 to issues you find important.
Describe the bug
#5385 added the
dirtyRevattribute, which is rejected by Nix versions < 2.16.A similar situation will arise whenever previously unknown attributes are added to the lock.
On the one hand this error seems redundant because of
narHash. However, it may be unclear how the attributes should be treated.Steps To Reproduce
error: unsupported Git input attribute 'dirtyRev'Expected behavior
dirtyRevand the other attribute are just ignore? Not sure.nix-env --versionoutputAdditional context
Maybe it should be breaking because of
This is unfortunate.
Should the lock file have an field that's open for extension? For metadata that must not affect the value of the fetched file system objects, but is added to the returned attributes.
This might be a flake level thing instead of a fetcher level thing, although libfetchers is responsible for getting that metadata. Maybe in-between? libfetchers provides a
metaattr in which such attributes are nested. So not a flake thing after all, but still something that's easily discerned by the libfetchers user.Of course in some cases breaking is the only sensible thing to do, though it will require everyone to upgrade their Nix.
Priorities
Add 👍 to issues you find important.