diff --git a/.github/scripts/check-deps-and-qt.sh b/.github/scripts/check-deps-and-qt.sh index c73eb98..08b9b69 100644 --- a/.github/scripts/check-deps-and-qt.sh +++ b/.github/scripts/check-deps-and-qt.sh @@ -141,6 +141,12 @@ vcpkg_workspace() { [ "$(find . -path '*/target/*' -path '*deps-vcpkg*' -name '*.stamp' | wc -l)" -ge 2 ] || fail "each member did not declare its own installation" echo "ok: two members that share no dependency both installed and linked one prefix" + # The two installations may run at once; vcpkg's own lock on the root makes + # the second wait only when asked to, and fails it otherwise ("failed to + # take lock", measured on GalTranslPP under 0.15.0). + [ "$(grep -rl -- '--x-wait-for-lock' --include=build.ninja . | wc -l)" -ge 2 ] || + fail "a member's installation does not wait for the root's lock" + echo "ok: each member's installation waits for another one of the same root" } cmake_consumer() { diff --git a/README.md b/README.md index 7f041ff..3772b9b 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ module name the member declares, and configures it there. ```toml [build-dependencies.mcpp] -plugins = { version = "0.15.0", features = ["rules-spirv"], host-module = true } +plugins = { version = "0.15.1", features = ["rules-spirv"], host-module = true } ``` ```cpp diff --git a/deps/vcpkg.cppm b/deps/vcpkg.cppm index a9d3f3e..68bbf5c 100644 --- a/deps/vcpkg.cppm +++ b/deps/vcpkg.cppm @@ -274,8 +274,10 @@ inline prefix use(const options& opt = {}) { // THE ACTION IS vcpkg ITSELF. Everything an installation needs is an // argument: `--vcpkg-root` pairs the tool with the scripts it was // released with, whatever `VCPKG_ROOT` the shell has; vcpkg locks the - // installation root itself (`/vcpkg/vcpkg-running.lock`), so two - // workspace members installing one root wait for each other; its build + // installation root itself (`/vcpkg/vcpkg-running.lock`), and + // `--x-wait-for-lock` makes a second installation of the same root -- + // two workspace members, run concurrently -- wait for the first + // instead of failing (measured on GalTranslPP under 0.15.0); its build // and package trees go to a short directory under vcpkg's per-user // directory, because a port's build nests deep and Windows tools still // enforce MAX_PATH. @@ -295,6 +297,7 @@ inline prefix use(const options& opt = {}) { a.arg(exeS.c_str()).arg("install") .arg(("--vcpkg-root=" + vcpkgRoot).c_str()) .arg("--disable-metrics") + .arg("--x-wait-for-lock") .arg("--triplet").arg(triplet.c_str()) .arg(("--x-manifest-root=" + mcpp::deps::generic(manifestRoot)).c_str()) .arg(("--x-install-root=" + mcpp::deps::generic(tripletRoot)).c_str()) diff --git a/docs/deps.md b/docs/deps.md index 4690ffe..9e4596e 100644 --- a/docs/deps.md +++ b/docs/deps.md @@ -24,7 +24,7 @@ Module `mcpp.deps.archive`; engine floor: 2026.9.26.2. ```toml [build-dependencies.mcpp] -plugins = { version = "0.15.0", features = ["deps-vcpkg"], host-module = true } +plugins = { version = "0.15.1", features = ["deps-vcpkg"], host-module = true } ``` ```cpp @@ -88,8 +88,9 @@ vcpkg's per-user directory (`%LOCALAPPDATA%\vcpkg` on Windows, `$XDG_CACHE_HOME/vcpkg` or `~/.cache/vcpkg` elsewhere), beside vcpkg's default binary cache, under a short name, because Windows tools still enforce MAX_PATH; an existing `VCPKG_DOWNLOADS` is kept. vcpkg locks the installation root itself -(`/vcpkg/vcpkg-running.lock`), so two workspace members installing one -root run one after the other. vcpkg fetches its +(`/vcpkg/vcpkg-running.lock`), and `--x-wait-for-lock` makes two +workspace members installing one root run one after the other; without it the +second fails, "failed to take lock" (0.15.1). vcpkg fetches its own CMake, Ninja and 7-Zip, and on Windows a portable git; on Linux and macOS its documented host prerequisites (git, curl, zip, unzip, tar, a C compiler) are the host's. Ports are compiled with vcpkg's default toolchain for the diff --git a/docs/rules-qt.md b/docs/rules-qt.md index 2e1e487..f5fc9cb 100644 --- a/docs/rules-qt.md +++ b/docs/rules-qt.md @@ -6,7 +6,7 @@ ```toml [build-dependencies.mcpp] -plugins = { version = "0.15.0", features = ["rules-qt"], host-module = true } +plugins = { version = "0.15.1", features = ["rules-qt"], host-module = true } # The SDK and its version are the project's declaration. [target.'cfg(any(windows, linux, macos))'.xlings.workspace] diff --git a/mcpp.toml b/mcpp.toml index ebec8de..cd6e554 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -1,7 +1,7 @@ [package] name = "plugins" namespace = "mcpp" -version = "0.15.0" +version = "0.15.1" description = "Official mcpp build plugins: rule packages under mcpp.rules.*, build-time utilities under mcpp.tools.*, each member selected by a feature" license = "Apache-2.0" authors = ["mcpp-community"] diff --git a/src/plugins.cppm b/src/plugins.cppm index f06f9d6..7e6443a 100644 --- a/src/plugins.cppm +++ b/src/plugins.cppm @@ -49,7 +49,7 @@ export namespace mcpp::plugins { // // One package, one version: the number lives in mcpp.toml, and the CI step // `the collection states its own version` compares the two. -inline constexpr std::string_view version = "0.15.0"; +inline constexpr std::string_view version = "0.15.1"; } // namespace mcpp::plugins diff --git a/tests/vcpkg-workspace/mcpp.toml b/tests/vcpkg-workspace/mcpp.toml index 13ccc09..0cbaab6 100644 --- a/tests/vcpkg-workspace/mcpp.toml +++ b/tests/vcpkg-workspace/mcpp.toml @@ -5,7 +5,8 @@ # it, and those of no other package do, so each member declares the # installation itself. The two actions run the same `vcpkg install` against the # root's one manifest into one installation root; vcpkg locks that root itself -# (`vcpkg/vcpkg-running.lock`), so they run one after the other and the second +# (`vcpkg/vcpkg-running.lock`) and the member passes `--x-wait-for-lock`, so +# they run one after the other and the second # finds everything installed. [workspace] members = ["app-a", "app-b"]