Skip to content

2026.12.4.1: the ecosystem's boundary: toolchains named by path, library packages for other build systems, plan locks, CPS - #1033

Open
speak-agent wants to merge 19 commits into
mainfrom
eco/c1-ld-wrapper
Open

speak-agent wants to merge 19 commits into
mainfrom
eco/c1-ld-wrapper

Conversation

@speak-agent

@speak-agent speak-agent commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

The mcpp release 2026.12.4.1, one pull request for the ecosystem-boundary design (.agents/docs/2026-11-27-ecosystem-boundary-design.md, v11). Commits are added here as each part lands; the list below states what is in and what is still to come.

In this pull request

Change Commit Issue
Fetching dependencies: the version table read as the installer reads it, one writer of standard error, one line per dependency, waves (batch-fetch) 0dd1fba
Locks: one wait that reports and is bounded (--lock-wait, MCPP_LOCK_WAIT), held told from cannot-lock, a complete entry read without its lock 45af1fa #1040
mcpp new makes a git repository; --vcs and [new] vcs override it 5bdf577 #1038
A link and a pack under a caller's XLINGS_SUBOS_LD_PATHS keep the run path mcpp derived (e2e) 6d0ba90
The command line as its own guide: root help from the command tree, --agent-skill-doc, usage errors with a next step, one mcpp explain registry 385096f
Build programs take the table a toolchain is named by; a link follows its compiles; the ABI members reach every unit; a test that would overwrite a program is refused 26fc03a #1034, #1031, #1029, #1028
The std module source is taken inside the toolchain's tree and asked with the build's words 3b7cf8a #1039
A toolchain named by path takes what it can do from its statement or a probe (archiver, response files, linker, modules) 2e1fa1d
A library package describes itself: mcpp-package.json, a .pc per leg, and its index entry (mcpp emit xpkg --package) 09c7dbb
Workspace selections build one configuration at once: a plan is held by its own lock (plan-locks) f18619e, a567552
CPS at mcpp's boundary: a library package writes a .cps per leg; mcpp::cps_package reads an installed package into existing directives (protocol 22); modules/cps/; docs/14 0fe9704
Unit tests follow the plan locks; the CPS reason titles equal docs/50's rows 5a8f425
Fetch waves cover the project's own index (one call per environment); plan-locks is a shape that ran on every host ece7819
The agent sheets as a network (root sheet: architecture, conventions, local analysis, reporting with the user's consent, contribution; every command sheet ends with its related commands, checked by a unit test); mcpp info <package>; mcpp add writes full identities as dotted keys in name order; hints, docs and examples in that spelling; host-module = true omitted where it restates the default; the golden files 275e96b
The CPS adapter states its reason from the structure; version 2026.12.4.1 dd7433d, 60a7958

To come in this pull request

Related changes in other repositories

  • mcpp-plugins#73: the plugins' documentation writes the edge as a dotted key of [build-dependencies] and omits host-module = true where it restates the default.
  • openkal-musl#93 and openkal-windows (mcpp#1032): the C library's spawn statement and the names a started program is called by, released through the openkal cascade.
  • xim-pkgindex#2001: relocate_cps and declare_cps in xim.pkgindex.sysroot, which the entries mcpp emit xpkg writes call when the index has them.

Sunrisepeak and others added 10 commits December 4, 2026 23:06
…it, one writer of standard error, one line per dependency, waves

A version stated through a local table and a platform reference (`ref`, `inherits`) are read as libxpkg resolves them; a form not read has no revision, `mcpp xpkg parse` refuses it, and a revision read differently from the installer's record is reported once (fetch/revision-misread). The provider's lines go through mcpp.ui, checked by check_stderr_writers.sh against a shrinking baseline. A dependency is one line under its manifest name, with no announcement before the provider downloads, `Updating` when its revision changes. The dependencies known at a step are asked of the provider in one call (batch-fetch).
…ck, the std module read without its lock

Every wait for a lock goes through FileLock::acquire: reported at 300 ms, 10 s, 30 s, 60 s and each minute with the resource, the lock file, the last recorded holder and whether that process is visible here; bounded by --lock-wait, MCPP_LOCK_WAIT or [build] lock_wait (lock-wait-exceeded), which reaches the provider as XLINGS_LOCK_TIMEOUT. A file the system cannot lock is refused at once with the system's reason and a remedy (lock-unavailable). The std module entry's record is its completion marker, written by a rename and listing its parts; a complete entry is read without the lock.
…e inside another tree unless asked

After the scaffold is committed, `git init` runs with the variables that point git elsewhere removed; nothing is added or committed. A project made inside a git work tree or a directory holding an mcpp.toml gets no repository unless --vcs git states it. Without git the project is made and reported (new/vcs-unavailable), or refused with vcs-unavailable when --vcs git asked.
…eep the run path mcpp derived

xlings' ld wrapper appends -rpath "$XLINGS_SUBOS_LIB" to a link of a non-system
loader unless XLINGS_SUBOS_LD_PATHS=0, which mcpp declares for everything it
starts. Two cases state what that holds from mcpp's side, with the caller's
XLINGS_SUBOS_LD_PATHS=1 and a XLINGS_SUBOS_LIB of its own:

- the programs the link starts (observed through gcc's -wrapper, which sees
  collect2, the linker's parent) and a build program read
  XLINGS_SUBOS_LD_PATHS=0, and the artifact's run path equals the
  -Wl,-rpath entries of the link line, without the caller's directory;
- every ELF object a pack bundles names only $ORIGIN directories.

The declaration is the one cli.cppm makes for the invocation; no spawn
dropped it, so no code changes. Without the declaration the first case fails
on both observations.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…doc sheets, usage errors with next steps, one explain registry

mcpplibs.cmdline 0.2.0 with its agent-skills feature. The root help is printed from the command tree in its groups and ends with the line that points agents at --agent-skill-doc; `mcpp help <command>` is `<command> --help`; internal commands are hidden. The sheets under docs/mcpp-skills are rendered into the binary by build.mcpp and answered at every level of the tree without a project, a home or the network; a unit test parses every example by the tree. A usage error is one line and at most two help lines (the closest declared names, the --help to read), and a mcpp.usage envelope when JSON was asked for. A command run outside a project names the two next steps. mcpp explain answers E codes, MCPP_* codes and every reason token from mcpp.explain, whose titles docs/50 states; an unknown code gets the closest. Documentation of the lock waits (SPEC-011 v1.3, docs/25, docs/50) and of the new project's repository (docs/01).
… its compiles; the ABI members reach every unit; a test that would overwrite a program is refused

- A project whose toolchain is a table (path, launcher, sysroot, tools) builds its build programs
  with that table, stated as [workspace.toolchain] of their workspace; their identity holds every
  field and the launcher's stamp (mcpp#1034).
- A shared library whose interface reaches a unit's compile (a module of its import closure, the
  include directories of its public closure) is on that unit's link line after its direct
  dependencies (mcpp#1031).
- The [target.<selector>.abi] members are one record rendered by one function into the C and C++
  units of the root and of each dependency and into the link; an unstated longjmp follows
  exceptions = "wasm" from the row or the project (mcpp#1029).
- mcpp test refuses a test program whose executable is an executable target's file with
  [test-output-collision], naming the test's file and an example name; names compare as the output
  directory's file system compares them (mcpp#1028, SPEC-017 v2.7 B1 item 8).
…with the build's words

A clang driver's answers about its std module source (the module manifest, the directory of
libc++.a) are taken only inside the toolchain's tree -- the directory a path-named toolchain names,
or the one above a managed driver's bin/ and the one its driver resolves to -- and the target base.
Identification holds a managed driver's answers to its tree; a build asks again with the words the
module's precompile is given on a cross build, or when the answer it has lies outside its roots.
A compiler of the host is not held, and [build] allow_host_libs takes any answer. When no answer
is taken, import std is refused naming each answer not taken (mcpp#1039).

One function asks a driver where a file is (ask_driver); the runtime archive question goes
through it as well.
…a probe

A tree's archiver is tools.ar, the tree's, or the host's on PATH (reported as
build/archiver-from-host, refused under --strict; none anywhere is refused with
[toolchain-has-no-archiver]); an archiver that reads @file as a member's name is given the
expanded words, in batches (link-output --expand). A clang tree links with -fuse-ld=lld only when
it has lld, and with --rtlib/--unwindlib only when its driver names the library, for the
project's links and the build programs' (tools.ld reaches both through --ld-path). A driver that
refuses a module unit builds the units that use none; a module unit is refused with
[compiler-without-modules]. Each answer is kept under the program's identity (one kept-probe
helper, the -dumpdir probe moved onto it).

mcpp why toolchain lists each fact with its source and the std module source with its origin;
mcpp why flags names why each shared image is on a link line; the layer report writes custom for
the layers a tree supplies; a build program whose planning failed is named, and a toolchain
refusal points at the main project's [toolchain] line. Two notes said once per project:
toolchain/tree-holds-two-families and xlings/package-at-two-versions.

Root checks: path identity through mcpp.libs.path_identity, the stderr-writer baseline lowered,
a docs table header, the agents index regenerated.
… and its index entry

mcpp pack writes mcpp-package.json for a library as for a program (kind library, the tree a
path-named toolchain built it with, per shared leg the run-time lower bounds), and per leg a
pkg-config description lib/<triple>/pkgconfig/<identity>.pc from the package's own link intent
(prefix relative to the file, the -l words of its ldflags as Libs.private, mcpp_abi).

mcpp emit xpkg --package writes a library package's index entry: address and digest from the
archive, the systems and architectures its legs cover, deps from the lower bounds,
mcpp = "mcpp.toml", and the .pc relocated and declared into the environment's pkg-config view by
xim.pkgindex.sysroot when the index has it. It refuses, naming the user's file, an archive mcpp
pack did not write ([not-a-package-of-mcpp-pack]), a library package without the description
([package-without-description]), a library package's directory ([emit-inside-a-package]) and a
package built with a toolchain named by path ([package-built-outside-the-ecosystem]). Notes:
pack/no-header-interface, pack/closure-not-in-package, pack/built-with-a-tree,
emit/two-legs-for-one-system. The program and library entries share one install().

The lower bounds are measured in mcpp.pack: importing mcpp.runtime.elf and mcpp.toolchain.base
into mcpp.pack.library made GCC 16.1 crash at the first import of mcpp.cli.
…by its own lock

A command's selection of workspace members is a plan with its own directory,
plans/<16 hex digits>/ of the configuration's, named by the members as a set: its graph,
ninja's state (build.ninja, .ninja_log, .ninja_deps), the schedule, the placements, the
records and the runs, under the plan's lock (.mcpp-plan.lock). The configuration's directory
is held shared by plans and alone by what changes it as a whole (SPEC-011 §2 items 7 to 10,
design 2026-11-27 §3.7.1, D12).

A unit two plans reach is compiled by the first and placed for the other by the unit cache,
under a lock beside its output; response files are named per plan; an artifact two plans link
is written under a temporary name of its own and renamed, and on a POSIX host an archive is
written whole and renamed as a link is. The holding needs relocatable compiler outputs and the
unit cache; under --cache off, bmi_schedule = "on", a graph that runs actions, or the build
optimization plan-locks turned off ([build] plan_locks = "configuration", MCPP_PLAN_LOCKS), the
configuration is held alone as before. mcpp why toolchain states the holding and its reason; a
wait names the plan's members. batch-fetch is listed as a build optimization. result.json holds
the record of the command that wrote it last, each command's own record is in its plan's
directory, which .last-result.json names. The command-line length limit is the host's, stated
in each system's native file.

The design record (v10) also carries the CPS sub-design (§3.12, D22 to D24): mcpp's model is
the centre, CPS a compatibility at two boundaries.
@Sunrisepeak Sunrisepeak changed the title test(e2e): a link and a pack under a caller's XLINGS_SUBOS_LD_PATHS keep the run path mcpp derived 2026.12.4.1: the ecosystem's boundary: toolchains named by path, library packages for other build systems, plan locks, CPS Dec 4, 2026
…cing them by time

A test waits for an event, never for a time (design 2026-11-20 §5.20): the fake installer's
frames arrive at once, and what the case asserts is the screen they leave.
…ild program declares an installed package by its description

mcpp's model is unchanged (design 2026-11-27 §3.12, D22 to D24): CPS (Common Package
Specification 0.15.0) is a compatibility at two boundaries, and its code is one module package,
modules/cps (mcpp.cps: the model, reading with the supplemental files, writing, versions, the
words; mcpp.cps.usage: the search, the platform match, the closure of components), with one
implementation unit at each use site.

Out: mcpp pack writes, beside each leg's .pc, lib/<triple>/cps/<identity>/<identity>.cps from
the same facts: one component named after the package (archive, or dylib with the import
library as link_location on PE), @Prefix@/include, the -l words as link_libraries, the
dependencies as requirements on their components (a private one of a static library as
link_requires), the leg's platform and x_mcpp_abi. Each leg has its own directory, because
CMake 4.5 does not compare `platform` (measured; read in its sources). [pack] descriptions
(default ["pkg-config", "cps"]) selects the descriptions written. The index entry of mcpp emit
xpkg --package calls the index's relocate_cps and declare_cps beside the pkg-config pair.

In: mcpp::cps_package (protocol 22, mcpp:cps-package=) declares a package another build system
installed. After the program runs and before anything is checked, applied or recorded, the
engine finds <name>.cps in the prefixes where CMake looks, matches the platform and the version,
closes the components over requires, link_requires and compile_requires under the configuration
the profile prefers, and accepts what they state as include-dir, cflag, cxxflag, link-flag,
runtime-search-dir and rerun-if-changed lines; the record holds those. Refusals
cps-no-matching-package, cps-components-unstated, cps-component-not-found,
cps-description-invalid; notes cps/modules-not-imported, cps/component-not-linked.

Both adapters are implementation units: importing the format's modules into the interface of
mcpp.build.build_program made GCC 16.1 crash at src/main.cpp's `import mcpp.cli`.

Docs: docs/14 (both languages), docs/10, 12, 30, 50, 03; SPEC-007 v0.17 (R2.5, protocol 22),
SPEC-014 v2.9 (§2.2 descriptions, §8.1); examples 14-cps and 05-lib-distribution/cmake-consumer.
The plan-locks change gave RunScope::begin the plan's state directory and
the scheduler semaphore a ninja variable of the plan, and joined batch_fetch,
plan_locks and lock_wait to the grouping key where they are stated; the unit
tests named the earlier forms. The explain registry's titles of the four CPS
reason tokens now equal docs/50's rows, as the unit test of the two requires.
… ran on every host

A dependency of the project's own index installs into the project's
environment, and the wave left it out: a project whose dependencies all come
from its own index fetched them one call at a time, which the e2e case of
two such dependencies states otherwise. Each environment now gets a wave of
its own, the project's through the same environment the single path uses.

SPEC-019 keeps a shape off until it has run on every host; the registry test
names plan-locks, on by default since the CI of this release runs it on
each host.
…ties as dotted keys

The root sheet states the architecture, the command a task needs, the
project conventions (a module in one .cppm with a private fragment;
dependencies as full identities in name order; mcpp-index's module
libraries first), how a message reads, and what to do when mcpp itself is
wrong: analyse, reduce, work around, report with the user's consent and,
when the cause is located, a fix, then print the address for review. Every
command sheet ends with the commands related to it, each a visible command,
which a unit test checks; the build sheet states build programs and the
official plugins.

