Silence the pkl-gradle pom metadata warning - #1840
Open
HuzaifaChaudary wants to merge 1 commit into
Open
Conversation
the runtimeOnly dependency picks the shaded pkl-tools variant with a gradle attribute and a pom cannot express that, so every publish prints a warning about information being lost only gradle consumes a gradle plugin and the module metadata still carries the attribute, so nothing is actually lost. the generated pom is byte identical before and after, the warning is the only thing that goes away
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1743
the warning
every publish of
pkl-gradleprints:it comes from the deliberate declaration in
pkl-gradle.gradle.kts:runtimeOnly(projects.pklTools) { attributes { attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.SHADOWED)) } }a pom has no way to express a variant attribute, so gradle warns that it is dropping one.
why silencing is the right answer here rather than papering over
i checked what is actually lost before suppressing anything.
the pom still declares the dependency. it is not missing, only the variant selection is:
the module metadata keeps the attribute:
and only gradle consumes a gradle plugin. the warning itself says the module file is unaffected, and that is the file gradle reads. there is no maven build resolving
pkl-gradleas a library, so the pom limitation has no consumer to hurt.so the information gradle is warning about is genuinely not needed by anyone who consumes this artifact, which is the case
suppressPomMetadataWarningsForexists for.verification
bundling: shadowedthe diff is ten lines in one file and changes nothing that gets published.
built and verified against
mainat1208fa9with the repo's own gradle toolchain, jdk 25.0.2.disclaimer: this contribution was prepared with the assistance of an ai agent. i reproduced the warning first, diffed the generated pom to confirm the published artifact is unchanged, and checked the module metadata myself before opening this.