Skip to content

Disable Gradle Module Metadata resolution#11789

Merged
ejona86 merged 1 commit into
grpc:masterfrom
ejona86:death-to-module-metadata
Jan 3, 2025
Merged

Disable Gradle Module Metadata resolution#11789
ejona86 merged 1 commit into
grpc:masterfrom
ejona86:death-to-module-metadata

Conversation

@ejona86

@ejona86 ejona86 commented Dec 27, 2024

Copy link
Copy Markdown
Member

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
@ejona86
ejona86 deleted the death-to-module-metadata branch January 3, 2025 17:29
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants