-
Notifications
You must be signed in to change notification settings - Fork 130
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
Set which encoding your test JVM will start with #1735
Set which encoding your test JVM will start with #1735
Conversation
This patch adds a setting to the `java.test.config` object. ```jsonc { "java.test.config": { "encoding": "ISO-8859-1", }, } ``` The aim here is to be able to seamlessly test code which cares about the launch encoding of the JVM. Yes, such code is not good. But sometimes you don't control your dependencies enough to fix this. Since the debug launcher already cares about the `encoding` member of the config, the only thing required is to add the member, which is missing from the launch configs generated by the test plugin. ```typescript // In `configurationProvider.ts:` (vscode-java-debug) // VS Code internal console uses UTF-8 to display output by default. if (config.console === "internalConsole" && !config.encoding) { config.encoding = "UTF-8"; } ``` Fixes microsoft#1641
PS : had to change the update site for eclipse to <repository location="https://download.eclipse.org/eclipse/updates/4.33/R-4.33-202409030240/"/> : the older URL doesn't seem available any more. I'm presuming your builds are behind a Maven repo that has this stuff cached, but building the source as-is from publicly available builds isn't currently possible. I've not submitted this as part of the PR (because I figure you have that Maven repo), but I'm mentioning it so you know. |
Updated the target platform definition in #1734 |
Hi @awilkins, Sorry that I'm just back from vacation and I will review this ASAP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you @awilkins |
This patch adds a setting to the
java.test.config
object.The aim here is to be able to seamlessly test code which cares about the launch encoding of the JVM. Yes, such code is not good. But sometimes you don't control your dependencies enough to fix this.
Since the debug launcher already cares about the
encoding
member of the config, the only thing required is to add the member, which is missing from the launch configs generated by the test plugin.Fixes #1641
NB : I couldn't work out how to actually launch and gather results from Java tests, in the Typescript test suite, but I did add a Java test case that cares about the launch encoding and tested it manually.