RFR: 8276654: element-list order is non deterministic
Andrew Leonard
aleonard at openjdk.java.net
Fri Nov 5 17:01:10 UTC 2021
On Fri, 5 Nov 2021 16:15:02 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
>> Fixes: https://bugs.openjdk.java.net/browse/JDK-8276654
>>
>> A intermittent problem with the make dependencies means the jdk.javadoc element-list-.txt generation can remove the src defined element|package-list-<7,8,9,10>.txt files.
>> Recreatable by using --with-jobs=1 causing jdk.javadoc "gendata" to always occur after "java" module build dependency.
>> This fix puts a dependency of jdk.javadoc-java on jdk.javadoc-gendata to avoid this.
>>
>> Signed-off-by: Andrew Leonard <anleonar at redhat.com>
>
> Good catch, but wouldn't it be better if we could fix the recipe in jdk.javadoc/Gendata.gmk to only delete the files it intends to create. If I understand what files are created where correctly, you could generate a glob for the rm statement using something like this:
>
> $(RM) $(ELEMENT_LISTS_DIR)/element-list-{$(call CommaList,$(call sequence,11,$(VERSION_FEATURE)))}.txt
> @erikj79 Ah, we have a `sequence` function! I forgot about it. My initial reaction was also to prefer fixing the recipe to not delete non-related files, but I could not find a nice and not too overly complicated way of doing it.
>
> I agree that this is a better solution.
@erikj79 Yes, I thought that to start with, but exactly as @magicus said, I couldn't figure and simple/non-complex way in gnu make language to fix it there either!
> Good catch, but wouldn't it be better if we could fix the recipe in jdk.javadoc/Gendata.gmk to only delete the files it intends to create. If I understand what files are created where correctly, you could generate a glob for the rm statement using something like this:
>
> $(RM) $(ELEMENT_LISTS_DIR)/element-list-{$(call CommaList,$(call sequence,11,$(VERSION_FEATURE)))}.txt
I'll give that a try, cheers
-------------
PR: https://git.openjdk.java.net/jdk/pull/6278
More information about the build-dev
mailing list