Crash with stacktrace when parsing flake.lock with invalid JSON #559
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
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#559
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?
Describe the bug
Lix prints a not-particularly-helpful stacktrace and asks for a bug report when it fails to parse a flake.lock with invalid JSON (for example, with git merge conflict markers in it).
Steps To Reproduce
Expected behavior
It should probably not print a whole stacktrace about it nor ask for a bug report, because it isn't really a bug. It would also be nice if the error indicated what exactly failed to parse, because currently there's no indication that it's mad about the
flake.lock
specifically; I just got lucky with an error message that made it obvious to me.nix --version
outputnix (Lix, like Nix) 2.92.0-dev-pre20241015-f607731
Additional context
Here's the stacktrace I got for this:
CppNix has a similar issue: https://github.com/NixOS/nix/issues/6151