Repository navigation
0.27.0: tools-steps runs step programs with the collection's own runner - #62
Draft
Sunrisepeak wants to merge 4 commits into
Draft
Sunrisepeak wants to merge 4 commits into
Sunrisepeak wants to merge 4 commits into
Conversation
The runner of a step program is this package's program `steps`
(tools/steps_main.cpp), which the feature tools-steps declares as its tool
(`tools = ["steps"]`): the engine builds it once for the machine that builds
and gives its path to every build program that links mcpp.plugins with the
feature active. `command` writes the program as a step file of counted values
(`mcpp::plugins::steps` in the lib root, shared by the writer and the runner)
and returns `{runner, file}`, both declared as inputs. The cmake -P backend,
`runner_spec` and the `options::cmake` of dist-apk and dist-apple are removed.
The runner keeps the semantics of 0.25.0 and 0.26.0 as CMake 4 implemented
them: matches sorted and spelled from the pattern's directory, names matched
without case on Windows and macOS, no link entered by a recursive glob, a
copied tree keeping links, times and permissions, and read-only entries
removed and replaced. A value that holds `;` stays one value, and a list is
empty only when it holds no value.
tests/steps-consumer runs every operation under a root whose name holds a
space, a semicolon and non-ASCII text, over a link to a directory and
read-only entries, and checks `require` on an empty list, a failing program,
and that an unchanged step does not run again.
The bundle step, the plan's sole terminal artifact, refreshes the bundle directory's time with the step operation `touch`, run by the runner `steps`, instead of naming the host program /usr/bin/touch. Every dist-apple plan therefore resolves the runner, which the feature tools-steps carries wherever the member is active; the framework copy and the disk-image staging were step programs already. The macOS and iOS plan checks hand the build program the runner's path and assert that the bundle step is a step program whose only operation touches the bundle.
dist-apk and dist-apple no longer declare xim:cmake: their step programs run with the collection's runner, which tools-steps carries, so a pack downloads no CMake. deps-cmake and deps-archive keep it, since each runs cmake itself: to configure and build a subproject, and as `cmake -E tar` to extract an archive. The cross-host dist-apk step says that its javac, d8 and libs steps run without a shell or xim:cmake.
…be the runner The package floor is mcpp 2026.11.19.1, the release that gives a feature's `tools` to every build program that links the package with the feature active (SPEC-007 R6.3), which is how tools-steps brings its runner; CI's MCPP_VERSION names it. tools-steps, dist-apk and dist-apple state that floor in the member table. docs/tools-steps.md describes the runner, the step file format, the semantics it keeps from the CMake backend of 0.25.0 and 0.26.0 and the three details in which it differs, and states that mcpp-community/mcpp#955 was answered by a feature carrying the package's own program rather than by the engine running step programs. dist-apk and dist-apple no longer name xim:cmake or options::cmake; rule 5 of the plugin conventions admits a program of the plugin's own package that its feature declares as a tool; the tool-sources table lists the runner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The plugin side of mcpp-community/mcpp#955, as design 2026-11-19 §8.4 and §14.2 item 7 state it: a step program is run by
steps, a program of this package that the featuretools-stepsdeclares as its tool, instead ofcmake -P. mcpp#955 asked the engine to interpret the step operations; mcpp 2026.11.19.1 instead gives a feature'stoolsto every build program that links the package with the feature active (SPEC-007 R6.3), so the operations remain this package's vocabulary and change with its version.Changes
tools/steps_main.cppis thekind = "bin"targetsteps;[features.tools-steps]gainstools = ["steps"]. Its mcpplibs.os dependency sits on[features.steps-runner], which only the runner's own tool build activates (required_features).mcpp::tools::steps::commandwrites<base>.stepsonly when its text changes and returns{runner, file}, both declared as inputs;runner()readsmcpp::dep_bin("mcpp.plugins", "steps")andmissing_runner()is the refusal text. The CMake backend,runner_spec,cmake_backend::renderand theoptions::cmakeof dist-apk and dist-apple are removed.mcpp::plugins::stepsin the lib root, shared by the writer and the reader): amcpp-steps 1line, then one record per operation with every operand and value written as<bytes>:<value>. Nothing is quoted or escaped, so spaces, semicolons, backslashes, quotes, line breaks and non-ASCII text survive on every host.copy_treekeeping links, times and permissions, read-only entries removed and replaced, and relative program paths resolved from the working directory. Three details differ, each where CMake altered a value or read a byte as a character: a value holding;stays one value, a list is empty only when it holds no value, and?and bracket expressions match one UTF-8 character. docs/tools-steps.md states all of it.touchinstead of/usr/bin/touch. It had no#!/bin/shaction left: 0.25.0 had already turned its framework copy and disk-image staging into step programs.xim:cmakeis removed from dist-apk and dist-apple. deps-cmake and deps-archive keep it, because they run cmake themselves.mcpp >= 2026.11.19.1and CI'sMCPP_VERSIONset to it. README, docs/tools-steps.md, docs/dist-apk.md, docs/dist-apple.md, docs/plugin-development.md (rule 5 and the engine floor), docs/tool-sources.md and tools/README.md describe the runner. The sentences that said the runner would staycmake"until mcpp runs them itself (#955)" now record how #955 was answered.Tests
tests/steps-consumer(new; Linux job, cross-platform job, llvm lane) runs every operation under a root whose name holds a space, a semicolon andü. The tree it works on has a link to a directory and read-only files and directories.steps-probechecks 24 properties of the result: argument vectors passed verbatim, list order,exclude,relative_to,if_existsboth ways, negated and ranged brackets, the host's case rule, link and permission preservation, copies over read-only files, and read-only removal.check-steps.shalso checks thatrequireon an empty list fails with the member's message, that a program exiting 3 fails the step and is named with its status, and that an unchanged step does not run again.tests/all-rules-compileround-trips a program through the step file, compares it byte for byte with the documented text, and checks that the reader refuses a bad list name, another format and a broken count.{runner, file}.CI before mcpp 2026.11.19.1 exists
Every job fails until mcpp 2026.11.19.1 is released and indexed. The jobs fetch
MCPP_BOOTSTRAP(2026.11.7.1), which the new package floor refuses. As the workflow's own comment prescribes,MCPP_BOOTSTRAPandMCPP_EDITOR_VERSIONmove to 2026.11.19.1 once that release exists. Until then, a dispatch whosemcpp_source_refnames an engine ref that already carries version 2026.11.19.1 measures the branch. The floor is not worked around.This branch is to be rebased onto 0.26.1, the release that moves the existing
mcpplibs.oslines to 0.4.5. The two new lines ([feature-deps.steps-runner]and the fixture's probe) already name 0.4.5.