Movatterモバイル変換


[0]ホーム

URL:


JEP 322: Time-Based Release Versioning

OwnerMark Reinhold
TypeFeature
ScopeSE
StatusClosed / Delivered
Release10
Componentcore-libs / java.lang
Discussionjdk dash dev at openjdk dot java dot net
EffortM
DurationS
Reviewed byAlan Bateman, Alex Buckley, Dalibor Topic, Iris Clark, John Rose
Endorsed byBrian Goetz
Created2017/11/30 17:51
Updated2021/01/06 22:40
Issue8192828

Summary

Revise the version-string scheme of the Java SE Platform and the JDK, andrelated versioning information, for present and future time-based releasemodels.

Goals

Non-Goals

It is not a goal to revise the existing version-string scheme toaccommodate requirements other than those related to time-based releasemodels.

It is not a goal to revise the version-report output of command-linetools other than thejava launcher. Doing so is desirable but notcritical, and can be done later on.

Motivation

The version-string scheme introduced byJEP 223 was a significantimprovement over that of the past. That scheme is not, however,well-suited to the future, in which we intend to ship new releases of theJava SE Platform and the JDK on astrict, six-month cadence.

The main difficulty with the JEP 223 scheme is that a release's versionnumber encodes its significance and compatibility relative to itspredecessors. In a time-based release model, however, these qualitiesare not known in advance. They are subject to change throughout arelease's development cycle, until the final feature is integrated.A release's version number is therefore also not known in advance.

With JEP 223's semantics of version numbers, everyone who works on arelease of the JDK, or builds or uses components on top of it, will haveto speak initially of the release's ship date and then switch to speakingof the version number, once it is known. Developers who maintainlibraries, frameworks, and tools will have to be prepared to change codethat inspects version numbers late in each and every JDK release cycle.This is awkward and confusing for all involved.

The principal change proposed here is, therefore, to recast versionnumbers to encode not compatibility and significance but, rather, thepassage of time, in terms of release cycles. This is a better fit fortime-based release models since each release cycle, and thus eachrelease's version number, is always known well in advance.

Description

Version numbers

Aversion number,$VNUM, is a non-empty sequence of elementsseparated by period characters (U+002E). An element is either zero, oran unsigned integer numeral without leading zeros. The final element ofa version number must not be zero. When an element is incremented, allsubsequent elements are removed. The format is:

[1-9][0-9]*((\.0)*\.[1-9][0-9]*)*

The sequence may be of arbitrary length but the first four elements areassigned specific meanings, as follows:

$FEATURE.$INTERIM.$UPDATE.$PATCH

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

A version number never has trailing zero elements. If an element and allthose that follow it logically have the value zero then all of them areomitted.

The sequence of numerals in a version number is compared to another suchsequence in numerical, pointwise fashion;e.g.,10.0.4 is less than10.1.2. If one sequence is shorter than another then the missingelements of the shorter sequence are considered to be less than thecorresponding elements of the longer sequence;e.g.,10.0.2 is lessthan10.0.2.1.

Version numbers in the six-month release model

Under thesix-month release model the elements of versionnumbers vary as follows:

We do expect most feature releases to contain at least one or twosignificant features, and for update releases never to includeincompatible changes. In combination with the fact that$INTERIM isalways zero, in practice this scheme will often define version numbersthat are not much different from what the JEP 223 scheme would havedefined.

Version strings

The overall format of version strings is the same as that defined inJEP 223. A version string is a version number,$VNUM,possibly followed by pre-release, build, and other optional information,one of:

$VNUM(-$PRE)?\+$BUILD(-$OPT)?$VNUM-$PRE(-$OPT)?$VNUM(+-$OPT)?

where$PRE is a pre-release identifier (e.g.,ea),$BUILD is abuild number, and$OPT is optional build information.

If a release is part of a series of releases for which an implementoroffers long-term support then the value of$OPT should start with"LTS", e.g., 11.0.2+13-LTS. This will cause"LTS" to be displayedprominently in the output ofjava --version,etc., more on whichbelow.

API

We revise theRuntime.Version APIdefined by JEP 223 asfollows:

System properties

To the system properties mentioned inJEP 223 we add two newproperties:

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

This new property makes it possible for implementors to provideadditional version information as may be necessary to align with relatedproducts. An implementor whose product line uses,e.g., date-basedversions of the form$YEAR.$MONTH could set this property accordinglyso that their JDK releases are clearly related to their other releases.(This property is namedjava.vendor.version rather than the moreobviousjava.implementor.version in order to be consistent with theexisting system properties whose names includevendor.)

Launcher

Thejava launcher will display version strings and system properties asfollows, for a hypothetical build 13 of JDK 10.0.1:

$ java --versionopenjdk 10.0.1 2018-04-19OpenJDK 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 --versionopenjdk 11 2018-09-20 LTSOpenJDK Runtime Environment (build 11+42-LTS)OpenJDK 64-Bit Server VM (build 11+42-LTS, mixed mode)$

If an implementor assigns a vendor version string of,e.g.,18.9 to aJDK 11 LTS build then it would be displayed:

$ java --versionopenjdk 11 2018-09-20 LTSOpenJDK Runtime Environment 18.9 (build 11+42-LTS)OpenJDK 64-Bit Server VM 18.9 (build 11+42-LTS, mixed mode)$

