[vcpkg] Enable reentrant vcpkg calls #13751
Merged
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.
This PR enables the vcpkg executable to support limited reentrancy. This potentially allows the tool to provide certain services to the inner package builds, such as downloading, locking, and more.
This is analogous to the common CMake pattern of
except it will use
To minimize maintenance burden on intermediate callers, any information that needs to be exchanged between the outer vcpkg process and the inner reentrant call is piped through a JSON document stored in the environment variable
$VCPKG_X_RECURSIVE_DATA
. Intermediate callers must not examine or modify this document in any way.Additional notes about this v1 implementation:
$VCPKG_X_RECURSIVE_DATA
topoison
after the first reentrance ensuring that further reentrancies will fail fast$VCPKG_FORCE_SYSTEM_BINARIES
should be reorganized into$VCPKG_X_RECURSIVE_DATA
once all references are moved into reentrant services. At the time of this PR, there is a reference to this environment variable invcpkg_configure_cmake()