mcpp info <package> shows one package of the indices: its versions and the
systems each serves, license, repository, features, what the project states
and locks of it, and the mcpp add line (mcpp.info envelope with
--format json).

mcpp add writes a dependency's full identity as a dotted key in name order,
the default namespace's packages as well, and replaces a bare key of the
same package; a [dependencies.<ns>] table keeps its form. The hints of the
bare-name fallback, of a declared identity and of a build program's missing
import, the guide's examples and the examples' manifests use that spelling;
an entry of [build-dependencies] that lists neither tools nor artifacts
omits host-module, which restates the default there.

The golden files carry this release's surface; the commands the help hides
are not items of it.
…cture, not from a crash

A GCC 16.1 crash once seen with the format's modules imported into the build
program's interface coincided with crashes on unrelated files and compiler
processes hung in the kernel on the same machine; it is not attributable to
that form and is not recorded as an upstream defect. The adapter stays an
implementation unit for what that gives: the format is in no importer's BMI.
@Sunrisepeak Sunrisepeak added the ci:full Run the full e2e set on this pull request (read when a push starts the run) label Dec 4, 2026
…s directories (mcpp#1032)

openkal-windows 0.23.2, which mcpplibs.os 0.4.8 resolves to, names the
image's directory and the working directory by the preopen mcpplibs.os
located them under, so the compiler under a substituted drive is started as
Z:\... rather than by its physical path.
"\x1fexport-module" is one hex escape, \x1fe, out of the range of a char: clang
refuses it, and GCC only warns, so the tree built with GCC and failed on every
host whose build uses clang (macOS, Windows, linux-aarch64).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Run the full e2e set on this pull request (read when a push starts the run)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants