-
-
Notifications
You must be signed in to change notification settings - Fork 14.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: make builtin-baseline work #328937
vcpkg: make builtin-baseline work #328937
Conversation
Before merging this I'd like to experiment with another solution first that may not involve having vcpkg living in its own git repo. Quick question: does this baseline support allow specifying any arbitrary baseline? |
Consider this vcpkg.json file: { "dependencies": [ "fmt", "zlib" ], "builtin-baseline": "101ae1f63a22d262f80a68034a1550da5dfdd05f" } Before this change, if you tried to run “vcpkg install” with that vcpkg.json file, then vcpkg would fail with this error: error: while checking out baseline from commit '101ae1f63a22d262f80a68034a1550da5dfdd05f', failed to `git show` versions/baseline.json. This may be fixed by fetching commits with `git fetch`. error: git failed with exit code: (128). fatal: not a git repository: '.git' while checking out baseline 101ae1f63a22d262f80a68034a1550da5dfdd05f This commit fixes that problem.
52be313
to
79e11b3
Compare
No. At the moment, the vcpkg package’s version is |
This is definitely an improvement. Earlier, I have had to manually override the source to fetch vcpkg with the correct baseline, and patch out the baseline to make it build in a sandbox However, I am a bit worried about #8567. Have you made any considerations about it? |
@h7x4 considering that you have to put a specific baseline hash for the built-in baseline to work, I don't think it would improve the situation all that much as you'll probably have to patch the baseline hash instead, or revert back to a git baseline instead. Unless I haven't understood the use case correctly? |
@gracicot: The point I was trying to make is that I have had to make workarounds before, to fix the exact issue that this PR is trying to fix. However, I'm still worried about the way this is fixed. Are there going to be issues with reproducibility and the I've played around with the idea of creating bespoke tarballs of the vcpkg releases that contains the |
OK, so I read through that thread and here are my thoughts. It seems like vcpkg is just designed in a bad way. The vcpkg-tool already downloads the source code for the things that it builds. It should also be able to download the vcpkg repo if it’s not already present. Nix already does this when using channels or a With that in mind, here’s what I’m thinking. Instead of making Nixpkgs’s current vcpkg package support
This Once we get the
It looks like that has already happened. “vcpkg, vcpkg.passthru.tests on aarch64-linux” succeeded, but “vcpkg, vcpkg.passthru.tests on x86_64-linux” failed because of a hash mismatch. |
Closed by #329939 |
Description of changes
Consider this vcpkg.json file:
At the moment, if you try to run “vcpkg install” with that vcpkg.json file, then vcpkg will fail with this error:
This PR fixes that problem.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.