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

Overlap between checker-qual and shaded dataflow jars #6795

Open
cushon opened this issue Sep 11, 2024 · 0 comments
Open

Overlap between checker-qual and shaded dataflow jars #6795

cushon opened this issue Sep 11, 2024 · 0 comments
Assignees

Comments

@cushon
Copy link
Contributor

cushon commented Sep 11, 2024

The shaded dataflow jars contain some classes that are also present in checker-qual, and classes are different for a given release. (The differences are mainly reordered constant pool entries, perhaps because the jar is processed as part of the shading process.)

Would it be possible to have the shaded dataflow jars depend on checker-qual instead of redeclaring the classes?

I noticed this because of tooling that checks classpaths to ensure that the classes are unique (or at least that duplicate classes are exactly the same), to help prevent issues from classpath version conflicts.

$ comm -1 -2 <(jar tf checker-qual-3.47.0.jar | sort) <(jar tf dataflow-errorprone-3.47.0.jar | sort) | grep 'class$'
module-info.class
org/checkerframework/dataflow/qual/AssertMethod.class
org/checkerframework/dataflow/qual/Deterministic.class
org/checkerframework/dataflow/qual/Impure.class
org/checkerframework/dataflow/qual/Pure$Kind.class
org/checkerframework/dataflow/qual/Pure.class
org/checkerframework/dataflow/qual/SideEffectFree.class
org/checkerframework/dataflow/qual/TerminatesExecution.class
$ diff <(javap -v -p -cp dataflow-errorprone-3.47.0.jar "org/checkerframework/dataflow/qual/SideEffectFree") <(javap -v -p -cp checker-qual-3.47.0.jar "org/checkerframework/dataflow/qual/SideEffectFree")
1c1
< Classfile jar:file:///tmp/tmp.CwxAYnI9TX/dataflow-errorprone-3.47.0.jar!/org/checkerframework/dataflow/qual/SideEffectFree.class
---
> Classfile jar:file:///tmp/tmp.CwxAYnI9TX/checker-qual-3.47.0.jar!/org/checkerframework/dataflow/qual/SideEffectFree.class
3c3
<   SHA-256 checksum 7aa24a8e2e4e41d4fe1b46773f27f1aa57511fdba4c57c5c7122cfa5db3a1ab9
---
>   SHA-256 checksum befc9209fd8db3562bf9c1be8d035fdc9850a6aacbe61643dbfed7a84f6fe1ff
9,10c9,10
<   this_class: #2                          // org/checkerframework/dataflow/qual/SideEffectFree
<   super_class: #4                         // java/lang/Object
---
>   this_class: #1                          // org/checkerframework/dataflow/qual/SideEffectFree
>   super_class: #3                         // java/lang/Object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants