-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vcpkg] [RFC] Implement host-triplets and host-triplet dependencies #15424
Conversation
020f5d6
to
002f3dd
Compare
b2afc4d
to
b7a9d16
Compare
cf18f19
to
d336de0
Compare
8330846
to
a5c5a61
Compare
Future TODOs:
|
af2eb6d
to
732a4fa
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
88d99ab
to
977a008
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
…roschuma/tool-ports-2
but you said I am able to manipulate that value on a per port basis in the triplet. So for different ports VCPKG_HOST_TRIPLET can be different and as such the dependency graph should contain multiple host triplets. I just want to have that list passed to cmake. |
…roschuma/tool-ports-2
I apologize if I've misstated something above, to clarify: Manifest files gain the ability to mark a dependency edge as However, that selected host triplet (e.g. x64-windows) as always has all the normal powers of a triplet. It could be your https://github.com/Neumann-A/my-vcpkg-triplets/blob/master/x64-windows-llvm.cmake which would cause certain packages still within that single host triplet, to be built with whatever settings that triplet applies. To make this happen, you'd pass The above said, in classic mode, there is a not-by-design "bug" where you could get transitively different host triplets on accident via changing the host triplet settings while executing different install commands. However, this is unintended, discouraged behavior (that also doesn't work in manifest mode and so won't work with newer features that rely on manifest mode such as versioning). |
…roschuma/tool-ports-2
Im am a bit confused (after actually checking the changes i am less confussed but irritated). You are planning to add it to the vcpkg tool as a cmd line argument? Doesn't this leave the For now lets step back a bit since I think we have two different objects here:
To the first point: To the second point: |
The state can be "strange", but it doesn't violate any manifest constraints. For example, given the ports:
if the user ran:
they would move to the installed state of
If they then ran
they would end up in the state
Notably, at build time of C:target, D is available in However, there is a way for To belabor the point further, the dependency expression above
This may be "strange", but it follows all constraints expressed in the files. If Of course, all the above strange capabilities are due to the stateful, incremental nature of classic mode and are totally unavailable in manifest mode by design. There are already other "strange" situations that can occur in classic mode due to its statefulness, such as version skew (installing C in the above example also won't rebuild A if its version is out of date, for example). These are all reasons why we recommend users to use manifests for new projects and only use classic mode for trivial, lazy things or for developing packages.
All binary caching and dependency tracking would still be correct --
At this time, it isn't clear what a fully generic replacement system would look like (with full correct integration into binary caching etc). With this PR, I expect that in cases where we discover a need to perform tool replacements, we can introduce the appropriate indirection at that point. Once that indirection design has proven to be stable, useful, and effective across many different tools, we can promote it to a built-in helper. In the meantime, even helpers that "just put exes into /tools" can still be effectively-enough replaced using an overlay port that packages up a prebuilt exe. For example:
This would work correctly with binary caching and would replace some build-dependent host port that is normally expected to put make.exe into
It is not clear yet precisely how that should work. For example, the user generally should not be replacing
In the end, it will be a command line argument in every way except name; there's no realistic alternative. If it is configurable at all, and usable in classic mode, it can change between command lines. I do agree that it will be better for most users to use the environment variable
This PR is explicitly not attempting to universally solve (1) for all time and space; it is focused on incrementally improving the status quo with respect to tools that we must build (boost-build, grpc, protobuf). I do expect that once this feature is available, we will be able to make progress on (1), ideally designing through experience a pattern for tools capable of coming from the system (like For example, with this PR, I think it would be totally reasonable for a host port to have an expected consumption interface like:
I don't understand this as written. The intention of However, if I understand that your request to mean "how do I provide my own definition of how to get make.exe instead of vcpkg's curated make-tool build", see the many words above and below on various approaches to that.
I think I've addressed this within the words above, but essentially the intent of all ports (not just host ports) is to express dependence on capabilities. Overlays are our current way that users can replace the way those capabilities are fulfilled. One port's capability may be "I can find_package(OpenSSL) inside my build", another might be "I can include( I understand that you're very concerned about the particular chosen capability/contract design of any specific host port; we expect those capabilities to evolve over time the same way that every other port evolves. However, today, we do not believe we have enough experience with buildable host tools in vcpkg to design an higher level interface that is correct, stable, robust, complete, and worth the implementation complexity. |
Posting the sqlpp11:arm-uwp error here for potential future investigation:
|
…5677) * [vcpkg] Miscellaneous internal improvements extracted from #15424 * [vcpkg] CR comments * [armadillo] Use vcpkg_from_git() to workaround gitlab missing archive Co-authored-by: Robert Schumacher <[email protected]> Co-authored-by: Billy Robert O'Neal III <[email protected]>
Move this PR to vcpkg-tool repo. |
If I see this right it was merged in microsoft/vcpkg-tool#5, but the documentation was lost. So is this available? |
You can try it out by cloning the vcpkg-tool repository and building vcpkg yourself. You won't get this feature from bootstrapping until we release a new version of the vcpkg tool (we are reviewing our release process, there's no next release scheduled yet). Documentation will be added once the feature is released properly. |
…15424 (microsoft#15677) * [vcpkg] Miscellaneous internal improvements extracted from microsoft#15424 * [vcpkg] CR comments * [armadillo] Use vcpkg_from_git() to workaround gitlab missing archive Co-authored-by: Robert Schumacher <[email protected]> Co-authored-by: Billy Robert O'Neal III <[email protected]>
This PR solves a long-standing issue with manifests being unable to correctly install boost while cross-compiling. This is done by enabling consumers to mark a dependency as coming from the host (via
"host": true
). The dependency can then be accessed in the portfile via${CURRENT_HOST_INSTALLED_DIR}/subpath
.This PR does not automatically add any subpaths of the host installed dir to helpers such as
vcpkg_configure_cmake()
. For now, consumers are intended to usevcpkg_add_to_path()
to pick individual required executable folders.See docs/users/tools.md for more details.