-
-
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
Store::getFSAccessor
: Do not include the store dir
#12531
base: master
Are you sure you want to change the base?
Conversation
@@ -21,7 +21,7 @@ nix shell -f shell-hello.nix 'hello^*' -c hello2 | grep 'Hello2' | |||
nix shell -f shell-hello.nix hello-symlink -c hello | grep 'Hello World' | |||
|
|||
# Test that symlinks outside of the store don't work. | |||
expect 1 nix shell -f shell-hello.nix forbidden-symlink -c hello 2>&1 | grepQuiet "is not in the Nix store" | |||
expect 1 nix shell -f shell-hello.nix forbidden-symlink -c hello 2>&1 | grepQuiet "points outside source accessor" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
N.B. error message is quite arguably worse.
On the other hand, this error message should be something that can occur in other contexts for other reasons (e.g. symlinks escaping fetch-tree'd source), in which case having the same message to show the commonality is good.
The fullt expanded messages has all the relevant paths, so the user will still see /nix/store
.
e98041b
to
ca13970
Compare
ca13970
to
ac1b340
Compare
There was one `inputs.nixFmt` left after 573ffac.
Rather than "mounting" the store inside an empty virtual filesystem, just return the store as a virtual filesystem. This is more modular. (FWIW, it also supports two long term hopes of mind: 1. More capability-based Nix language mode. I dream of a "super pure eval" where you can only use relative path literals (See NixOS#8738), and any `fetchTree`-fetched stuff + the store are all disjoint (none is mounted in another) file systems. 2. Windows, where the store dir may include drive letters, etc., and is thus unsuitable to be the prefix of any `CanonPath`s. )
ac1b340
to
c811b33
Compare
Motivation
Rather than "mounting" the store inside an empty virtual filesystem,
just return the store as a virtual filesystem. This is more modular.
Context
FWIW, it also supports two long term hopes of mind:
More capability-based Nix language mode. I dream of a "super pure
eval" where you can only use relative path literals (See
no-absolute-path-literals
experimental feature #8738), andany
fetchTree
-fetched stuff + the store are all disjoint (none ismounted in another) file systems.
Windows, where the store dir may include drive letters, etc., and is
thus unsuitable to be the prefix of any
CanonPath
s.Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.