Skip to content

Commit 43a4763

Browse files
committed
fix(runner): a package's program may sit at the payload root, and two already do
D4's LEG WAS RED AND THE PACKAGE WAS INSTALLED CORRECTLY. Measured on a macos-15 runner with `xim:apple-simulator-tools` declared and present: error: runner 'simctl-run' for 'aarch64-ios-sim' was not found on any search path. Searched: .../xim-x-apple-simulator-tools/0.1.0/bin The directory searched was right and the program was one level up. `bin/` is the convention and stays FIRST; it is not universal -- `xim:7zip` puts `7zz` straight into its install directory, and so did the first version of `xim:apple-simulator-tools`. Two directories per declared package is cheaper than a rule every recipe has to know, and a recipe that does use `bin/` is unaffected because that entry is still tried first. The recipe moves too (openxlings/xim-pkgindex#820, merged): a package whose whole purpose is to provide a program puts it where consumers look, and its `xvm` registration moves with it -- a recipe that wrote into `bin/` and registered the root would install without complaint and produce a shim resolving to nothing. And the fixture uses `[xlings.workspace]`, which is what mcpp asks for: "deps is superseded by [xlings.workspace] and will stop being read". WHAT THE macOS RUN MEASURED FOR ALL THREE ROWS, `ios_deployment_target = "18.0"`, Xcode 16.4, SDKs 18.5: aarch64-ios arm64 LC_BUILD_VERSION platform 2 (IOS) minos 18.0 aarch64-ios-sim arm64 LC_BUILD_VERSION platform 7 (IOSSIMULATOR) minos 18.0 x86_64-ios-sim x86_64 LC_BUILD_VERSION platform 7 (IOSSIMULATOR) minos 18.0 `platform 2` against `platform 7` is the pair worth having a reading for: a successful build cannot tell them apart, and an artefact reporting IOSSIMULATOR from the device row is one no later step refuses. The simulator artefact ran under `simctl spawn` and printed `1-2-3`.
1 parent c3cb6ee commit 43a4763

2 files changed

Lines changed: 31 additions & 6 deletions

File tree

.github/workflows/ci-macos-ios.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,17 @@ jobs:
276276
#
277277
# THE TOOL IS DECLARED AT THE TOP LEVEL HERE AND NOT IN
278278
# examples/13, and the difference is which hosts the manifest has to
279-
# work on. `deps` is not conditional on a target -- measured:
280-
# "[target.aarch64-ios-sim.xlings] does not accept 'deps'" -- and
281-
# `xim:apple-simulator-tools` exists for macosx alone, so an
279+
# work on. A tool declaration is not conditional on a target --
280+
# measured: "[target.aarch64-ios-sim.xlings] does not accept 'deps'"
281+
# -- and `xim:apple-simulator-tools` exists for macosx alone, so an
282282
# unconditional declaration breaks a Linux build. This fixture is
283283
# macOS-only, so it can say it.
284-
[xlings]
285-
deps = ["xim:apple-simulator-tools"]
284+
#
285+
# `[xlings.workspace]` and not `[xlings] deps`, which mcpp reports as
286+
# superseded: "deps is superseded by [xlings.workspace] and will stop
287+
# being read. It is honoured for now."
288+
[xlings.workspace]
289+
"xim:apple-simulator-tools" = ""
286290
TOML
287291
cat >> /tmp/iostest/mcpp.toml << 'TOML'
288292

src/build/prepare.cppm

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10426,8 +10426,29 @@ prepare_build(bool print_fingerprint,
1042610426
auto xlEnv = mcpp::config::make_xlings_env(**cfg);
1042710427
for (auto const& spec : xlingsSpecs) {
1042810428
auto ref = mcpp::xlings::paths::parse_xpkg_ref(spec);
10429-
if (auto dir = mcpp::xlings::paths::xpkg_payload(xlEnv, ref))
10429+
if (auto dir = mcpp::xlings::paths::xpkg_payload(xlEnv, ref)) {
1043010430
ctx.xlingsDepBinDirs.push_back(*dir / "bin");
10431+
// AND THE PAYLOAD ROOT, BECAUSE A FLAT LAYOUT IS A
10432+
// LAYOUT THIS INDEX ALREADY SHIPS.
10433+
//
10434+
// `bin/` is the convention and stays first. It is not
10435+
// universal: `xim:7zip` puts `7zz` straight into its
10436+
// install directory, and so did the first version of
10437+
// `xim:apple-simulator-tools` -- which is how this was
10438+
// measured, on a macOS runner with the package
10439+
// correctly installed:
10440+
//
10441+
// error: runner 'simctl-run' for 'aarch64-ios-sim'
10442+
// was not found on any search path.
10443+
// Searched: .../xim-x-apple-simulator-tools/0.1.0/bin
10444+
//
10445+
// The directory searched was right and the program was
10446+
// one level up. Two directories per package is cheaper
10447+
// than a rule every recipe has to know, and a recipe
10448+
// that does use `bin/` is unaffected because that entry
10449+
// is still tried first.
10450+
ctx.xlingsDepBinDirs.push_back(*dir);
10451+
}
1043110452
}
1043210453
}
1043310454
}

0 commit comments

Comments
 (0)