Fix doubled warnings being printed for manifest warnings when loading ports. #1466
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.
Resolves microsoft/vcpkg#24084
Resolves microsoft/vcpkg#34095
The root cause of this bug is the separation between the BaselineProvider and the PortfileProvider. For the built in registry, to determine what the baseline version for the builtin registry is, we must load and parse the requested port to read what version is declared in its JSON/CONTROL file. However, the interface by which the registry tells the calling code what to do passed only the directory with the port inside:
Thus, callers were forced to parse the files again, causing reemission of any warnings like bad SPDX expressions.
The fix is to push the parsing of the port files into
RegistryEntry
so that the builtin registry can return a clone of the file it already parsed, rather than getting it to be parsed again.