halcyon / asdf-java

A Java plugin for asdf-vm.
MIT License
454 stars 86 forks source link

Make openJDK's JVM variants distinguishable when using asdf's `latest[:<version>]` syntax. #57

Open MrPilotMan opened 4 years ago

MrPilotMan commented 4 years ago

With how the versions are currently named, there seems to be no way to distinguish between openJDK's openJ9 and HotSpot JVM variants.

Listing all available versions...

asdf list all java adopt-openjdk-13

Yields

adopt-openjdk-13+33
adopt-openjdk-13.0.1+9
adopt-openjdk-13.0.2+8
adopt-openjdk-13+33_openj9-0.16.0
adopt-openjdk-13.0.1+9.1_openj9-0.17.0
adopt-openjdk-13.0.1+9_openj9-0.17.0
adopt-openjdk-13.0.2+8_openj9-0.18.0
adopt-openjdk-13+33_openj9-0.16.0_large-heap
adopt-openjdk-13.0.1+9.1_openj9-0.17.0_large-heap
adopt-openjdk-13.0.1+9_openj9-0.17.0_large-heap
adopt-openjdk-13.0.2+8_openj9-0.18.0_large-heap  

however...

asdf latest java adopt-openjdk-13

yields

adopt-openjdk-13.0.2+8_openj9-0.18.0_large-heap

So, if you were to run asdf install java latest:adopt-openjdk-13 you will install the version above.

Since the version number will increment with every release, and the JVM variant and large_heap option is on the right side of the version number, you cannot currently use asdf's latest[:<version>] syntax if you do not want the openj9 JVM variant with the large_heap option.

It would be nice to change the version naming scheme so the JVM variant and large_heap options appears on the left side of the version number, making different versions of the same release distinguishable, and asdf's latest[:<version>] syntax useable.

For example...

adopt-openjdk-13.0.2+8
adopt-openjdk-openj9-13.0.2+8-0.18.0
adopt-openjdk-openj9-large_heap-13.0.2+8-0.18.0