Fix invalid store paths making it into the store #327
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#327
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?
When running
builtins.toFile "hi.drv" "meow"
the code errors, but also leaves behind the store path that it wrote to unregistered. We should make it impossible to represent these kinds of situations, and use this to remove the entirerequireValidPath
logic, which (afaict) is the only use of this edge case.Is this also cursed with nix-store --add?
sure is!
hahahahahaha lmao
i noticed this when taking someone's .drv file for another repro and finding that it has the wrong store path compared to if it were instantiated by nix code.
i would like to be able to load .drvs into the store, but the current behaviour is just busted.
it can; it just needs the right references passed in too.
should
nix-store --add
on a .drv file then actually set the references properly? why aren't they set properly in the status quo?it should be possible to pass in a list of desired references, maybe?
nix-store --add
by default doesn't set any references. but this requires a bit better API design to make it work nicely (and not break because you're trying to add non-text references to a text store path)are these not enumerated in the .drv file itself? That's what I mean, I guess: a .drv has one canonical path right?
.drv files are stored in the store as identical to
builtins.toFile
paths, and i'm .. not sure it strictly checks whether the references in the store path match up the references inside the.drv
? but this could be entirely wrong.