In detail, the output of thejavalauncher's version-report options will be formatted as follows, where${LTS} expands to"\u0020LTS" if the first three characters of$OPTare"LTS", and${JVV} expands to"\u0020${java.vendor.version}" ifthat system property is defined:

$ java --versionopenjdk ${java.version} ${java.version.date}${LTS}${java.runtime.name}${JVV} (build ${java.runtime.version})${java.vm.name}${JVV} (build ${java.vm.version}, ${java.vm.info})$ $ java --show-version < ... >openjdk ${java.version} ${java.version.date}${LTS}${java.runtime.name}${JVV} (build ${java.runtime.version})${java.vm.name}${JVV} (build ${java.vm.version}, ${java.vm.info})[ ... ]$ $ java --full-versionopenjdk ${java.runtime.version}$ $ java -versionopenjdk version \"${java.version}\" ${java.version.date}${LTS}${java.runtime.name}${JVV} (build ${java.runtime.version})${java.vm.name}${JVV} (build ${java.vm.version}, ${java.vm.info})$ $ java -showversion < ... >openjdk version \"${java.version}\" ${java.version.date}${LTS}${java.runtime.name}${JVV} (build ${java.runtime.version})${java.vm.name}${JVV} (build ${java.vm.version}, ${java.vm.info})[ ... ]$ $ java -fullversionopenjdk full version \"${java.runtime.version}\"$

@since JavaDoc tag

The value used with the@since JavaDoc tag continues to be aligned withthe system propertyjava.specification.version, hence APIs introducedin JDK 10 will be tagged@since 10.

Mercurial changeset tags

The general syntax for the Mercurial tags that identify promoted buildsis unchanged:jdk\-$VNUM\+$BUILD.

Build configuration and output

Three existing version-related configuration options will be deprecatedand hence ignored, and the related Make variables will no longer bedefined:

--with-version-major          VERSION_MAJOR--with-version-minor          VERSION_MINOR--with-version-security       VERSION_SECURITY

Five new options, and corresponding variables, will be defined:

--with-version-feature        VERSION_FEATURE--with-version-interim        VERSION_INTERIM--with-version-update         VERSION_UPDATE--with-version-date           VERSION_DATE--with-vendor-version-string  VENDOR_VERSION_STRING

(There is no need to define--with-version-patch andVERSION_PATCH,since they already exist.)

Therelease file written into the root of a JDK image will, in additionto defining the existingJAVA_VERSION variable, also defineJAVA_VERSION_DATE with the value of thejava.version.date systemproperty, andIMPLEMENTOR_VERSION with the value of thejava.vendor.version system property, if defined.

Alternatives

Theproposal for the six-month time-based release modelsuggested that the version strings of feature releases be of the form$YEAR.$MONTH. Thus next year's March release would be 18.3, theSeptember release would be 18.9, and so on each year.

After reasonable objections were raised against this scheme wereviewed the various types of information encoded in version numbers and suggested some alternatives,thensummarized and responded to the discussion that followed,and finallypublished a proposal that was well received and hencebecame the basis for this JEP.

Testing

This newer version-string scheme is largely compatible with that definedbyJEP 223, so testing should be straightforward. The principaldifference is the potential use of the fourth element for emergency patchreleases, which may require some new unit-test cases. Changes to therelevant build-configuration options will require straightforward manualtesting.

Risks and Assumptions

The changes described here introduce three minor incompatibilities:

OpenJDK logo
Installing
Contributing
Sponsoring
Developers' Guide
Vulnerabilities
JDK GA/EA Builds
Mailing lists
Wiki ·IRC
Mastodon
Bluesky
Bylaws ·Census
Legal
Workshop
JEP Process
Source code
GitHub
Mercurial
Tools
Git
jtreg harness
Groups
(overview)
Adoption
Build
Client Libraries
Compatibility & Specification Review
Compiler
Conformance
Core Libraries
Governing Board
HotSpot
IDE Tooling & Support
Internationalization
JMX
Members
Networking
Porters
Quality
Security
Serviceability
Vulnerability
Web
Projects
(overview,archive)
Amber
Babylon
CRaC
Code Tools
Coin
Common VM Interface
Developers' Guide
Device I/O
Duke
Galahad
Graal
IcedTea
JDK 8 Updates
JDK 9
JDK (…,24,25,26)
JDK Updates
JMC
Jigsaw
Kona
Lanai
Leyden
Lilliput
Locale Enhancement
Loom
Memory Model Update
Metropolis
Multi-Language VM
Nashorn
New I/O
OpenJFX
Panama
Penrose
Port: AArch32
Port: AArch64
Port: BSD
Port: Haiku
Port: Mac OS X
Port: MIPS
Port: Mobile
Port: PowerPC/AIX
Port: RISC-V
Port: s390x
SCTP
Shenandoah
Skara
Sumatra
Tsan
Valhalla
Verona
VisualVM
Wakefield
Zero
ZGC
Oracle logo
© 2025 Oracle Corporation and/or its affiliates
Terms of Use · License:GPLv2 ·Privacy ·Trademarks

[8]ページ先頭

©2009-2025 Movatter.jp