Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reproducible Builds issue with sealed interfaces bytecode #62

Open
hboutemy opened this issue May 15, 2024 · 2 comments
Open

Reproducible Builds issue with sealed interfaces bytecode #62

hboutemy opened this issue May 15, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@hboutemy
Copy link

reference: https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/com/io7m/cedarbridge/README.md

public sealed interface CBTypeExpressionType extends Formattable source code gives unpredictable order in bytecode

├── com/io7m/cedarbridge/schema/compiled/CBTypeExpressionType.class
│ ├── procyon -ec {}
│ │ @@ -1,9 +1,9 @@
│ │  
│ │  package com.io7m.cedarbridge.schema.compiled;
│ │  
│ │  import java.util.Formattable;
│ │  
│ │ -public sealed interface CBTypeExpressionType extends Formattable permits CBTypeExpressionType$CBTypeExprParameterType, CBTypeExpressionType$CBTypeExprNamedType, CBTypeExpressionType$CBTypeExprApplicationType
│ │ +public sealed interface CBTypeExpressionType extends Formattable permits CBTypeExpressionType$CBTypeExprNamedType, CBTypeExpressionType$CBTypeExprParameterType, CBTypeExpressionType$CBTypeExprApplicationType
│ │  {
│ │      boolean contains(final CBTypeParameterType p0);
│ │  }

I'm reporting here because your project is the first one I see that is affected, but I suppose you can' solve anything at your level.
The root cause is probably in the JDK compiler: I'll need to open a JDK issue

@io7m
Copy link
Member

io7m commented May 15, 2024

Thanks for letting me know!

I take it there's no mitigation available yet?

@io7m io7m self-assigned this May 15, 2024
@io7m io7m added the bug Something isn't working label May 15, 2024
@hboutemy
Copy link
Author

if nobody noticed the issue until now, nobody worked on it. I perfectly see how the compiler may use filesystem (unpredictable) order, and would require an explicit ordering. And I see how in theory a plugin could rework the bytecode after the initial creation of the .class file. But again, it all starts by detecting the fact, considering it an issue, and doing the workaround

First is to share the case with the JDK team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants