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

-batch option doesn't work with OpenJDK-22/23 #7091

Closed
plokhotnyuk opened this issue Dec 14, 2022 · 3 comments
Closed

-batch option doesn't work with OpenJDK-22/23 #7091

plokhotnyuk opened this issue Dec 14, 2022 · 3 comments
Assignees
Labels
area/shell sbt shell and slash syntax related issues Bug

Comments

@plokhotnyuk
Copy link

plokhotnyuk commented Dec 14, 2022

steps

Run any multi-module project with -batch option

problem

Sbt prints control symbols to the console

expectation

No control symbols

@plokhotnyuk plokhotnyuk changed the title -batch option doesn't for with OpenJDK-21 -batch option doesn't work for with OpenJDK-21 Dec 14, 2022
@plokhotnyuk plokhotnyuk changed the title -batch option doesn't work for with OpenJDK-21 -batch option doesn't work with OpenJDK-21 Dec 14, 2022
@plokhotnyuk plokhotnyuk changed the title -batch option doesn't work with OpenJDK-21 -batch option doesn't work with OpenJDK-22/23 Dec 15, 2023
@Friendseeker Friendseeker self-assigned this Oct 29, 2024
@Friendseeker Friendseeker added the area/shell sbt shell and slash syntax related issues label Oct 29, 2024
@Friendseeker
Copy link
Member

image

image

Not reproducible on Windows 11, JDK 23 and sbt 1.10.3

Feel free to reopen the issue if the issue is still reproducible on your end

@Friendseeker Friendseeker closed this as not planned Won't fix, can't repro, duplicate, stale Oct 29, 2024
@plokhotnyuk
Copy link
Author

@Friendseeker Have you tried to store an output in a file yet?

I have a lot of *.txt files from historical runs of jsoniter-scala benchmarks that have control symbols in output.

Please see them in this branch.

All is fine with runs on JDK-17/21, but output from JDK-24 (and later JDK-22/23) contains a lot of them:

image

@Friendseeker Friendseeker reopened this Oct 30, 2024
@Friendseeker
Copy link
Member

Friendseeker commented Oct 30, 2024

@Friendseeker Have you tried to store an output in a file yet?

I have a lot of *.txt files from historical runs of jsoniter-scala benchmarks that have control symbols in output.

Please see them in this branch.

All is fine with runs on JDK-17/21, but output from JDK-24 (and later JDK-22/23) contains a lot of them:

Thanks for the info

Reproducible on sbt 1.10.4 & JDK 23 & Windows 11 (running sbt -batch update on a test project)

�[0m[�[0m�[0minfo�[0m] �[0m�[0mwelcome to sbt 1.10.4 (Oracle Corporation Java 23.0.1)�[0m�[0J
�[0J�[0m[�[0m�[0minfo�[0m] �[0m�[0mloading project definition from D:\Repos\christ\project�[0m�[0J
�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[1000D
�[2K�[2K | => christ-build / Compile / compileIncremental 0s
�[2K�[2A�[1000D�[0J�[0m[�[0m�[0minfo�[0m] �[0m�[0mloading settings for project root from build.sbt ...�[0m�[0J
�[0J�[0m[�[0m�[0minfo�[0m] �[0m�[0mset current project to christ (in build file:/D:/Repos/christ/)�[0m�[0J
�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[0J�[1000D
�[2K�[2K | => root / update 0s
�[2K�[2A�[1000D�[0J�[0m[�[0m�[32msuccess�[0m] �[0m�[0mTotal time: 1 s, completed Oct 30, 2024, 11:06:42ΓÇ»a.m.�[0m�[0J
�[0J�[0J

Not reproducible on latest sbt snapshot build (4835812) & JDK 23 & Windows 11

[info] welcome to sbt 1.10.5-SNAPSHOT (Eclipse Adoptium Java 23.0.1)
[info] loading project definition from D:\Repos\christ\project
[info] loading settings for project root from build.sbt ...
[info] set current project to christ (in build file:/D:/Repos/christ/)
[success] Total time: 1 s, completed Oct 30, 2024, 11:17:31 a.m.

(Ignore the ΓÇ», it is a different but related issue that also a pending PR fix).

I think #7843 specifically fixed the issue. #7843 fixed sbt's detection of physical terminal on JDK22+. Basically JDK22+ started to create System.console even when a physical terminal do not exist (in this case, we are redirecting output so indeed no physical terminal), and I guess as a result sbt mistakenly thought a physical terminal is present and therefore printed all the control symbols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/shell sbt shell and slash syntax related issues Bug
Projects
None yet
Development

No branches or pull requests

2 participants