Lockless flakes are missing a bunch of metadata #71
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/flake-compat#71
Loading…
Add table
Add a link
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?
This is pretty easy to fix, but it is deep in yakshave territory. I found it while writing a test.
Genuine flake:
Ersatz flake:
Cause:
This stuff needs to be extracted to a function:
result =outputs# We add the sourceInfo attribute for its metadata, as they are# relevant metadata for the flake. However, the outPath of the# sourceInfo does not necessarily match the outPath of the flake,# as the flake may be in a subdirectory of a source.# This is shadowed in the next //// sourceInfo// {# This shadows the sourceInfo.outPathinherit outPath;inherit inputs;inherit outputs;inherit sourceInfo;_type = "flake";This stuff needs to be updated to use it:
callLocklessFlake =flakeSrc:letflake = import (flakeSrc + "/flake.nix");outputs = flakeSrc // (flake.outputs ({ self = outputs; }));inoutputs;Came across this since it causes
lixto fail to build when using thelix-module(lixuses thelastModifiedDateto create its version when it is not an official release):erm. why don't you have a lock file? this bug is about when you have a flake with no inputs at all and it's busted.
i do believe there's a bug you're seeing there but I'm not sure it's the same bug!
Fun! Because the
flake.lockis there (usingchecksto runtreefmtworks fine)I don't think this is the same bug then; please consider writing a reproducer and filing a separate bug; or feel free to try out fixing it and writing a test. We can try to do our best to help out with any difficulties in doing it.