[Nix#9962] Show the first few and last few stack frames by default #169
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#169
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#9962
Is your feature request related to a problem? Please describe.
When an error is encountered and
--show-trace
hasn't been given, only the three outer-most stack frames are displayed. Often, these are not very useful. Here's the full text of an error I was asked to help diagnose at work:It's likely that the inner-most couple stack frames contain the most useful information here, but they're not shown and non-expert Nix users don't understand enough of the information being presented in the first few frames to know they're all generic boilerplate code.
Describe the solution you'd like
Instead of showing the three outer-most stack frames, the first (perhaps?) two and last two should be shown instead.
Additional context
The stack frame printing logic was designed by @layus, who admits that the choice to print the first three frames was arbitrary:
09a6e8e703/src/libutil/error.cc (L297-L298)
While that logic has been more-or-less fine until now, I think adding the last few frames will increase the signal-to-noise ratio of Nix's error reports.
Priorities
Add 👍 to issues you find important.
Looks like we can steal roberth's implementation here: https://github.com/NixOS/nix/pull/10305