-
-
Notifications
You must be signed in to change notification settings - Fork 14
Changes to support color VT sequences on windows #2
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
Conversation
This code already had special handling for decoding utf-8 characters correctly for the UCS-2 conhost (trailing incomplete bytes and characters > 0xFFFF). Rather than trying to duplicate that, we can simply delete the duplicate code-path and selectively disable the parts that do not apply.
This reverts commit 587ebd3.
@vtjnash I don't understand your concern for JuliaLang/julia#27782 Executing |
Yes, see the linked issues: they are for many exe's that aren't |
How can one reproduce JuliaLang/julia#26894 or JuliaLang/julia#27782? I used the binary that @musm provided here that includes all his libuv and julia patches, and then I tried the following things, none of which show a problem:
CCing @KristofferC, given that he originally reported JuliaLang/julia#26894. Any suggestion how we might be able to trigger that? |
Try JuliaLang/julia#26894 (comment) perhaps. |
Yes, now I can reproduce that, thanks! So, just to record that here, the repo is as follows:
Does this only happen for the stuff from Git, or are there any other command line programs that have the same issue? Here is one clue what is wrong here: when I call So I guess the real question is how can that happen? Presumably what is happening is that If so, the solution would probably be to do the following whenever a child process is started:
|
There are probably other console specific configurations that a child process in theory could also change and cause trouble? So maybe the right thing to do would be to just call |
Is this then isolated to down to |
@davidanthoff can you explain again how you reproduced the issue? Are you able to trigger the issue only from git-bash ? I'm unable to trigger the issue from julia within cmd. But running julia from a git bash prompt or running the julia.exe from within wsl I can trigger the issue. |
I installed your compiled version of julia 1.2.0-DEV, then opened the folder where it is installed and double clicked on the julia.exe in there. Then I did this: That reproduces the issue for me. I then copy-pasted the code that calls |
@vtjnash I updated the branch here by pulling in PR libuv#2129 It seems we need to set I'm not sure if we need to handle anything in the julia side with regards to Any input would be appreciated. |
Indeed, it seems that David is correct here https://stackoverflow.com/questions/52607960/how-can-i-enable-virtual-terminal-processing
|
One thing that I am curious about is if this only occurs in the If this is true julia needs to reset the terminal state after we exit the |
Based on the previous comment, the following commit resets the terminal state after every shell command which does fix the issue that the julia repl gets a corrupted consolemode after spawning certain executables @vtjnash is this a sufficient patch in julia to resolve the bug you brought to attention? Test installers (this pr + julia patch shown above): https://www.dropbox.com/s/sutliotmvb9l8k8/julia-6740f8784b-win64.exe?dl=0 EDIT: That doesn't work, since it corrupted the shell mode in a different way... |
@musm, can you please leave PRs like this open even if they don't get merged right away? Sometimes it takes a while to get things reviewed and merged. |
@StefanKarpinski I closed this since it's stale. The main reason is this branch needs to be updated to the latest libuv branch we are using |
It's also possible to rebase the existing PR; keeping it open acts as a way of keeping track of the PR since closed PRs are generally never looked at again, whereas open PRs will be looked at. |
Can't we just agree that the problem is not this PR, but the broken repl shell mode in julia? I would be in favor of merging this PR. And either trying to fix the broken repl shell mode rather than holding up this useful PR, that is much more practically relevant. The examples that break the repl shell mode are quite esoteric as evidence by what one has to do to trigger it. |
Neither my hacking nor @davidanthoff have been able to successfully resolve the shell mode bug. And seeing that no one else has tried to resolve the issue, I think it should be appropriate to merge this PR in some form. |
I would love some feedback, before trying to rebase this based on my previous comments. |
Superseded by #11 which is opened against the latest julia libuv fork (In other words, this is stale since it's opened against an old fork) |
ERROR: LeakSanitizer: detected memory leaks ``` Direct leak of 432 byte(s) in 9 object(s) allocated from: #0 0x1062eedc2 in __sanitizer_mz_calloc+0x92 (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x46dc2) #1 0x7fff20171eb6 in _malloc_zone_calloc+0x3a (libsystem_malloc.dylib:x86_64+0x1beb6) #2 0x7fff203ac180 in _CFRuntimeCreateInstance+0x124 (CoreFoundation:x86_64h+0x4180) #3 0x7fff203ab906 in __CFStringCreateImmutableFunnel3+0x84d (CoreFoundation:x86_64h+0x3906) #4 0x7fff203ab0a1 in CFStringCreateWithCString+0x48 (CoreFoundation:x86_64h+0x30a1) #5 0x1056f63e1 in uv__get_cpu_speed darwin.c:267 #6 0x1056f491e in uv_cpu_info darwin.c:338 ``` PR-URL: libuv#3098 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
No description provided.