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

Add module for Java 16 validation tests #1165

Merged
merged 3 commits into from May 28, 2021
Merged

Conversation

marchof
Copy link
Member

@marchof marchof commented Mar 19, 2021

Also remove preview features from Java 14 validation tests.

@marchof marchof requested a review from Godin March 19, 2021 10:08
@marchof marchof self-assigned this Apr 16, 2021
@marchof marchof added this to Implementation in Current work items via automation Apr 16, 2021
@marchof marchof moved this from Implementation to Review in Current work items Apr 16, 2021
@Godin
Copy link
Member

Godin commented May 27, 2021

@marchof currently InstanceofTest and RecordsTest are executed in following configurations

mvn package -Dbytecode.version=14 -Djdk.version=14
mvn package -Dbytecode.version=15 -Djdk.version=15
mvn package -Dbytecode.version=16 -Djdk.version=16
mvn package -Dbytecode.version=17 -Djdk.version=17

ie both as a preview feature in 14 and 15 and as a standard feature in 16+
so out of curiosity - why

Also remove preview features from Java 14 validation tests

? I guess this is because strategy in IDEs is to support preview features of latest release and stop supporting preview features of previous releases? Like Eclipse probably already did, and IntelliJ started to warn. Right?

@marchof
Copy link
Member Author

marchof commented May 27, 2021

@Godin Correct, the idea is to only test released features in the long run. To keep our test set maintainable we only test not-yet-released preview features primarily to prepare ourself and provide feedback to OpenJDK. I thought we discussed this once.

@Godin
Copy link
Member

Godin commented May 27, 2021

I thought we discussed this once.

oh, I see - https://groups.google.com/g/jacoco-dev/c/edIrAG85jho/m/k4c8_ZzIDwAJ
from which I remember part

On Monday, January 13, 2020 at 5:10:02 PM UTC+1 Marc R. Hoffmann wrote:
I needed some time to wrap my mind around the fact that it is now compiling successfully.
—> validation.java14 with JDK 15 is now compiled with to java 15 bytecode —> preview flag works :)
So reconsidering my earlier suggestion I would actually keep switch expressions and records in validation.java14 for now.

but not

Once features get official we can move them to the respective java version.

😆

@marchof
Copy link
Member Author

marchof commented May 27, 2021

@Godin I don't insist on this. We can also keep testing preview features. But given the fact the the respective Java versions are already EOL and we had version specific switches in our validation code from my point of view we can drop those preview tests.

@marchof
Copy link
Member Author

marchof commented May 27, 2021

Rebased and Maven versions fixed to get a green build.

@Godin Godin added this to the 0.8.8 milestone May 27, 2021
@Godin
Copy link
Member

Godin commented May 27, 2021

@marchof Also this PR reminded me about absence of validation test with Sealed Classes - if it was present, we would not have missed #1097 (comment) and would have detected the problem automatically earlier 😉 Sealed Classes are preview feature in 15 and 16 and will be finalized in 17 - https://openjdk.java.net/jeps/409 And since for them there is a special handling in https://openjdk.java.net/jeps/406 will be indeed simpler to add them in/after/together with #1191 than alone in org.jacoco.core.test.validation.java15, so that org.jacoco.core.test.validation.java17 will be the only one with --enable-preview 👍

And indeed seems that in IntelliJ IDEA 2021.1 ability to use Java 14 with preview features already not available:

And seems that in upcoming Eclipse 2021-06 ability to use preview features available only for Java 16:

@Godin Godin changed the title Add new project for Java 16 validation tests Add module for Java 16 validation tests May 28, 2021
@Godin Godin merged commit 9262844 into master May 28, 2021
Current work items automation moved this from Review to Done May 28, 2021
@Godin Godin deleted the java16-validation-tests branch May 28, 2021 00:06
@Godin
Copy link
Member

Godin commented May 28, 2021

@marchof oops, we almost both almost missed that it also should be added to java17-bytecode profile - #1194 😉

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

Successfully merging this pull request may close these issues.

None yet

2 participants