-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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] Registries MVP #13038
[vcpkg] Registries MVP #13038
Conversation
1cafe33
to
5070815
Compare
Also move common_projection() to Util:: to be with its friends
…gPaths This PR adds support for $.configuration in manifest files, which can either be an immediate object or the string "file" (which will search recursively up for a vcpkg-configuration.json).
This allows us to get better compiler errors when playing around with json parsing Additionally, move some stuff over to json.h, and some minor json reading changes Also rename *Field -> *Deserializer Additionally, move the valid fields check into the Reader
Also add format_manifest support for configuration
this still allows us to use overlay ports, but uses the registry set for everything else
still to do: add other types of registries!
fb3354e
to
d16af39
Compare
In your example project, you specify both your local registry and the builtin one, with no default. Is it possible to only define a registry for some packages, and keep the builtin as a fallback ? something like this: {
"name": "fmt-example",
"version-string": "0.0.1",
"dependencies": [
"fmt",
"zlib"
],
"configuration": {
"registries": [
{
"kind": "directory",
"path": "my-registry",
"packages": [ "zlib" ]
}
]
}
} where the builtin registry is used automatically for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No serious issues left other than Bill not being a fan of that one lambda. I don't agree with the "configuration" mechanism in the spec, but this does seem to implement what's in that spec.
96277ab
to
6ed7810
Compare
790f09e
to
61dc239
Compare
61dc239
to
24bc815
Compare
We had a serious discussion today, and so the way we're going forward with this is very different -- no longer having a `"configuration"` field, adding inheritance, etc. Check the RFC for more info on how this will be done in the future; for the MVP, all it changes (fundamentally) is where the configuration stuff gets set -- it's in vcpkg-configuration.json in the manifest root.
@BillyONeal could you merge this today? |
Yes, but I thought we wanted another reviewer? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also confirm everything still compiles using v140 and gcc-7:
FROM ubuntu:18.04
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
xz-utils \
build-essential \
tar \
unzip \
ninja-build \
cmake \
curl \
vim \
git \
nasm \
yasm \
python3 \
pkg-config \
zip
CMD [ "/bin/bash" ]
docker run -it --rm 51d7a08f83a8 /bin/bash -c "git clone https://github.com/microsoft/vcpkg --depth=1 && vcpkg/bootstrap-vcpkg.sh"
// CMakeSettings.json
[
{
"name": "x64-Release-v140",
"generator": "Visual Studio 16 2019 Win64",
"configurationType": "RelWithDebInfo",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "-T v140 -DVCPKG_STANDARD_LIBRARY=msvc-stl -DVCPKG_WARNINGS_AS_ERRORS=OFF -DBUILD_TESTING=OFF",
"buildCommandArgs": "/m",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": [],
"environments": [ { "CL": "/MP" } ]
}
]
@ras0219 fwiw, we compile with g++-7 in CI. Also, I'll have a patch out later today to fix compilation with g++-6. |
Thanks for your contribution! |
This adds everything except for git registries, which will be implemented later.
Note: this is a large change. You may want to look at each commit in turn.
See https://github.com/strega-nil/vcpkg-example/tree/trunk for an example of using registries :) (ignore the actual C++, that's not really what's important... no guarantees on it compiling, for example)