-
Notifications
You must be signed in to change notification settings - Fork 109
Explicitencoding #2213
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
base: master
Are you sure you want to change the base?
Explicitencoding #2213
Conversation
b933246 to
723dc77
Compare
|
Talked about it in the "developers community call" on 19th of June, 2025. The difference between the i built that is causing issues here and the regular built which is not failing but is the only one a contributor can "reproduce" had been discussed. https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/wiki/Eclipse-IDE-%E2%80%90-Developers-Community-Call#19th-june-2025 Eclipse IDE ‐ Developers Community Call · eclipse-platform/eclipse.platform.releng.aggregator Wiki See eclipse-platform/eclipse.platform.releng.aggregator#2979 Streamline I-build test setup · Issue #2979 · eclipse-platform/eclipse.platform.releng.aggregator To hightlight code that is inherently making use of environment settings regarding encoding one option is to simply use the api for marking words. https://www.eclipse.org/articles/Article-Mark%20My%20Words/mark-my-words.html Mark My Words An approach to make jdt core able to detect usage of such dependency to environment settings (which is in some situations what you want!) https://github.com/eclipse-jdtls/eclipse-jdt-core-incubator Issues · eclipse-jdtls/eclipse-jdt-core-incubator |
Yes, exactly. Just to mirror the notes: the difference is mainly the project 'shape' (in I-build test bundles are packed/zipped into jars, while in verification builds they are usually in a (not-zipped) directory structure directly on the file-system). Unfortunately it's currently very hard to replicate the I-build locally, but my suggestion is to make sure that the tests don't expect any files being available in a usual (not-zipped) file-system folder structure. If possible only access resources through the class-loader or as bundle-entry. If you really need a directory structure on the file-system, you could extract the files from the project into a (JUnit) temporary-folder and replicate the structure there (maybe only if the project isn't already in a directory 'shape'). |
ca09c3c to
d02fcc6
Compare
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
90d2e2b to
18e9f3c
Compare
18e9f3c to
7cb83bb
Compare
|
Unfortunately this one cannot be merged as is. Should anybody have time to have a look why it does not run through you are welcome. |
7cb83bb to
9f3edf7
Compare
9f3edf7 to
cd8e4b3
Compare
inherit specific processing in enum Add more testcases and support aggregatedutf8 option add option to remove unnecessary nls tags (not working)
- use ASTNodes.replaceAndRemoveNLS() instead of removeNLSComment() - remove the AbstractExplicitEncoding.removeNLSComment() method
- remove aggregate option that uses constant - fix some previews that are backwards - fix description message to remove adding method names
cd8e4b3 to
89d45b7
Compare
#1631
What it does
Port of "explicit encoding" cleanup from https://github.com/carstenartur/sandbox to eclipse
What it does
Some java api has been designed originally without a strong focus on safety on usage of different charsets. Because of that apis have simple string parameters to determine the encoding to use or even a default encoding that is based on the environment settings. The situation has improved a lot and you should explicitly set the charset. In doing so for type safety better switch to Charset class.
For an example what the result looks similar to look at
58ae341
That is what this cleanup is trying to support.
Starting with Java 10
Starting with Java 10
Starting with Java 10
Starting with Java 18
Currently, jdt.ui supports test environments only up to Java 17, which means tests cannot be executed for this version.
Starting with Java 5
Starting with Java 5
Starting with Java 5
Starting with Java 5
Starting with Java 10
Starting with Java 10
Starting with Java 10
Starting with Java 5
Starting with Java 10
There are still some missing parts:
KEEP means that the current behavior of the code is not changed
USE_UTF-8 means that in all cases where there is no fixed encoding we add a charset UTF-8
USE_UTF-8_AGGREGATE means the same as USE_UTF-8 but additionally add a constant to the class and refers to it
How to test
Author checklist