Skip to content

fix(spin-java-module): downgrade routine external-require misses from warn to diagnostic - #174

Merged
deer merged 1 commit into
mainfrom
better_logging_and_cleanup
Aug 3, 2026
Merged

fix(spin-java-module): downgrade routine external-require misses from warn to diagnostic#174
deer merged 1 commit into
mainfrom
better_logging_and_cleanup

Conversation

@deer

@deer deer commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

AbstractDetectResolution previously logged every unresolved external requires clause at warn, including the case where ModuleCatalog#getArtifact simply didn't recognize a candidate module name. That case is expected and constant: PomBasedTestModuleDescriptor/PomBasedTestModuleCatalog synthesize several naming-convention candidates per dependency via MavenModuleNaming#deriveNames, and only one of them is ever real, so the rest miss on every dependency in every project. Logging that at warn buried the rare, actionable miss under harmless noise.

The require-resolution logic is now extracted into a static, unit-testable resolveExternalArtifact method. It still logs at warn when a version can't be determined for a require, and it now distinguishes two kinds of catalog miss: a module name the catalog has never heard of logs at diagnostic, while a module name the catalog does know but at a version that doesn't match what was requested (usually a stale version.properties pin) still logs at warn, and now also names the versions the catalog does have.

This split caught a real instance of the exact problem it was built to surface: version.properties pinned org.mockito* to 2.19.0, but module-catalog.properties had no matching entry, so the pin is corrected to 5.23.0 with a matching catalog entry added.

@deer
deer merged commit 81c6291 into main Aug 3, 2026
1 check passed
@deer
deer deleted the better_logging_and_cleanup branch August 3, 2026 10:45
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.

1 participant