builtins.getFlake
accepts git+file:/home/...
AND git+file:///home/...
with different semantics #200
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#200
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?
git+file:
gets the latest commit andgit+file://
gets the changes in the working tree. What the hell.Please test this on upstream unstable and report if the same behavior happens; I noticed these seemed to possibly change behavior on later versions and want to decide an approach to take.
Also note that in certain contexts
git+file:.
and"git+file://" + (toString ./.)
also work, so it'd be interesting to see how they compareThis was found on Nix 2.21 according to wiggles (here with me).
This was recently reported again in Lix Matrix: https://matrix.to/#/!9IQChSjwSHXPPWTa:lix.systems/$QbdSBiz-aDQOBKeRkNoJTNn7n69mP8Q-Kk9Yg-kt-rY?via=lix.systems&via=matrix.org&via=catgirl.cloud
I checked CppNix 2.18 manual and apparently, it is documented behavior: https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-flake#types
git+file
in general seems very cursed, it has different lockfile fields, for example. And this line scares me:This is the behavior that you get when you clone a flake Git repo (e.g. Nixpkgs) and change something in its tree. I fear that the "root" flake (which is a confusing name) implicitly uses
git+file
without recording the data in the lockfile. This probably explains the god awful "file is not found" error message when you don't stage the changes in git worktree. That sounds like an awful lot of spaghetti to untangle, so it's probably best to not touch it until we are fully ready.