| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Hmm... I understand with and agree with the general nature of this change but it still bothers me. Presumptively, this is an issue for more than just printing the error stack and I really dislike being forced to spread platform specific checks throughout the code as those become harder to maintain (or even keep track of) over time. I'm not sure I have a better suggestion right now but I'm reluctant to +1 this. |
Sorry, something went wrong.
|
I am also reluctant to completely disable colors on fatal errors in Windows. The issue about the Windows version seems to be around differentiating Windows Server 2019 from regular Windows 10. If there's any other possibility to detect for example if cmd.exe is used or not, we might at least use that in addition. |
Sorry, something went wrong.
|
It's interesting how all tests passed, while none of them is modified. I actually see why - this change cannot be detected programmatically on Windows (or at least very hard).
@jasnell. I hope we all realize this change is temporary. The actual fix is described in #29387 (comment), but it requires a lot of refactoring and also requires some changes in libuv. Given that this issue has been making troubles for a lot of Windows users for more than a year, wouldn't it be better to disable highlighting while we discuss how to actually resolve the issue?
@BridgeAR. I added additional check, PTAL. In general, there are no official Microsoft documentation regarding ANSI escapes support. There is a script for detecting the ANSI support, but it is not reliable. I tested it on different virtual machines with various console emulators and it does not work in all cases. |
Sorry, something went wrong.
|
Any change requests here? If not, can we have this landed before 14.2.0 release (or at least before 14.3.0)? |
Sorry, something went wrong.
Sorry, something went wrong.
Some consoles do not convert ANSI escape sequences to colors, rather display them directly to the stdout. On those consoles, libuv emulates colors by intercepting stdout stream and calling corresponding Windows API functions for setting console colors. However, fatal error are handled differently and we cannot easily highlight them.
|
Four tests were failing due to the fact that error object does not need to be an instance of Error constructor (and may not have stack present). I updated the code and rebased onto master. |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
|
friendly ping |
Sorry, something went wrong.
Some consoles do not convert ANSI escape sequences to colors, rather display them directly to the stdout. On those consoles, libuv emulates colors by intercepting stdout stream and calling corresponding Windows API functions for setting console colors. However, fatal error are handled differently and we cannot easily highlight them. PR-URL: nodejs#33132 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
|
Glad this landed! I may be a bit late in asking, but would a TODO comment have been helpful to keep track of the fact that this is supposed to be a temporary fix and not a permanent solution? |
Sorry, something went wrong.
Some consoles do not convert ANSI escape sequences to colors, rather display them directly to the stdout. On those consoles, libuv emulates colors by intercepting stdout stream and calling corresponding Windows API functions for setting console colors. However, fatal error are handled differently and we cannot easily highlight them. PR-URL: #33132 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Some consoles do not convert ANSI escape sequences to colors, rather display them directly to the stdout. On those consoles, libuv emulates colors by intercepting stdout stream and calling corresponding Windows API functions for setting console colors. However, fatal error are handled differently and we cannot easily highlight them. PR-URL: #33132 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Some consoles do not convert ANSI escape sequences to colors, rather display them directly to the stdout. On those consoles, libuv emulates colors by intercepting stdout stream and calling corresponding Windows API functions for setting console colors. However, fatal error are handled differently and we cannot easily highlight them. PR-URL: #33132 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Some consoles do not convert ANSI escape sequences to colors, rather display them directly to the stdout. On those consoles, libuv emulates colors by intercepting stdout stream and calling corresponding Windows API functions for setting console colors. However, fatal error are handled differently and we cannot easily highlight them. PR-URL: nodejs/node#33132 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
| Back | FazBrowse Home | New Git URL |
Some consoles do not convert ANSI escape sequences to colors,
rather display them directly to the stdout. On those consoles,
libuv emulates colors by intercepting stdout stream and calling
corresponding Windows API functions for setting console colors.
However, fatal error are handled differently and we cannot easily
highlight them.
Fixes #29387
According to this, Windows fully supports ANSI escapes starting from v.1607 ("Anniversery Update", OS build 14393), so we could add additional check:
but given that #29387 (comment) uses build 17763, seems like that this test is not reliable.
Checklist