Repository navigation
release: 2026.10.26.1 -- the control contract, concurrency, one C++ runtime per process (#838, #839) - #841
Merged
Conversation
…ord and the control contract - mcpp.build.dirlock: one lock per build directory, taken when the finish phase starts writing it and held through ninja; fast paths take it around ninja; run releases it before the program starts; waiters see the holder (pid, command, MCPP_CLIENT, age). Fixes #839. - Link outputs are published whole: POSIX links write $out.tmp and rename; a Windows host moves the old artifact aside (mcpp link-output). - target/.build_cache: read-modify-write under its own lock, atomic replace. - mcpp.build.result: result.json (running/ok/failed), target/.last-result.json, artifacts with launch descriptors, compiler diagnostics. - mcpp build --message-format json: NDJSON events (plan, waiting, progress, diagnostic, artifact) and the mcpp.build envelope. - mcpp run --print-launch: the mcpp.launch envelope. - --deny / MCPP_DENY_EFFECTS; --offline is --deny network; a run stopped before a denied effect exits 5. - --home <dir>: this run's home (MCPP_HOME for one process). Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…abase, a cheaper cache listing - search --format json (mcpp.search; no keyword lists the catalogue, each index read once by declared identity), index list --format json (mcpp.index), pack --list-formats (mcpp.pack.formats); --protocol-version lists them. - CLICOLOR_FORCE / FORCE_COLOR force colour; NO_COLOR / MCPP_NO_COLOR win. - [build] compile_commands (config.toml default, MCPP_COMPILE_COMMANDS override): the project-root copy of the compile database is published only where asked; a copy an earlier mcpp left is named once. The configuration record carries the location for the fast path. e2e tests that read the root copy opt in. - Cache entries record their footprint when written; cache list reads it. - A failed provisioning reports xlings' diagnostic without suggesting the same install by hand. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…lang; verified islands
- A package that provides mcpp:c++-abi=libstdc++ serves an llvm build: the
link takes the libstdc++ cells with -stdlib=libstdc++ --unwindlib=libgcc
(compiler-rt stays); a std module whose source clang does not know by its
extension (libstdc++'s bits/std.cc) is precompiled as a module.
- requires takes { layer, visibility }: visibility = "private" (c++-abi only,
requires-private-layer otherwise) declares an island; [target.<sel>]
requires unions in like requires_abi.
- The island: declared, named on the link line, or needed by a library the
line names (DT_NEEDED). Refused when the build also links a C++ shared
library [cxx-runtime-island]; the other runtime's words follow the build's
own runtime on the line (mcpp#838); every C++ image is verified after the
link [cxx-runtime-collision]: no layout-dependent references from island
objects, no ABI-layer imports at the other runtime's versions, no typeinfo
shared with an image built on it.
- The ldflags substring sniff for stdc++ is gone.
- abi: capabilities read the resolved target side (COMPAT abi-capability);
an undeclared island is the COMPAT reading undeclared-cxx-runtime.
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… database, whole link outputs 935-938 fail on 2026.10.24.1 (935 by chance: the race is timing-dependent). The failed build's raw ninja output reaches the result record, and the mcpp.build envelope is one line of the NDJSON stream. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…d under the home Keyed by the command and the size and mtime of the files it names (the compiler), and by the xlings binary's path, size and mtime. With xlings 2026.10.26.1: emit build-database 604 -> 71 ms, toolchain list 554 -> 44 ms, a build with nothing to do 50 ms. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…written optimistically; a diagnostic carries the location its message names A signal that ends a build while it writes its directory leaves result.json and target/.last-result.json as cancelled: the interrupted form is rendered when the run starts, and the handler writes it with open/write/rename after it has stopped the guarded groups (POSIX status 128+N; Windows: the console handler). mcpp.lock is compared, before it is written, with what the run read when it started; a lock another run wrote meanwhile is not overwritten ([lockfile-concurrent], help: run the command again). It is replaced atomically; a linked lock is written through its link, and a read-only one is refused as before. A manifest's rejection is located at the key or table it names, and an envelope's diagnostic takes path and range from a message that begins with a location. mcpp build and mcpp pack under --message-format json carry mcpp's own errors as diagnostics. The function-size and Unicode-path checks read the configuration's compile database when the project asks for no root copy. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…elp: A build program reads MCPP_CXX_STDLIB as the graph's c++-abi supplier says, and MCPP_CXX_ABI_ROOT (mcpp::cxx_abi_root()) names that package's root, so a rule that drives a second compiler -- the SYCL device compiler -- points it at the same C++ library. Read from the declarations, because build programs run before the target side is resolved. mcpp's next-step lines read help: (they read hint:), one convention with the diagnostics' help lines (SPEC-012). Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… and driving mcpp from a program docs/50 gains the build stream, the result record, the launch descriptor, --deny, the queries and the caller's name; docs/52 states how a program or an agent drives mcpp. New specifications: SPEC-011 (concurrent runs) and SPEC-012 (output for people). SPEC-002 v1.3 (requires as a table, one C++ runtime per process), SPEC-003 v1.2 (exit 5 and signals), SPEC-010 v0.2 (--home). docs/22 and docs/42 describe the runtime modes and SYCL on libstdc++; docs/04 the [build] compile_commands key. The design record gains revision 4. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
<windows.h> defines min as a macro; std::min is parenthesised. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…ated by a cache `mcpp run --format <f>` builds the program and then packs it, and the pack plans the same configuration: the second acquisition of the directory's lock waited for the first, in the same process (flock and LockFileEx lock per open file). The lock is now shared by every holder in the process. The compiler-probe and provider-handshake caches are written only in a home that exists, so an offline `self doctor` of a cold home leaves none behind (e2e 604 on Windows, where the doctor probes MSVC). The function-size check points clang-tidy at the directory of the database it read; e2e 936 compares a launch's program with its artifact as paths. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…s recognised on Windows The compiler-probe and provider-handshake answers are written only by a run that writes the global cache -- one that plans or builds, and was not denied write-global-cache -- and read by every command. `self doctor`, `self env` and `toolchain list` declare no such effect, and an online doctor changed the home (e2e 920 on Windows). The note about a root compile_commands.json an earlier mcpp left compares the file's directories in one spelling, so a Windows file (escaped backslashes, a drive letter in either case) is recognised (e2e 937). Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
The vendored floor and every CI pin move to xlings 2026.10.26.1 (openxlings/xlings#707). Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…est without sed -i Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
… its own way Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…tright Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
This was referenced Oct 26, 2026
Sunrisepeak
pushed a commit
to openxlings/xim-pkgindex
that referenced
this pull request
Oct 26, 2026
mcpp 2026.10.26.1 (mcpp-community/mcpp#841); payload sha256 checked against the GitHub and GitCode .sha256 sidecars. Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
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.
Release 2026.10.26.1 — the control contract, concurrency, and one C++ runtime per process. Fixes #838 and #839. Design:
.agents/docs/2026-10-26-control-contract-runtime-and-ide-ecosystem-design.md(rev 4 records what changed during implementation). Probe PR #840 settled O5, O8 and O10 on real runners.What changes
Concurrency (#839, SPEC-011)
.mcpp-build.lockwith an owner record). It is taken once the configuration's fingerprint names the directory and held until ninja finishes.Waiting for the build directory, held by pid N (cmd, from client, Ns)) and emits awaitingevent.runreleases the lock before exec.testholds it until its tests finish.$out.tmp, thenmv -f.mcpp link-outputrenames the old file aside first.target/.build_cacheandmcpp.lockare replaced atomically.mcpp.lockis written optimistically: a lock another run wrote meanwhile is not overwritten ([lockfile-concurrent]).cancelled, and dies of the signal (exit128+N).The control contract (docs/50 §9–§13, docs/52)
mcpp build --message-format jsonstreams NDJSON events (plan,waiting,progress,diagnostic,artifact) and ends with a one-linemcpp.buildenvelope.result.json, plustarget/.last-result.json. The record holds the artifacts with their launch descriptors and the compiler diagnostics with path and range.mcpp run --print-launchprints the launch descriptor instead of running.--deny <effects>andMCPP_DENY_EFFECTS: a run stops before a denied effect and exits5.--offlinecounts as--deny network.--home.search --format json(mcpp.search)index list --format json(mcpp.index)pack --list-formats(mcpp.pack.formats)CLICOLOR_FORCE/FORCE_COLOR.MCPP_CLIENTnames the caller in the lock owner and in the result record.pathandrange.help:.One C++ runtime per process (#838, SPEC-002 §7)
DT_NEEDED). The old substring sniff is gone.requires = [{ layer = "mcpp:c++-abi=libstdc++", visibility = "private" }](also under[target.<sel>]). It is verified after the link ([cxx-runtime-collision]) and refused beside a C++ shared library ([cxx-runtime-island]).gcc.libstdcxx). Build programs seeMCPP_CXX_STDLIBandMCPP_CXX_ABI_ROOT.abi:capabilities are read asrequires(COMPATabi-capability).Other
compile_commands.jsonis written only when asked for. Precedence:MCPP_COMPILE_COMMANDS, then[build] compile_commands, then theconfig.tomldefault.cache listreads each entry's recorded footprint.Tests
check_*script that runs on Linux passes, andgit diff --checkis clean.emit build-database71 ms,toolchain list44 ms,buildwith no changes 50 ms.Ecosystem
--home, and hooks in a project store now findxlings.feat/sycl-one-cxx-runtime(0.20.0): the sycl rule requires libstdc++.gcc.libstdcxx;compat.sycl-runtimerequires libstdc++; mp-units requires the llvm compiler; glfw requiresc-abi=glibc; a new llvm + libstdc++ smoke member.