-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
featureFeature request or proposalFeature request or proposalgood first issueQuick win for first-time contributorsQuick win for first-time contributors
Description
Is your feature request related to a problem? Please describe.
There's no reason why trace shouldn't be able to do what the repl printer can:
nix-repl> builtins.trace lib.showOption {}
trace: <LAMBDA>
{ }
nix-repl> lib.showOption
«lambda @ /home/user/h/nixpkgs/lib/options.nix:322:16»
Describe the solution you'd like
At least print the location like the repl does.
More ideas:
- print closure info when debugger is enabled
- when the
builtins.traceargument is a thunk that points to a string interpolation, copy the thunk and evaluate the string with a flag that allows the lambda to be rendered as a source location (I don't think we have a nice ast node for this though. Add a new method toExprfor this kind of evaluation?)
Describe alternatives you've considered
Use the debugger.
Additional context
Metadata
Metadata
Assignees
Labels
featureFeature request or proposalFeature request or proposalgood first issueQuick win for first-time contributorsQuick win for first-time contributors