Implement consistent registry access for vcpkg command accessing ports #517
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.
Description
This PR implements the behavior to consistently access a port and its versions for vcpkg command discussed in microsoft/vcpkg#18967
I consider this PR as a draft for now as I have only testing code changes on
x-add-version
and a new commandformat-port
like it was suggested in the initial PR, and I am looking for feedbacks whether this is going into the right direction or not.Although I have implement this wanted behavior as a separate struct
CommandRegistryPaths
containingvcpkg::Path
, I feel like this would be more coherent if implemented directly as additional method onvcpkg::RegistryImplementation
andvcpkg::RegistryEntry
.However as this is my first PR I lack context and experience with the code base to decide this is a good direction or not.
NOTE: This is only a partial implementation over the initial spec (e.g. read-only registry not implemented).