-
Notifications
You must be signed in to change notification settings - Fork 74
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
Investigate spring-cloud-gcp's sudden appearance of Linkage Errors #1983
Comments
ab54aa7#diff-8ec093dd0aeb6f8f90d1a302ed66b338523762974f0a8bf33afcd79bce6532a0 fixed the handling of the entry point JARs for BOM projects ( Spring-cloud-gcp applies the enforcer rule to a BOM project (
This meant that Linkage Checker was not working before 1.5.7 and now it reports errors. Next step: are they correct linkage errors? |
Optional DependenciesMost of them are caused by optional dependencies. Example:
nettyNetty optional dependencies will be suppressed by #1979 Example
UnknownKotlin
Groovy
netty-shadedThe netty-shaded classes have different package name than the netty rule above
reactivexSpring framework seems to have lots of invalid references without declaration of (even optional) dependencies.
Conflicts
java9+ java compiler option issue
This seems similar to protocolbuffers/protobuf#7827 |
@suztomo Do you have any updates on this? Are there any specific true positives we should be fixing? We would like to get our linkage check green. |
I'm afraid that I haven't come up with a good solution to resolve this. I've added some of the exclusions rule for netty classes (https://github.com/GoogleCloudPlatform/cloud-opensource-java/pull/1979/files; 2 weeks ago) but this is just few among ~260 (almost all false positive) errors. I'll update you by early next week. |
Let's remember we're trying to make this self-service. If something is preventing clients from diagnosing and fixing the problems themselves, then that's what we need to address. It's not feasible for us to investigate each linkage error individually. |
Can we have an option to ignore issues causes by dependencies being declared as optional? |
Unfortunately Spring-framework's pom.xml files do not have optional dependency information. Spring's pom.xml does not declare optional dependencies any more, even when the dependencies are present in their build.gradle. In past, I asked Spring team to add the optional dependency information to pom.xml (spring-projects/spring-framework#23234) but didn't succeed to persuade. |
It looks like many linkage errors in our case come from not taking optional dependencies into consideration, even though we are declaring them in our |
Linkage Checker can take filter file: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/Linkage-Checker-Enforcer-Rule#configuration Idea:
I'll create a PR to filter by package and classes. |
https://gist.github.com/suztomo/d40a4adc75882c6b4615ce8f3caf14c0
GoogleCloudPlatform/spring-cloud-gcp#371 is the PR that bumped the enforcer rule to 1.5.7.
CC: @meltsufin
The text was updated successfully, but these errors were encountered: