Skip to content
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

Windows formatting terminal characters error #3068

Closed
Tracked by #49433
BioTurboNick opened this issue Apr 23, 2022 · 17 comments · Fixed by #3338
Closed
Tracked by #49433

Windows formatting terminal characters error #3068

BioTurboNick opened this issue Apr 23, 2022 · 17 comments · Fixed by #3338
Labels
precompile Pkg.precompile windows

Comments

@BioTurboNick
Copy link
Contributor

BioTurboNick commented Apr 23, 2022

This just started happening, but it's only on one computer so I'm not sure the ultimate cause. Also causes the precompile progress display to use up many lines instead of update in-place.

image

It might be related to the custom registry? I'm guessing some special character isn't getting a closing for some reason. If I remove the custom registry, it seems to be okay again. Mostly observed with the up command.

This is on Julia 1.8.0-beta3, on Windows 11 22H2 22598.200, with Windows Terminal 1.12.10983.0

@DanBerge
Copy link

DanBerge commented May 2, 2022

I am having the same issue with a custom registry. At first I thought it might have something to do with the banner on the SSH session, but I am getting the same issue with a local only registry also.

image

This is on Julia 1.7.1., Windows 10 Version 21H1 19044.1645

@BioTurboNick
Copy link
Contributor Author

@DanBerge what's your Windows Terminal version, if that's what you're using?

@KristofferC
Copy link
Member

KristofferC commented May 2, 2022

It would be helpful if you could try with different terminals / different settings as much as possible to try to narrow it down.

@DanBerge
Copy link

DanBerge commented May 2, 2022

I forgot Windows Terminal is not the Command Prompt which is what I meant, so I'm not sure if it has a version or how to find it. I also get the same issue in PowerShell and VSCode using PowerShell. The cursor indicator also stops working after this error occurs.

image

@DanBerge
Copy link

DanBerge commented May 2, 2022

I've tracked it down more, and maybe @BioTurboNick is doing the same. In order to get the SSH private keys working I had to set ENV["JULIA_PKG_USE_CLI_GIT"]=true so that it would find the SSH key set with ENV["SSH_KEY"PATH". I don't remember where I saw to use the CLI GIT. If I use the default on the local repository it works without issue.

@BioTurboNick
Copy link
Contributor Author

I haven't had a chance to do more, but I also had to set the CLI env variable; I believe because it wasn't properly finding the key and/or using the ssh-agent?

However, I'm on a system at the moment where that first env variable is set and it doesn't have the issue. I didn't set the other variable you refer to though.

@KristofferC
Copy link
Member

I remember an issue where if you used git CLI in a julia session it would mess up your color printing in the terminal. It was either in this repo or the julia repo. I'll try find it...

@BioTurboNick
Copy link
Contributor Author

BioTurboNick commented May 2, 2022

I found this: JuliaLang/julia#43273 but it related to loss of any color. Whatever is happening here seems to be restricted to the package update/precompilation steps, somehow?

@BioTurboNick
Copy link
Contributor Author

BioTurboNick commented May 2, 2022

Confirmed that on the machine where this is happening, switching between ENV["JULIA_PKG_USE_CLI_GIT"] states switches the behavior. However, it fails to update from the custom registry as a result.

Also confirmed it happens in both Console Host and Windows Terminal

@BioTurboNick
Copy link
Contributor Author

@KristofferC
Copy link
Member

KristofferC commented May 3, 2022

This is what I was thinking about JuliaLang/julia#26894. JuliaLang/julia#26894 (comment) suggests it has something to do with the git binaries on Windows which might mean it is the same issue.

What happens if you manually run git from Julia. Does it also disable ansi colors?

@BioTurboNick
Copy link
Contributor Author

Well, I just verified it happens in 1.6.6 too. And again, only if CLI git is in use.

Actually, the terminal cursor also becomes invisible here. Weird.

I tried running a few git commands, at the shell prompt and with run, but no issue there. I didn't see git's normal colors but no control codes either.

@BioTurboNick
Copy link
Contributor Author

BioTurboNick commented May 3, 2022

Maybe this is instructive. When running test Pkg, the trouble starts just after the add: input checking test set, and it affects the display of the test results. All the way up until the resolve test set, where it resumes normality. Then it breaks again after all and is restored again after cycles.

Then it breaks again after not collecting multiple package instances #1570 and restores after adding and upgrading different versions.

Then breaks again after invalid repo url and restores again after Suggest Pkg.developinstead ofPkg.add``

Then breaks again after tab completion, then restores again after unit test for REPLMode.promptf

Then breaks again after issue #2587, PR #2589: Pkg.PackageSpecacceptsUnion{UUID, AbstractString, Nothing}foruuid`` and restores after Artifact archival

When I say "after" I mean the special control characters start or stop after the test summary for that test. So possibly the thing that breaks or fixes it occurs in the next test following that, before displaying its test summary.

@KristofferC
Copy link
Member

Seems to still happen

@IanButterworth
Copy link
Member

Still happening? I haven't seen new reports?

@BioTurboNick
Copy link
Contributor Author

I can't recall the last time I saw this.

@IanButterworth
Copy link
Member

Nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
precompile Pkg.precompile windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants