You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Node.js v17.0.0 has been released, it includes this PR: nodejs/node#38332
It prints the Node.js version used on fatal exceptions that causes exit (that are not encapsulated by try/catch).
It could be a feature, that Deno could also do, it is easier for debugging so you don't have to ask "what version are you on?", it is directly in the error the user copy/paste from when asking for help.
Currently:
With a file app.ts :
thrownewError('Error...')
When we do deno run app.ts, it prints:
error: Uncaught Error: Error...
throw new Error('Error...')
^
at file:///home/divlo/Documents/testing/test-ts/app.ts:1:7
What about something like this?
error: Uncaught Error: Error...
throw new Error('Error...')
^
at file:///home/divlo/Documents/testing/test-ts/app.ts:1:7
Deno v1.15.2
The text was updated successfully, but these errors were encountered:
I don't think it's worth it to add and maintain this feature as bug reporting without the version hasn't been that much of an issue (at least from what I've seen... it does happen, but usually we just ask people what version it is in those cases where it's necessary). Also, some people don't even include the error message or stack trace so in some scenarios this wouldn't help. Having the version there also creates extra noise and takes up more vertical space on errors. Additionally, in most cases errors thrown like this aren't Deno bugs, but rather bugs in the code.
If people not including the version number in bug reports is an issue, I would recommend we improve the bug report template to ask people to run deno -V and paste in their version number. It's not too difficult to run this command and quite common practice.
I'm not a fan of it, because it makes snapshot testing stderr that much harder when running tests in CI against multiple runtime versions. You have to use regex or something to normalise the output.
The Node.js v17.0.0 major change has actually broken some of my tests, e.g:
Hey! 👋
Node.js v17.0.0 has been released, it includes this PR: nodejs/node#38332
It prints the Node.js version used on fatal exceptions that causes exit (that are not encapsulated by try/catch).
It could be a feature, that Deno could also do, it is easier for debugging so you don't have to ask "what version are you on?", it is directly in the error the user copy/paste from when asking for help.
Currently:
With a file
app.ts
:When we do
deno run app.ts
, it prints:error: Uncaught Error: Error... throw new Error('Error...') ^ at file:///home/divlo/Documents/testing/test-ts/app.ts:1:7
What about something like this?
error: Uncaught Error: Error... throw new Error('Error...') ^ at file:///home/divlo/Documents/testing/test-ts/app.ts:1:7 Deno v1.15.2
The text was updated successfully, but these errors were encountered: