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

Tycho should find Toolchain JRE by version #276

Closed
laeubi opened this issue Sep 16, 2021 · 2 comments · Fixed by #995
Closed

Tycho should find Toolchain JRE by version #276

laeubi opened this issue Sep 16, 2021 · 2 comments · Fixed by #995
Milestone

Comments

@laeubi
Copy link
Member

laeubi commented Sep 16, 2021

Currently if there is a toolchain configured this way:

    <toolchain>
        <type>jdk</type>
        <provides>
            <version>1.8</version>
        </provides>
        <configuration>
            <jdkHome>${env.JAVA_HOME_8_X64}</jdkHome>
        </configuration>
    </toolchain>

Tycho fails to find this jdk with useJDK = BREE configured, but no toolchain of type 'jdk' with id 'JavaSE-1.8' it would be good if tycho (when not finding a jdk by id) simply search one of type jdk+version=1.8 in this case

@akurtakov
Copy link
Member

Will work for pre 1.8 JVMs but IMHO it's time to stop care about them at all.
For 1.8 it will mismatch with compact profiles http://openjdk.java.net/jeps/161 .
For Java 9 and 10 - they are effectively dead now.
For Java 11+ aka modular Java BREE profiles no longer contain list of packages provided as this is runtime detected due to modularity.
With all that said - matching based on jdk+version for modular Java would make builds riskier and for old Java versions wouldn't benefit anyone as people either have figured this out already or won't bother supporting so old jvms for new stuff.

@laeubi
Copy link
Member Author

laeubi commented Sep 16, 2021

But especially for the auto detection there is a need to define toolchain (at laest tycho complains if none is found).

[WARNING] No system packages found in profile nor toolchain for JavaSE-16, using current JRE system packages.
This can cause faulty dependency resolution, consider adding a definition for a 'jdk' with id=JavaSE-16 in your toolchains.xml

So this would require a jdk with id = JavaSE-16 instead I think it would be valid to also considder an JDK with version = 16

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

Successfully merging a pull request may close this issue.

3 participants