-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
buglanguageThe Nix expression language; parser, interpreter, primops, evaluation, etcThe Nix expression language; parser, interpreter, primops, evaluation, etcregressionSomething doesn't work anymoreSomething doesn't work anymore
Description
Describe the bug
The behavior of builtins.dirOf got silently changed in 2.23.
Steps To Reproduce
nix run github:nixos/nix/2.22-maintenance -- eval --expr 'builtins.dirOf "a///b"'
"a//"
nix run github:nixos/nix/2.23-maintenance -- eval --expr 'builtins.dirOf "a///b"'
"a"
It's pretty clear that the >=2.23 behaviour is more "correct" but we don't have the luxury of breaking bug-for-bug compatibility in stable interfaces. Also I think this got changed silently rather than intentionally, because the reason this works like this now is because dirOf started delegating to std::filesystem for this, but since the evaluator must always follow the CanonPath semantics of UNIX paths this isn't correct.
Expected behavior
Bug-for-bug compat is retained. This behavior has existed since forever and should be restored.
Metadata
Not applicable.
Additional context
Checklist
- checked latest Nix manual (source)
- checked open bug issues and pull requests for possible duplicates
Add 👍 to issues you find important.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
buglanguageThe Nix expression language; parser, interpreter, primops, evaluation, etcThe Nix expression language; parser, interpreter, primops, evaluation, etcregressionSomething doesn't work anymoreSomething doesn't work anymore