-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add pure-storepath-builtin experimental feature #12141
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
base: master
Are you sure you want to change the base?
Conversation
af76797
to
56b63e2
Compare
Heh, I would support this. It is sort of "unsure whether to stabilize as de facto stability 2nd time as farce", but shrug. |
56b63e2
to
7d6fdb9
Compare
It feels more like a preference to me, which feels comparable to This seems to be consistent with the lack of a milestone. I think an experiment should be set up to have some sort of outcome, but it seems that in this case it comes down to personal preferences and or the requirements of individual projects. If we were to make this an individual setting instead, I believe this would have the following benefits over an experimental feature flag:
Perhaps worth noting about the disabled setting
@Ericson2314 @Pandapip1 wdyt? |
The plan would be that this would be removed.
I really hope this does not become a permanent setting because otherwise this is something that people have to build around, and that seems bad. This is pretty explicitly something that will only exist while there remains debate about the storePath built-in. Eventually, either it will become pure or impure.
I'm not entirely convinced this is an upside, but I'm also not entirely convinced it's a downside either.
While this is true, I can't imagine that people would not just have this configured as a global setting. I do not have particularly strong opinions about whether or not it should be a setting or an experimental feature, and I'll just go with whichever result seems to reflect the popular opinion to get this merged faster. |
If we're ok to accept the feature when no significant issues are found during the experiment, then indeed that could be a better outcome than a setting. |
I feel an experiment wouldn't reveal anything that we don't already know. The issue with IMHO a setting ( |
Content addressed store paths are neither
I don't think we should further dilute the term. How about something like
Still not sure about |
Another potential user here. Pinging the thread since it has been a few months. Click to expand use case (to avoid polluting the thread)An immediate use I have of this is to put a copy of the nixpkgs sources into a machine image, which at the moment is quite painful. I feel I should be able to put `pkgs.path` into the `storePaths` of my image, but this results in an extra copy of the sources floating around at a strange path (`/nix/store/hash1-hash2-source`). `fetchClosure` doesn't quite work right currently as well; it makes a distinction between inputAddressed or not, and somehow the sources once copied to the image (and registered via a closureInfo registration and --load-db) end up incorrectly marked as inputAddressed [0]. I haven't come across a compelling argument there shouldn't be a straightforward way of getting a hold of this path if you want it.[0] The consequence of which is that you can't write a fetchClosure expression which works both when built on the machine image built using it and on a machine that fetched the sources, since they differ in |
Technically that's In the case of EDIT: it's a large space of possible environments (in the store, not in the store)×(non-flakes, flakes), and solutions (path is a path value, path is a string, path is |
Motivation
No consensus has been found as to whether
storePath
should be considered pure or impure. As such, an experimental feature should be added to allow those that consider the function pure to use it as such.Context
See #5868.
Heads up: This is my first code change to nix; it's likely I missed something from the contributing document (even though I did read through it), and I couldn't find any documentation about the process of adding an experimental feature in the repo (I was on an airplane with no internet and am just now submitting the PR).
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.