On Thu, 10 Feb 2022 15:52:50 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

>> Current adhoc version build strings are not ideal. Some of the problems:
>>  * A build number of "0" is inserted, which make the version string look 
>> like it's an official build, at least when not reading carefully
>>  * The version string gives little indication on what source code the build 
>> was based
>> 
>> Also, an error was discovered in how the build system generates version 
>> strings without a build number (since this basically never happened before). 
>> A version without a build number,  and without a PRE value, but with an OPT 
>> value, should have a "+-" separator, according to JEP 223. While this was 
>> correctly handled, the "+-" separator was also applied to versions without a 
>> build, but with both PRE and OPT. In this case, the "+" should be omitted, 
>> according to JEP 223. This bug is fixed by this commit.
>> 
>> Ideally, the adhoc version string should include something along the lines 
>> of the output of `git describe`. However, since the version string is set at 
>> configure time, not build time, this will almost immediately become 
>> misleading. :-( A substitute is proposed in this patch, where the branch 
>> name is included in the OPT string (if it's not `master`).
>> 
>> Finally, this patch fixes hotspot so it can properly build without a build 
>> number. This was the last blocker for why the build system always required 
>> the "0" as build number before. To facilitate interoperability with external 
>> tools (like jib) that still sets build number to "0" to really signal "no 
>> build number", a build number exactly matching "0" will be interpreted as 
>> having no build number.
>
> Magnus Ihse Bursie has updated the pull request incrementally with two 
> additional commits since the last revision:
> 
>  - Remove "build 0" from GHA builds
>  - Warn that build 0 is "no build"

This was more problematic than expected. Two tests made unfounded assumptions 
about version string format; one was simple to fix but the other tricky to 
track down, since I initially could not reproduce it locally but only in our CI 
testing. (It turned out that this was since the CI testing made a specially 
formatted version string.) 

The GHA actions all made use of "--with-version-build=0", and thus all of them 
failed when trying to upload builds. It took me a while to realize that this 
was due to file names with version strings in them, and not general shakiness 
of the GHA builds.

I think this is finally ready for review now. :-)

-------------

PR: https://git.openjdk.java.net/jdk/pull/6152

Reply via email to