Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/scripts/check-deps-and-qt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions deps/vcpkg.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -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 (`<root>/vcpkg/vcpkg-running.lock`), so two
// workspace members installing one root wait for each other; its build
// installation root itself (`<root>/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.
Expand All @@ -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())
Expand Down
7 changes: 4 additions & 3 deletions docs/deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
(`<root>/vcpkg/vcpkg-running.lock`), so two workspace members installing one
root run one after the other. vcpkg fetches its
(`<root>/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
Expand Down
2 changes: 1 addition & 1 deletion docs/rules-qt.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion mcpp.toml
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion src/plugins.cppm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion tests/vcpkg-workspace/mcpp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
Loading