Skip to content

Reverse order of stack printed by --show-trace #5278

@DavHau

Description

@DavHau

Is your feature request related to a problem? Please describe.
Whenever nix --show-trace prints a long stack trace, I have to scroll up the terminal a lot to find the code line which triggered the error.

Describe the solution you'd like
Reverse the order of the printed stack

Additional context
From my experience most other programming languages' stack traces are printed in a way so that the code line which triggered the error is printed last.
This makes sense, because it is the most relevant part of the information and the first place to look for when doing debugging.
Nix, for some reason, does it the other way round which seems impractical and requires scrolling up the terminal

Metadata

Metadata

Assignees

No one assigned

    Labels

    UXThe way in which users interact with Nix. Higher level than UI.error-messagesConfusing messages and better diagnosticslanguageThe Nix expression language; parser, interpreter, primops, evaluation, etc

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions