[Bug] javac gives non-deterministic output (for sealed interface with records)
Jim Laskey
james.laskey at oracle.com
Tue Dec 19 08:56:10 UTC 2023
This is very good. Thanks for isolating. This is the sort of thing that is easily missed because of the subtlety and could lead to days of searching.
On 19 Dec 2023, at 04:48, Przemek Bielicki <pbielicki at gmail.com> wrote:
Oh damn! I think IDEA's decompiler helped a little with the explanation of the meaning of the order.
As you can see from the attached screenshot the order of permits differ:
permits GradleExecGraphNodeExecutionInfo.Task, GradleExecGraphNodeExecutionInfo.Transform {
vs.
permits GradleExecGraphNodeExecutionInfo.Transform, GradleExecGraphNodeExecutionInfo.Task {
I guess this structure (collection of permits?) is handled by the compiler using some sort of Set instead of a List thus we get a non-deterministic order.
My fellow Gradle colleagues told me that they discovered such non-determinisms in the past and the reasons were very similar.
I hope it's helpful and can unblock you from digging deeper? 🤞🏻
What's interesting is that javap isn't showing this difference. 🤔
Cheers,
Przemek
[idea_decompiled.png]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20231219/33db0824/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: idea_decompiled.png
Type: image/png
Size: 166235 bytes
Desc: idea_decompiled.png
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20231219/33db0824/idea_decompiled-0001.png>
More information about the compiler-dev
mailing list