-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Julia nightly has ASCII salad for prompt in Windows CMD #56073
Comments
Even in VSCode the REPL on nightly acts really weird Screen.Recording.2024-10-09.130708.mp4 |
This comment has been minimized.
This comment has been minimized.
I hit this once also, and it was very weird, and affected every terminal and Julia version, then went away just as abruptly |
Using the Win64 version built by buildkite, this problem can be reproduced stably.
Terminals: |
Partially work around, REPL still produces abnormal output
|
Tried Tabby and it doesn't work either. |
Completely broken now on any terminal I try now on windows... Running with
|
Confirm that. Installed the portable version and it's broken. |
This appears to be related to REPL.LineEdit's handling of the console mode: $ julia +nightly -e "using REPL: LineEdit; println((LineEdit.default_console_mode_assigned[], LineEdit.get_default_console_mode()))"
(true, 0x00000000) vs. Julia 1.11: $ julia +1.11 -e "using REPL: LineEdit; println((LineEdit.default_console_mode_assigned[], LineEdit.get_default_console_mode()))"
(false, 0x00000007) Bad logic is julia/stdlib/REPL/src/LineEdit.jl Lines 1640 to 1664 in 61e8f1d
The console mode accidentally got measured during pre-compilation / build time, where it returned You can confirm this is the problem by putting this in your using REPL: LineEdit
LineEdit.default_console_mode_ref[] = LineEdit._console_mode() |
The query-and-restore logic here was pretty flawed: - it had no way to guarantee when the "default" mode is available to query, so it could easily save a "bad" mode - it did not ensure / check whether the "default" mode is compatible with the output generated by REPL (esp. ASCII escape codes / color) - it persisted the "default" mode from pre-compilation to runtime, causing JuliaLang#56073 Instead of trying to fix that up, this PR replaces the existing logic with a simple "reset to a hard-coded ConsoleMode" behavior. Since all of the console mode flags require changes in our printing behavior to accommodate, this should lead to much better behavior. Resolves JuliaLang#56073.
The query-and-restore logic here was pretty flawed: - it had no way to guarantee when the "default" mode is available to query, so it could easily save a "bad" mode - it did not ensure / check whether the "default" mode is compatible with the output generated by REPL (esp. ASCII escape codes / color) - it persisted the "default" mode from pre-compilation to runtime, causing JuliaLang#56073 Instead of trying to fix that up, this PR replaces the existing logic with a simple "reset to a hard-coded ConsoleMode" behavior. Since all of the console mode flags require changes in our printing behavior to accommodate, this should lead to much better behavior. Resolves JuliaLang#56073.
The query-and-restore logic here was pretty flawed: - it had no way to guarantee when the "default" mode is available to query, so it could easily save a "bad" mode - it did not ensure / check whether the "default" mode is compatible with the output generated by REPL (esp. ASCII escape codes / color) - it persisted the "default" mode from pre-compilation to runtime, causing JuliaLang#56073 Instead of trying to fix that up, this PR replaces the existing logic with a simple "reset to a hard-coded ConsoleMode" behavior. Since all of the console mode flags require changes in our printing behavior to accommodate, this should lead to much better behavior. Resolves JuliaLang#56073.
The query-and-restore logic here was pretty flawed: - it had no way to guarantee when the "default" mode is available to query, so it could easily save a "bad" mode - it did not ensure / check whether the "default" mode is compatible with the output generated by REPL (esp. ASCII escape codes / color) - it persisted the "default" mode from pre-compilation to runtime, causing JuliaLang#56073 `ENABLE_VIRTUAL_TERMINAL_PROCESSING` is the only flag that we're agnostic about. It was added relatively recently (Windows 10 version 1511), and `libuv` has support to emulate its behavior when it's not available natively. Otherwise this PR resets ENABLE_PROCESSED_OUTPUT and ENABLE_WRAP_AT_EOL_OUTPUT always, since we output ASCII control sequences unconditionally. Resolves JuliaLang#56073.
The query-and-restore logic here was pretty flawed: - it had no way to guarantee when the "default" mode is available to query, so it could easily save a "bad" mode - it did not ensure / check whether the "default" mode is compatible with the output generated by REPL (esp. ASCII escape codes / color) - it persisted the "default" mode from pre-compilation to runtime, causing JuliaLang#56073 `ENABLE_VIRTUAL_TERMINAL_PROCESSING` is the only flag that we're agnostic about. It was added relatively recently (Windows 10 version 1511), and `libuv` has support to emulate its behavior when it's not available natively. Otherwise this PR resets ENABLE_PROCESSED_OUTPUT and ENABLE_WRAP_AT_EOL_OUTPUT always, since we output ASCII control sequences unconditionally. Resolves JuliaLang#56073.
The query-and-restore logic here was pretty flawed: - it had no way to guarantee when the "default" mode is available to query, so it could easily save a "bad" mode - it did not ensure / check whether the "default" mode is compatible with the output generated by REPL (esp. ASCII escape codes / color) - it persisted the "default" mode from pre-compilation to runtime, causing JuliaLang#56073 `ENABLE_VIRTUAL_TERMINAL_PROCESSING` is the only flag that we're agnostic about. It was added relatively recently (Windows 10 version 1511), and `libuv` has support to emulate its behavior when it's not available natively. Otherwise this PR resets ENABLE_PROCESSED_OUTPUT and ENABLE_WRAP_AT_EOL_OUTPUT always, since we output ASCII control sequences unconditionally. Resolves JuliaLang#56073.
The query-and-restore logic here was pretty flawed: - it had no way to guarantee when the "default" mode is available to query, so it could easily save a "bad" mode - it did not ensure / check whether the "default" mode is compatible with the output generated by REPL (esp. ASCII escape codes / color) - it persisted the "default" mode from pre-compilation to runtime, causing JuliaLang#56073 `ENABLE_VIRTUAL_TERMINAL_PROCESSING` is the only flag that we're agnostic about. It was added relatively recently (Windows 10 version 1511), and `libuv` has support to emulate its behavior when it's not available natively. Otherwise this PR resets ENABLE_PROCESSED_OUTPUT and ENABLE_WRAP_AT_EOL_OUTPUT always, since we output ASCII control sequences unconditionally. Resolves JuliaLang#56073.
The query-and-restore logic here was pretty flawed: - it had no way to guarantee when the "default" mode is available to query, so it could easily save a "bad" mode - it did not ensure / check whether the "default" mode is compatible with the output generated by REPL (esp. ASCII escape codes / color) - it persisted the "default" mode from pre-compilation to runtime, causing JuliaLang#56073 `ENABLE_VIRTUAL_TERMINAL_PROCESSING` is the only flag that we're agnostic about. It was added relatively recently (Windows 10 version 1511), and `libuv` has support to emulate its behavior when it's not available natively. Otherwise this PR resets ENABLE_PROCESSED_OUTPUT and ENABLE_WRAP_AT_EOL_OUTPUT always, since we output ASCII control sequences unconditionally. Resolves JuliaLang#56073.
The query-and-restore logic here was pretty flawed: - it had no way to guarantee when the "default" mode is available to query, so it could easily save a "bad" mode - it did not ensure / check whether the "default" mode is compatible with the output generated by REPL (esp. ASCII escape codes / color) - it persisted the "default" mode from pre-compilation to runtime, causing JuliaLang#56073 `ENABLE_VIRTUAL_TERMINAL_PROCESSING` is the only flag that we're agnostic about. It was added relatively recently (Windows 10 version 1511), and `libuv` has support to emulate its behavior when it's not available natively. Otherwise this PR resets ENABLE_PROCESSED_OUTPUT and ENABLE_WRAP_AT_EOL_OUTPUT always, since we output ASCII control sequences unconditionally. Resolves JuliaLang#56073.
The text was updated successfully, but these errors were encountered: