Repository navigation
Align paths in traces #22575
Description
Activity
- addedfeature requestIssues requesting new Node.js features.Issues requesting new Node.js features.
on Aug 29, 2018 Not sure who to talk to here. @nodejs/v8 maybe? (edit: Sorry, I thought we had a TC39 team.)
No, I didn't. Please start the discussion at TC39. Don't know if it's of their competence or v8 or Node.js, but I think if so TC39 would prefer instead to define a standard traces spec... At least this change would be a start for that :-)
You could easily achieve this by overriding
Error.prepareStackTrace. I don't think we want to add the complexity for this in V8, especially since this is very bikesheddy.Reacted by snekMaybe would makes sense to implement this here in Node.js? Later it could be used as a proof-of-concept to implement it in other environments... Would you accept a pull-request for this?
@piranna i'm in the middle of rewriting our error stack decoration over in #23926. after that lands you could open a pr modifying the new stack decoration method we use.
fair warning though, i don't think many people will be partial to the format you're proposing. most people don't have enough screen real-estate for it to be practical. this seems like its better suited to happen in userland with
Error.prepareStackTrace, as hashseed said.There is also https://github.com/tc39/proposal-error-stacks
Now that #23926 has landed in
master, can we start moving this? :-) Where should we start?@piranna just triaging here…
- it might be good to open an issue on https://github.com/tc39/proposal-error-stacks referencing this.
- "you could open a pr modifying the new stack decoration method we use."
- it might be good to open an issue on tc39/proposal-error-stacks referencing this.
Done at tc39/proposal-error-stacks#30.
- "you could open a pr modifying the new stack decoration method we use."
Are you propossing that I implement it on Node.js code and create a pull-request with my changes?
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.
- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Feb 28, 2022 How can we move this forward? Maybe a PR implementing it here? I was asked to open one on tc-39 and got already stalled there...
2 remaining items
There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.
- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Sep 1, 2022 Any update on this? How can we move it forward?
- removedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Sep 2, 2022 There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.
- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Mar 2, 2023 Any update on this?
- removedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Mar 3, 2023 There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.
For more information on how the project manages feature requests, please consult the feature request management document.
- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Aug 31, 2023 There has been no activity on this feature request and it is being closed. If you feel closing this issue is not the right thing to do, please leave a comment.
For more information on how the project manages feature requests, please consult the feature request management document.
I still would like this to be considered, how can we proceed? Maybe I can do a PR?
When an exception is thrown or when using
console.trace(), files paths are not aligned making it difficult to follow them at naked eye and specially to identify when it's one of your files, one internal module of if it's a file located insidenode_modulesfolder:Not sure if this is done at
v8level, but my proposal is to add spaces between the function name and the file paths so this last ones gets aligned between themselves to the longest one. In the previous trace, it would get like:There would be problems if some code is parsing the trace output taking in consideration to be just only a space between the function name and the file path instead of several spaces, so this change would need to be in a major version, but anyway exception traces are not standard and such libs are very few and mostly for debuging purposses so their impact will be low, and is a small change that they would be easily added.