Infinitely recursive values stack-overflow with the --json
output format #772
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#772
Loading…
Add table
Add a link
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?
Describe the bug
This isn't a real segfault, it's obviously just infinite recursion and stack overflow.
Steps To Reproduce
See above
Expected behavior
I am not sure what the strictly correct behaviour here is. Maybe we need a recursion limit and some way to signal infinite recursion. Maybe we need to emit NaNs.
The challenge with this is that we can't standardize that the printer will do the
repeated
thing exactly the same every time in a stable API.nix --version
outputAdditional context
Add any other context about the problem here.
outPath
attribute with--json
output format #773perhaps we should just disallow circular data in
--json
by default? we should have some way to allow circular data, perhaps by emitting not an immediately valid json object but an object with"<circular reference $id>"
placeholders and a set of json pointer mappings that resolve these references (so as to not accidentally make the reference placeholder strings non-representable)I think that's a really smart idea! I'm not blocked on this either way because I just use --apply to remove the problematic attrs.