RFR: JDK-8272984: javadoc support for reproducible builds
Jonathan Gibbons
jjg at openjdk.java.net
Fri Jan 21 16:16:43 UTC 2022
On Fri, 21 Jan 2022 08:04:03 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Please review a javadoc update to support a new `--date` option to support reproducible builds.
>>
>> This pull request supersedes https://github.com/openjdk/jdk/pull/6905. In that PR, the `SOURCE_DATE_EPOCH` environment variable was used to provide the time stamp, but review feedback suggested the use of a new command-line option, `--date`. The format of the argument of the `--date` option is that same as that of similar options for the _jar_ and _jmod_ tools, and the code to handle the value is based on code in the _jar_ tool.
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java line 356:
>
>> 354:
>> 355: new XOption(resources, "--date", 1) {
>> 356: // Valid --date range: within a year of now
>
> Adding "--date" looks reasonable and makes it consistent with jar/jmod. I'm just not sure about restricting the date to "within a year of now". I assume projects will use the SOURCE_DATE_EPOCH to create a value for --date so they will run into issues if someone tries to build the project again, in a year.
I'll change the range to 10 years.
I was expecting that the common use of reproducible builds was to compare builds created within a reasonably short period of time. I was wanting to set a range that was less than the seemingly arbitrary range of 1980-2099 allowed by the jar tool.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7171
More information about the javadoc-dev
mailing list