Skip to content
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

test precedence for setting the search path #9066

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fricklerhandwerk
Copy link
Contributor

@fricklerhandwerk fricklerhandwerk commented Sep 29, 2023

this is just to show the principle for now.
the test cases are incomplete and way too manual.
the complete specification should follow this table, and the tests ideally be generated from that automatically:

precedence hard-coded nix.conf: nix-path nix.conf: extra-nix-path NIX_CONFIG: nix-path NIX_CONFIG: extra-nix-path NIX_PATH --nix-path --extra-nix-path -I
hard-coded x ^override ^append ^override ^append ^override ^override ^append ^append
nix.conf: nix-path last wins ^append ^override ^append ^override ^override ^append ^append
nix.conf: extra-nix-path append in order ^override ^append ^override ^override ^append ^append
NIX_CONFIG: nix-path last wins ^append ^override ^override ^append ^append
NIX_CONFIG: extra-nix-path append in order ^override ^override ^append ^append
NIX_PATH x ^override ^append ^append
--nix-path last wins ^append ^append
--extra-nix-path append in order append in order
-I append in order

Motivation

The current behavior being inconsistent and surprising (#8890 #8784) has spawned multiple competing and conflicting attempts of fixing it:

Context

developed together with @thufschmitt

this should also resolve the confusion around behavior of restrict-eval, as that is supposed to only allow explicitly defined search paths.

Priorities

Add 👍 to pull requests you find important.

@github-actions github-actions bot added the with-tests Issues related to testing. PRs with tests have some priority label Sep 29, 2023
this is just to show the principle. the test cases are incomplete and
way too manual.
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2023-11-13-nix-team-meeting-minutes-103/35400/1

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-path-is-not-recognized/38404/6

@NixOS NixOS deleted a comment from nixos-discourse Jan 18, 2024
@fricklerhandwerk
Copy link
Contributor Author

Note: Update documentation accordingly once this is fixed https://github.com/NixOS/nix/pull/9113/files#r1487801059

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2024-05-06-nix-team-meeting-minutes-143/45021/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
with-tests Issues related to testing. PRs with tests have some priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants