Feature Request: Compact Traces (without code snippets) #960
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#960
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?
Is your feature request related to a problem? Please describe.
I find the “new” error traces frustrating to use since they take up much too much space since they print code locations. Since the error and the location that causes it are typically far apart in Nix code, it is preferable to see as much of the trace as possible over seeing a bunch of code snippets that are more often than not irrelevant. The files and line numbers plus added context (function names, primop names, derivation names) usually give enough information (and can be supplemented by Plan 9 style editor tooling that quickly allows you to jump to the locations). When debugging infinite recursions I think the verbose traces are even more problematic since you frequently have to simultaneously look at completely disparate parts of the trace which means a lot of scrolling around currently.
I think this problem has in principle (been recognized](
5cb98095ba
).Describe the solution you'd like
A config option that makes the output with
--show-trace
less verbose by hiding the code snippets. Ideally each trace entry would be one line again like in C++ Nix < 2.4.Describe alternatives you've considered
Patching Lix. Just showing the last location in the trace. Another flag or environment variable.
I'd be happy to implement this myself, but would like to get confirmation that such a change would be accepted.
sure, send a cl. other people may want it the other way around even, with more context per frame. making the context size configurable sounds pretty straight-forward