[vcpkg] Enable reentrant vcpkg calls#13751
Merged
ras0219-msft merged 4 commits intomicrosoft:masterfrom Oct 6, 2020
Merged
Conversation
Via envvars VCPKG_COMMAND and VCPKG_X_RECURSIVE_DATA. Child processes can call vcpkg via "$VCPKG_COMMAND <args>" in limited internal circumstances.
32e12d5 to
6061702
Compare
2 tasks
BillyONeal
reviewed
Sep 30, 2020
BillyONeal
approved these changes
Oct 1, 2020
strega-nil
pushed a commit
to strega-nil/vcpkg
that referenced
this pull request
May 5, 2021
* [vcpkg] Enable recursive vcpkg calls Via envvars VCPKG_COMMAND and VCPKG_X_RECURSIVE_DATA. Child processes can call vcpkg via "$VCPKG_COMMAND <args>" in limited internal circumstances. * [vcpkg] Address CR comments * [vcpkg] Do not move through Optional<&> into Optional<T> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
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.
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_DATAtopoisonafter the first reentrance ensuring that further reentrancies will fail fast$VCPKG_FORCE_SYSTEM_BINARIESshould be reorganized into$VCPKG_X_RECURSIVE_DATAonce all references are moved into reentrant services. At the time of this PR, there is a reference to this environment variable invcpkg_configure_cmake()