Skip to content

test precedence for setting the search path#9066

Draft
fricklerhandwerk wants to merge 1 commit intoNixOS:masterfrom
fricklerhandwerk:nix-path-tests
Draft

test precedence for setting the search path#9066
fricklerhandwerk wants to merge 1 commit intoNixOS:masterfrom
fricklerhandwerk:nix-path-tests

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

@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