[Nix#8720] builtins.fetchurl
does not try to refetch changed contents of file://
URI's #131
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#131
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Upstream-Issue: NixOS/nix#8720
Describe the bug
Once
builtins.fetchurl
fetched afile://
URI, it seems to assume it never changes and does not try to rehash it. After changing the file and clearing the hash, the hash of the old file is given in the hash mismatch error, not the one of the changed file.This work is sponsored by Antithesis ✨
Steps To Reproduce
Create a file and fetch it with
fetchurl
:Change the contents of the file and try to fetch it with
fetchurl
again:Notice how it errors, saying to use the hash of the previous contents of the file.
Workarounds
We can work around this by removing the old store path:
Notice how the import of the new file works now.
Another workaround is to add a dummy URI parameter and remove it again:
And another workaround is to change the name of the store path:
I suspect some overly ambitious URI caching is going on somewhere.
Expected behavior
No workaround should be required, it should just work.
nix-env --version
outputnix-env (Nix) 2.15.1
Priorities
Add 👍 to issues you find important.