-
Notifications
You must be signed in to change notification settings - Fork 137
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
SWT build still requires Java 11 #626
Comments
Note: there are still build files requiring Java 11 for execution (Jenkinsfile and buildSWT.xml). See eclipse-platform#626 Fixes eclipse-platform#625
It's possible to use the <project default="blah">
<target name="blah">
<property name="tags"><![CDATA[
a
b
c]]></property>
<echo file="dummyTags.java">
<![CDATA[
public class lastTag { public static void main(String... args) {
var tags = args[args.length - 1].split("\n");
System.out.println(tags[tags.length - 1].strip());
}}
]]>
</echo>
<java fork="true" outputproperty="swt_tag" sourcefile="dummyTags.java">
<arg value="${tags}"/>
</java>
<echo>${swt_tag}</echo>
</target>
</project> For the more complex one that sets multiple properties at once, the |
Note: there are still build files requiring Java 11 for execution (Jenkinsfile and buildSWT.xml). See eclipse-platform#626 Fixes eclipse-platform#625
Note: there are still build files requiring Java 11 for execution (Jenkinsfile and buildSWT.xml). See eclipse-platform#626 Fixes eclipse-platform#625
My goal with #513 is to get rid of ANT as far as reasonable possible, which of course also includes to get rid of the java-script scripts in ANT tasks. For example with #613 one stage was already made ANT and javascript free. But it is a larger task I carry out step by step.
Since these ANT/javascript script scripts are only used to perform the SWT natives build this is not completely correct. As described in #625 (comment) the |
Note: there are still build files requiring Java 11 for execution (Jenkinsfile and buildSWT.xml). See eclipse-platform#626 Fixes eclipse-platform#625
Note: there are still build files requiring Java 11 for execution (Jenkinsfile and buildSWT.xml). See eclipse-platform/eclipse.platform.swt#626 Fixes eclipse-platform/eclipse.platform.swt#625
Note: there are still build files requiring Java 11 for execution (Jenkinsfile and buildSWT.xml). See eclipse-platform/eclipse.platform.swt#626 Fixes eclipse-platform/eclipse.platform.swt#625
I have analyzed in depth from which JDKs the headers are used:
The mixture is coming from multiple discrepancies in the SWT-natives builds, which existed in the https://ci.eclipse.org/releng/view/SWT%20Natives jobs. For Linux it is the expected mixture. For Windows the environment variable from which the headers are included is name eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/make_win32.mak Line 41 in 6912a16
eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/make_win32.mak Lines 53 to 55 in 6912a16
For macos is it is more or less hard-coded to use JDK on the system path (as far as I understand the script): eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/build.sh Lines 18 to 22 in 6912a16
I downloaded the Java-17 JDKs for all of the mentioned platforms from Adoptium and compared their This leads me to the conclusion that we only need one JDK respectively one set of headers per OS. |
I have already prototypes a way that is compatible with PDE/Eclipse + Tycho without the use of ANT but it would require So if LFS is too complicated / no progress, one might probably reconsider the submodules as an intermediate solution... as soon as we have a combined repo (using whatever technique) I can try finish my prototype and open a PR... adding JDK headerfiles to the repo seems not a very good solution, even though the visible result of a headerfile should not differ between OS there is no guarantee. |
Can this issue be closed? AFAIK SWT now requires Java 17. |
No, see bug description / comments.
That's the point of the issue. We require Java 17 for runtime but still need Java 11 for build! |
Use headers and libs from minimal JustJ JDK and use SWT_JAVA_HOME environment variable Fixes eclipse-platform#626
Use headers and libs from minimal JustJ JDK and use SWT_JAVA_HOME environment variable Fixes eclipse-platform#626
Use headers and libs from minimal JustJ JDK and use SWT_JAVA_HOME environment variable Fixes eclipse-platform#626
Use headers and libs from minimal JustJ JDK and specify the resource location using the SWT_JAVA_HOME environment variable. This allows to use another JDK as header/lib provider than the one specified in the global JAVA_HOME variable. Fixes eclipse-platform#626
Use the C header files and shared native libraries from minimal JustJ JDKs when building the SWT native binaries on specialized build machines. Always specify the location of the JDK providing the headers/libs using the 'SWT_JAVA_HOME' environment variable. This allows to use another JDK as the one specified in the global JAVA_HOME variable. When building the natives for the current platform via Maven set the value of 'SWT_JAVA_HOME' to the location of the running JDK, if not set externally. Fixes eclipse-platform#626
Use the C header files and shared native libraries from minimal JustJ JDKs when building the SWT native binaries on specialized build machines. Always specify the location of the JDK providing the headers/libs using the 'SWT_JAVA_HOME' environment variable. This allows to use another JDK as the one specified in the global JAVA_HOME variable. When building the natives for the current platform via Maven set the value of 'SWT_JAVA_HOME' to the location of the running JDK, if not set externally. Fixes eclipse-platform#626
Use the C header files and shared native libraries from minimal JustJ JDKs when building the SWT native binaries on specialized build machines. Always specify the location of the JDK providing the headers/libs using the 'SWT_JAVA_HOME' environment variable. This allows to use another JDK as the one specified in the global JAVA_HOME variable. When building the natives for the current platform via Maven set the value of 'SWT_JAVA_HOME' to the location of the running JDK, if not set externally. Fixes eclipse-platform#626
to replace ANT tasks with JavaScript. And stash native sources not-zipped to save the zip and unzip steps. Part of - eclipse-platform#513 - eclipse-platform#626
to replace ANT tasks with JavaScript. And stash native sources not-zipped to save the zip and unzip steps. Part of - eclipse-platform#513 - eclipse-platform#626
to replace ANT tasks with JavaScript. And stash native sources not-zipped to save the zip and unzip steps. Part of - eclipse-platform#513 - eclipse-platform#626
to replace ANT tasks with JavaScript in Jenkins pipeline. And stash native sources not-zipped to save the zip and unzip steps. Furthermore move all remaining ANT tasks to run a native build in a local Maven for the running platform completely to the maven-antrun-plugin configuration. Part of - eclipse-platform#513 - eclipse-platform#626
to replace ANT tasks with JavaScript in Jenkins pipeline. And stash native sources not-zipped to save the zip and unzip steps. Furthermore move all remaining ANT tasks to run a native build in a local Maven for the running platform completely to the maven-antrun-plugin configuration. Part of - eclipse-platform#513 - eclipse-platform#626
in order to replace ANT tasks with JavaScript (which require Java-11) in Jenkins pipeline. Stash native sources not-zipped to save the zip and unzip steps. Additionally move all remaining ANT tasks to run a native build in a local Maven for the running platform completely to the maven-antrun-plugin configuration. Furthermore move declaration of tools to the common Jenkins pipeline section to make them usable in all stages. Since eclipse-platform#633 the JDK on the native-build-agent's PATH is not used anymore when building the native binaries and thus it is not required anymore to keep the PATH untouched. Part of - eclipse-platform#513 - eclipse-platform#626
in order to replace ANT tasks with JavaScript (which require Java-11) in Jenkins pipeline. Stash native sources not-zipped to save the zip and unzip steps. Additionally move all remaining ANT tasks to run a native build in a local Maven for the running platform completely to the maven-antrun-plugin configuration. Furthermore move declaration of tools to the common Jenkins pipeline section to make them usable in all stages. Since eclipse-platform#633 the JDK on the native-build-agent's PATH is not used anymore when building the native binaries and thus it is not required anymore to keep the PATH untouched. Part of - eclipse-platform#513 - eclipse-platform#626
in order to replace ANT tasks with JavaScript (which require Java-11) in Jenkins pipeline. Stash native sources not-zipped to save the zip and unzip steps. Additionally move all remaining ANT tasks to run a native build in a local Maven for the running platform completely to the maven-antrun-plugin configuration. Furthermore move declaration of tools to the common Jenkins pipeline section to make them usable in all stages. Since eclipse-platform#633 the JDK on the native-build-agent's PATH is not used anymore when building the native binaries and thus it is not required anymore to keep the PATH untouched. Part of - eclipse-platform#513 - eclipse-platform#626
in order to replace ANT tasks with JavaScript (which require Java-11) in Jenkins pipeline. Stash native sources not-zipped to save the zip and unzip steps. Additionally move all remaining ANT tasks to run a native build in a local Maven for the running platform completely to the maven-antrun-plugin configuration. Furthermore move declaration of tools to the common Jenkins pipeline section to make them usable in all stages. Since #633 the JDK on the native-build-agent's PATH is not used anymore when building the native binaries and thus it is not required anymore to keep the PATH untouched. Part of - #513 - #626
This avoids the need for a Java-11 JRE to run Javascript in the pipeline and moves the file changes and git actions into one common place, making it simpler to understand. Simplify the step to commit the binaries binaries by deleting all existing native binaries in the repo before they are build and then just committing all new, deleted and changed files. Also skip version increment tasks that change nothing (i.e. the major- and minor swt-version value are unchanged and thus the entire version.txt is not updated in the automated pipeline. Remove the 'check_fragment_libraries' task without replacement since it is not useful anymore. Part of eclipse-platform#513 Fixes eclipse-platform#626
This avoids the need for a Java-11 JRE to run Javascript in the pipeline and moves the file changes and git actions into one common place, making it simpler to understand. Simplify the step to commit the binaries binaries by deleting all existing native binaries in the repo before they are build and then just committing all new, deleted and changed files. Also skip version increment tasks that change nothing (i.e. the major- and minor swt-version value are unchanged and thus the entire version.txt is not updated in the automated pipeline. Remove the 'check_fragment_libraries' task without replacement since it is not useful anymore. Part of eclipse-platform#513 Fixes eclipse-platform#626
This avoids the need for a Java-11 JRE to run Javascript in the pipeline and moves the file changes and git actions into one common place, making it simpler to understand. Simplify the step to commit the binaries binaries by deleting all existing native binaries in the repo before they are build and then just committing all new, deleted and changed files. Also skip version increment tasks that change nothing (i.e. the major- and minor swt-version value are unchanged and thus the entire version.txt is not updated in the automated pipeline. Remove the 'check_fragment_libraries' task without replacement since it is not useful anymore. Part of eclipse-platform#513 Fixes eclipse-platform#626
This avoids the need for a Java-11 JRE to run Javascript in the pipeline and moves the file changes and git actions into one common place, making it simpler to understand. Simplify the step to commit the binaries binaries by deleting all existing native binaries in the repo before they are build and then just committing all new, deleted and changed files. Also skip version increment tasks that change nothing (i.e. the major- and minor swt-version value are unchanged and thus the entire version.txt is not updated in the automated pipeline. Remove the 'check_fragment_libraries' task without replacement since it is not useful anymore. Part of eclipse-platform#513 Fixes eclipse-platform#626
This avoids the need for a Java-11 JRE to run Javascript in the pipeline and moves the file changes and git actions into one common place, making it simpler to understand. Simplify the step to commit the binaries binaries by deleting all existing native binaries in the repo before they are build and then just committing all new, deleted and changed files. Also skip version increment tasks that change nothing (i.e. the major- and minor swt-version value are unchanged and thus the entire version.txt is not updated in the automated pipeline. Remove the 'check_fragment_libraries' task without replacement since it is not useful anymore. Part of eclipse-platform#513 Fixes eclipse-platform#626
This avoids the need for a Java-11 JRE to run Javascript in the pipeline and moves the file changes and git actions into one common place, making it simpler to understand. Simplify the step to commit the binaries binaries by deleting all existing native binaries in the repo before they are build and then just committing all new, deleted and changed files. Also skip version increment tasks that change nothing (i.e. the major- and minor swt-version value are unchanged and thus the entire version.txt is not updated in the automated pipeline. Remove the 'check_fragment_libraries' task without replacement since it is not useful anymore. Part of eclipse-platform#513 Fixes eclipse-platform#626
This avoids the need for a Java-11 JRE to run Javascript in the pipeline and moves the file changes and git actions into one common place, making it simpler to understand. Simplify the step to commit the binaries binaries by deleting all existing native binaries in the repo before they are build and then just committing all new, deleted and changed files. Also skip version increment tasks that change nothing (i.e. the major- and minor swt-version value are unchanged and thus the entire version.txt is not updated in the automated pipeline. Remove the 'check_fragment_libraries' task without replacement since it is not useful anymore. Part of eclipse-platform#513 Fixes eclipse-platform#626
This avoids the need for a Java-11 JRE to run Javascript in the pipeline and moves the file changes and git actions into one common place, making it simpler to understand. Simplify the step to commit the binaries binaries by deleting all existing native binaries in the repo before they are build and then just committing all new, deleted and changed files. Also skip version increment tasks that change nothing (i.e. the major- and minor swt-version value are unchanged and thus the entire version.txt is not updated in the automated pipeline. Remove the 'check_fragment_libraries' task without replacement since it is not useful anymore. Part of eclipse-platform#513 Fixes eclipse-platform#626
This avoids the need for a Java-11 JRE to run Javascript in the pipeline and moves the file changes and git actions into one common place, making it simpler to understand. Simplify the step to commit the binaries binaries by deleting all existing native binaries in the repo before they are build and then just committing all new, deleted and changed files. Also skip version increment tasks that change nothing (i.e. the major- and minor swt-version value are unchanged and thus the entire version.txt is not updated in the automated pipeline. Remove the 'check_fragment_libraries' task without replacement since it is not useful anymore. Part of eclipse-platform#513 Fixes eclipse-platform#626
This avoids the need for a Java-11 JRE to run Javascript in the pipeline and moves the file changes and git actions into one common place, making it simpler to understand. Simplify the step to commit the binaries binaries by deleting all existing native binaries in the repo before they are build and then just committing all new, deleted and changed files. Also skip version increment tasks that change nothing (i.e. the major- and minor swt-version value are unchanged and thus the entire version.txt is not updated in the automated pipeline. Remove the 'check_fragment_libraries' task without replacement since it is not useful anymore. Part of eclipse-platform#513 Fixes eclipse-platform#626
This avoids the need for a Java-11 JRE to run Javascript in the pipeline and moves the file changes and git actions into one common place, making it simpler to understand. Simplify the step to commit the binaries binaries by deleting all existing native binaries in the repo before they are build and then just committing all new, deleted and changed files. Also skip version increment tasks that change nothing (i.e. the major- and minor swt-version value are unchanged and thus the entire version.txt is not updated in the automated pipeline. Remove the 'check_fragment_libraries' task without replacement since it is not useful anymore. Part of eclipse-platform#513 Fixes eclipse-platform#626
This avoids the need for a Java-11 JRE to run Javascript in the pipeline and moves the file changes and git actions into one common place, making it simpler to understand. Simplify the step to commit the binaries binaries by deleting all existing native binaries in the repo before they are build and then just committing all new, deleted and changed files. Also skip version increment tasks that change nothing (i.e. the major- and minor swt-version value are unchanged and thus the entire version.txt is not updated in the automated pipeline. Remove the 'check_fragment_libraries' task without replacement since it is not useful anymore. Part of eclipse-platform#513 Fixes eclipse-platform#626
This avoids the need for a Java-11 JRE to run Javascript in the pipeline and moves the file changes and git actions into one common place, making it simpler to understand. Simplify the step to commit the binaries binaries by deleting all existing native binaries in the repo before they are build and then just committing all new, deleted and changed files. Also skip version increment tasks that change nothing (i.e. the major- and minor swt-version value are unchanged and thus the entire version.txt is not updated in the automated pipeline. Remove the 'check_fragment_libraries' task without replacement since it is not necessary anymore. Part of eclipse-platform#513 Fixes eclipse-platform#626
This avoids the need for a Java-11 JRE to run Javascript in the pipeline and moves the file changes and git actions into one common place, making it simpler to understand. Simplify the step to commit the binaries binaries by deleting all existing native binaries in the repo before they are build and then just committing all new, deleted and changed files. Also skip version increment tasks that change nothing (i.e. the major- and minor swt-version value are unchanged and thus the entire version.txt is not updated in the automated pipeline. Remove the 'check_fragment_libraries' task without replacement since it is not necessary anymore. Part of #513 Fixes #626
The build of SWT now doesn't use ANT-scripts anymore, only very few executions of the maven-antrun-plugin are left, but those don't require JavaScript and there is ot ANT script left in |
Nashorn JavaScript Engine was removed in Java 15, see https://openjdk.org/jeps/372
However, SWT build still uses it in ant file:
See
eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml
Line 371 in c26d1ff
eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml
Line 385 in c26d1ff
eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml
Line 415 in c26d1ff
This has to be solved if we want to get rid of Java 11 in SWT.
Once that is done, we also can change
Jenkinsfile
Beside supporting ant execution on 11, Jenkinsfile uses different JDK 11 versions also in other places, see this comment.
and following places:
eclipse.platform.swt/Jenkinsfile
Line 143 in 04678a2
eclipse.platform.swt/Jenkinsfile
Line 146 in 04678a2
eclipse.platform.swt/Jenkinsfile
Line 148 in 04678a2
The text was updated successfully, but these errors were encountered: