[Nix#8530] throwing/asserting in tryEval has exponential complexity after evaluating certain values #137
Labels
No labels
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/store
bug
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#137
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Upstream-Issue: NixOS/nix#8530
Describe the bug
Under the same conditions:
builtins.throw ""
worksbuiltins.throw x
hangsbuiltins.trace x (builtins.throw "")
worksbuiltins.seq x (builtins.throw "")
hangsbuiltins.seq x (builtins.trace "a" builtins.throw "")
prints "a" and hangsassert false; x
worksbuiltins.seq x (assert false; x)
hangsI tried on Nix 2.10, 2.11, 2.12, 2.14, 2.15 and could reproduce on all of them
Steps To Reproduce
nix flake check
debugThrow
function indefault.nix
as neededExpected behavior
It never hangs.
nix-env --version
outputnix-env (Nix) 2.15.1
Additional context
I encountered this in the wild while working with Nix, I'll try to make a smaller example and will update this issue.
edit: I tried stripping some things down, and now it simply takes a long time to execute... perhaps this is a case of exponential complexity
Priorities
Add 👍 to issues you find important.