fix(spin-java-module): downgrade routine external-require misses from warn to diagnostic - #174
Merged
Merged
Conversation
… warn to diagnostic
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.
AbstractDetectResolutionpreviously logged every unresolved externalrequiresclause atwarn, including the case whereModuleCatalog#getArtifactsimply didn't recognize a candidate module name. That case is expected and constant:PomBasedTestModuleDescriptor/PomBasedTestModuleCatalogsynthesize several naming-convention candidates per dependency viaMavenModuleNaming#deriveNames, and only one of them is ever real, so the rest miss on every dependency in every project. Logging that atwarnburied the rare, actionable miss under harmless noise.The require-resolution logic is now extracted into a static, unit-testable
resolveExternalArtifactmethod. It still logs atwarnwhen 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 atdiagnostic, while a module name the catalog does know but at a version that doesn't match what was requested (usually a staleversion.propertiespin) still logs atwarn, 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.propertiespinnedorg.mockito*to2.19.0, butmodule-catalog.propertieshad no matching entry, so the pin is corrected to5.23.0with a matching catalog entry added.