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

Disable Gradle Module Metadata resolution #11789

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

ejona86
Copy link
Member

@ejona86 ejona86 commented Dec 27, 2024

The module metadata in Guava causes the -jre version to be selected even when you choose the -android version. Gradle did not give any clues that this was happening, and while
println(configurations.compileClasspath.resolve()) shows the different jar in use, most other diagonstics don't. dependencyInsight can show you this is happening, but only if you know which dependency has a problem and read Guava's module metadata first to understand the significance of the results.

You could argue this is a Guava-specific problem. I was able to get parts of our build working with attributes and resolutionStrategy configurations mentioned at
https://github.com/google/guava/releases/tag/v32.1.0 , so that only Guava would be changed. But it was fickle giving poor error messages or silently swapping back to the -jre version.

Given the weak debuggability, the added complexity, and the lack of value module metadata is providing us, disabling module metadata for our entire build seems prudent.

See google/guava#7575

CC @kannanjgithub, @cpovirk

The module metadata in Guava causes the -jre version to be selected even
when you choose the -android version. Gradle did not give any clues that
this was happening, and while
`println(configurations.compileClasspath.resolve())` shows the different
jar in use, most other diagonstics don't. dependencyInsight can show you
this is happening, but only if you know which dependency has a problem
and read Guava's module metadata first to understand the significance of
the results.

You could argue this is a Guava-specific problem. I was able to get
parts of our build working with attributes and resolutionStrategy
configurations mentioned at
https://github.com/google/guava/releases/tag/v32.1.0 , so that only
Guava would be changed. But it was fickle giving poor error messages or
silently swapping back to the -jre version.

Given the weak debuggability, the added complexity, and the lack of
value module metadata is providing us, disabling module metadata for our
entire build seems prudent.

See google/guava#7575
@ejona86 ejona86 requested a review from larry-safran December 27, 2024 20:05
@ejona86 ejona86 merged commit b272f63 into grpc:master Jan 3, 2025
16 checks passed
@ejona86 ejona86 deleted the death-to-module-metadata branch January 3, 2025 17:29
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

Successfully merging this pull request may close these issues.

2 participants