Skip to content

Support new JDK 10 versioning scheme#3884

Closed
bmuschko wants to merge 1 commit intomasterfrom
bm/jdk-10-version-parsing
Closed

Support new JDK 10 versioning scheme#3884
bmuschko wants to merge 1 commit intomasterfrom
bm/jdk-10-version-parsing

Conversation

@bmuschko
Copy link
Copy Markdown
Contributor

Context

Starting with jdk-10+36 a date is added to the version output. The regex for the version parsing take this into consideration. We might want to think about using .* instead and ignore whatever changes the make to the versioning scheme after the actual version number to avoid future breakage.

It tried out the change manually with the following build script:

task helloWorld {
    doLast {
        println "Hello World!"
    }
}

...and the following commands:

$ java -version
java version "10-ea" 2018-03-20
Java(TM) SE Runtime Environment 18.3 (build 10-ea+36)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10-ea+36, mixed mode)

$ /Users/bmuschko/dev/tmp/gradle-source/bin/gradle hW
Parallel execution is an incubating feature.

> Task :helloWorld
Hello World!

BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed

Starting with jdk-10+36 a date is added to the version output.
@bmuschko bmuschko added a:bug This doesn't work as expected from:member labels Dec 21, 2017
@bmuschko bmuschko added this to the 4.5 RC1 milestone Dec 21, 2017
@bmuschko bmuschko self-assigned this Dec 21, 2017
Copy link
Copy Markdown
Contributor

@melix melix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, however I think you're right about using .+. Note that there's already JDK 11 around the corner.

However we have a contributor PR that takes the same approach as yours, but actually implements the JSR pattern: #3892

So I would merge his instead of yours. Note that I think it's not the only thing we need to fix to be JDK 10 compatible. This problem in particular will raise as soon as we snapshot files compiled with JDK 10: #3770

@bmuschko
Copy link
Copy Markdown
Contributor Author

However we have a contributor PR that takes the same approach as yours, but actually implements the JSR pattern: #3892

Thanks for the pointer. Seems like that came in after mine and covers more. Will merge that one.

This problem in particular will raise as soon as we snapshot files compiled with JDK 10: #3770

I am going to look at it in the next couple of days.

@bmuschko
Copy link
Copy Markdown
Contributor Author

Closing in lieu of #3892.

@bmuschko bmuschko closed this Dec 22, 2017
@bmuschko bmuschko deleted the bm/jdk-10-version-parsing branch December 22, 2017 15:37
@bmuschko bmuschko removed this from the 4.5 RC1 milestone Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:bug This doesn't work as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants