Skip to content

Commit 96cfb71

Browse files
committed
run/test: the two notes and the freestanding error name the key as well
Six message sites remained on `tc.targetTriple` after the previous commit, and three of them print a `[target.<triple>]` key the reader is meant to act on: the override note, its `mcpp test` twin, and `no_runner_message`, which shows a complete key-and-value block to paste. On macOS each named `arm64-apple-darwin24.6.0`, a spelling no `[target.…]` lookup resolves, so following the advice would have produced a key that is never read. The remaining two, the `--no-runner` notes, name the target a runner was declared for, and the declaration is under the canonical key. Every diagnostic on both paths now reads `RunnerChoice::tripleKey`. On Linux the two spellings coincide, which is why e2e 130, 131 and 132 pass unchanged.
1 parent 8da71f3 commit 96cfb71

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/build/execute.cppm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,14 +1369,14 @@ export int build_run_target(const std::optional<std::string>& targetName,
13691369
const auto choice = choose_runner(*ctx, no_runner);
13701370
if (choice.ignored)
13711371
mcpp::ui::info("note", std::format(
1372-
"--no-runner: ignoring the runner declared for {}", ctx->tc.targetTriple));
1372+
"--no-runner: ignoring the runner declared for {}", choice.tripleKey));
13731373
if (choice.fromManifest)
13741374
mcpp::ui::info("note", std::format(
13751375
"[target.{}].runner overrides the runner a dependency supplied",
1376-
ctx->tc.targetTriple));
1376+
choice.tripleKey));
13771377
if (choice.freestanding && choice.tmpl.empty()) {
13781378
std::println(stderr, "error: {}",
1379-
mcpp::freestanding::no_runner_message(ctx->tc.targetTriple));
1379+
mcpp::freestanding::no_runner_message(choice.tripleKey));
13801380
return 2;
13811381
}
13821382
if (!choice.tmpl.empty()) {
@@ -1868,14 +1868,14 @@ export int run_tests(std::span<const std::string> passthrough,
18681868
const auto runnerChoice = choose_runner(*ctx, testOpts.noRunner);
18691869
if (runnerChoice.ignored && !json)
18701870
mcpp::ui::info("note", std::format(
1871-
"--no-runner: ignoring the runner declared for {}", ctx->tc.targetTriple));
1871+
"--no-runner: ignoring the runner declared for {}", runnerChoice.tripleKey));
18721872
if (runnerChoice.fromManifest && !json)
18731873
mcpp::ui::info("note", std::format(
18741874
"[target.{}].runner overrides the runner a dependency supplied",
1875-
ctx->tc.targetTriple));
1875+
runnerChoice.tripleKey));
18761876
if (runnerChoice.freestanding && runnerChoice.tmpl.empty()) {
18771877
std::println(stderr, "error: {}",
1878-
mcpp::freestanding::no_runner_message(ctx->tc.targetTriple));
1878+
mcpp::freestanding::no_runner_message(runnerChoice.tripleKey));
18791879
return 2;
18801880
}
18811881
std::vector<std::string> runnerTmpl = runnerChoice.tmpl;

0 commit comments

Comments
 (0)