-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flake inputs cannot follow "self" #4931
Comments
This is a valid improvement. I see two use cases: PluginThis situation occurs when flake
Here MegarepoAnother use case is "megarepos": repositories that define multiple related packages. Here the repo boundary is usually the same as the (human) organizational boundary. Sometimes a "high-level" package in the megarepo will depend on an external package that in turn depends on a "low-level" package that is in the same megarepo. |
This will require a little more thought I think, because this is technically a circular reference. When a flake's input is being locked, it requires a reference to said input in the store; and that must be a locked reference. So you can't actually pass the current flake |
This comment has been minimized.
This comment has been minimized.
This isn't the case. If you look at So all recursion happens in the Nix language, which is lazy, so we have no problem tying the recursive knot. |
Hmm, you make a good point. I'll investigate this a bit further. |
I marked this as stale due to inactivity. → More info |
Not stale. |
This is actually possible (there’s even an example in the manual, although it’s not entirely obvious) using an empty string ( or |
@thufschmitt Empty path means this flake? Whoa. That is... not how paths usually work, but I guess there is no real reason to reject that, either. What about keeping that interpretation but also making “self” components no-ops, like “.” components in filesystem paths? |
Given that
The empty string works sort of by accident, so maybe we should disallow it. Note however that following the root flake currently does not work in pure mode since it's not locked in the lock file. So you'll get an error like:
|
Just my 2cts as to the design of the bikeshed: (But I don’t have a strong opinion on that either, as long as it’s clearly documented) |
I guess this was closed because the answer is “use However, I got here because I was wondering how you can do something like A likely response is “that is a bad idea – don’t do that,” which I’m on board with, but flakes still make it happen by using tl;dr So, I think using Footnotes
|
Imagine I wanted to ship a remote flake that depends on my local flake as part of my local flake ("engulfing").
With this bug present, I cant do that in flake interface land.
It is a legal operation.
The text was updated successfully, but these errors were encountered: