Proposal: Newer version-string scheme for the Java SE Platform and the JDK (original) (raw)

mark.reinhold at oracle.com mark.reinhold at oracle.com
Thu Nov 2 15:11:48 UTC 2017


Here's a specific proposal, with commentary, and two questions.

Summary: This is a time-based scheme, similar to alternative (C) in my earlier note [1][2] but even closer to the current scheme as defined in JEP 223 [3]. It's hence even less likely to surprise, and should be easier to adopt.

                              * * *

Version numbers

A version number, $VNUM, is a sequence of numerals of arbitrary length, separated by period characters. The first four numerals are interpreted as follows:

<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>F</mi><mi>E</mi><mi>A</mi><mi>T</mi><mi>U</mi><mi>R</mi><mi>E</mi><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">FEATURE.</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6833em;"></span><span class="mord mathnormal" style="margin-right:0.05764em;">FE</span><span class="mord mathnormal">A</span><span class="mord mathnormal" style="margin-right:0.13889em;">T</span><span class="mord mathnormal" style="margin-right:0.10903em;">U</span><span class="mord mathnormal" style="margin-right:0.05764em;">RE</span><span class="mord">.</span></span></span></span>INTERIM.$UPDATE.$EMERG

where:

The fifth and later elements of version numbers are reserved for use by downstream consumers of the JDK code base. The fifth element may be used to, e.g., identify implementor-specific patch releases.

This is primarily a time-based scheme, since $FEATURE is incremented every six months regardless of release content and, for each feature release, $UPDATE is incremented every three months. We do expect most feature releases to contain at least one or two significant features, and never to ship interim releases under the new release model, so in practice this scheme will often be very similar to a compatibility- or significance-oriented scheme like that of JEP 223. JDK 10 is a feature release, JDK 10.0.1 and 10.0.2 are update releases with compatible bug fixes, and there is no interim JDK 10.1 release since in this model the next opportunity to add features is JDK 11.

Version strings

The overall format of version strings is unchanged. A version string is a version number, $VNUM, optionally followed by pre-release, build, and other optional information, one of:

<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>V</mi><mi>N</mi><mi>U</mi><mi>M</mi><mo stretchy="false">(</mo><mo>−</mo></mrow><annotation encoding="application/x-tex">VNUM(-</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.22222em;">V</span><span class="mord mathnormal" style="margin-right:0.10903em;">N</span><span class="mord mathnormal" style="margin-right:0.10903em;">U</span><span class="mord mathnormal" style="margin-right:0.10903em;">M</span><span class="mopen">(</span><span class="mord">−</span></span></span></span>PRE)?\+$BUILD(-$OPT)?
<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>V</mi><mi>N</mi><mi>U</mi><mi>M</mi><mo>−</mo></mrow><annotation encoding="application/x-tex">VNUM-</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7667em;vertical-align:-0.0833em;"></span><span class="mord mathnormal" style="margin-right:0.22222em;">V</span><span class="mord mathnormal" style="margin-right:0.10903em;">N</span><span class="mord mathnormal" style="margin-right:0.10903em;">U</span><span class="mord mathnormal" style="margin-right:0.10903em;">M</span><span class="mord">−</span></span></span></span>PRE(-$OPT)?
<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>V</mi><mi>N</mi><mi>U</mi><mi>M</mi><mo stretchy="false">(</mo><mo>+</mo><mo>−</mo></mrow><annotation encoding="application/x-tex">VNUM(+-</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathnormal" style="margin-right:0.22222em;">V</span><span class="mord mathnormal" style="margin-right:0.10903em;">N</span><span class="mord mathnormal" style="margin-right:0.10903em;">U</span><span class="mord mathnormal" style="margin-right:0.10903em;">M</span><span class="mopen">(</span><span class="mord">+</span><span class="mord">−</span></span></span></span>OPT)?

where PREisapre−releaseidentifier(e.g.,‘ea‘),PRE is a pre-release identifier (e.g., ea), PREisaprereleaseidentifier(e.g.,ea),BUILD is a build number, and $OPT is optional build information.

Implementors who offer long-term support for a release should use an $OPT string that starts with "lts", e.g., 11.0.2+13-lts.

System properties

To the system properties mentioned in JEP 223 we add one new property:

java.version.date -- The GA date of this version, in ISO-8601 YYYY-MM-DD format. For EA releases this will be the intended GA date, i.e., some date in the future. This value is not part of the version string per se, but it will be displayed when useful and can be retrieved via a new method on the Runtime.Version API.

This new property makes it easy to figure out how old a release is, so that as a user you can understand how far behind you are. It also reflects the security level of the release: A given GA release contains the latest security fixes if its version date is no earlier than that of any other GA release.

Launcher

The java launcher will display version strings and system properties as follows, for a hypothetical build 13 of JDK 10.0.1:

$ java --version
openjdk 10.0.1 2018-04-19
OpenJDK Runtime Environment (build 10.0.1+13)
OpenJDK 64-Bit Server VM (build 10.0.1+13, mixed mode)
$ 

Similarly, for a hypothetical build 42 of JDK 11, an LTS release:

$ java --version
openjdk 11 2018-09-20 LTS
OpenJDK Runtime Environment (build 11+42-lts)
OpenJDK 64-Bit Server VM (build 11+42-lts, mixed mode)
$ 

                              * * *

If you've read this far, two questions:

(1) Bearing in mind that no version-string scheme is ideal, is this scheme acceptable?

(2) If this scheme is not acceptable then please explain why, and identify exactly what you would change.

Ground rules, as before: I'll give much greater weight to your first reply to this message than to any other, I'll ignore replies-to-replies, and I'll heavily discount replies that quote more text than add new text of their own.

I'll summarize relevant replies in about a week, and then draft a JEP.

[1] http://mail.openjdk.java.net/pipermail/jdk-dev/2017-October/000007.html [2] http://mail.openjdk.java.net/pipermail/jdk-dev/2017-November/000088.html [3] http://openjdk.java.net/jeps/223



More information about the jdk-dev mailing list