0.17.0: the general library for build programs, the resolved toolset in deps-vcpkg and deps-cmake, and a test kit for plugins (mcpp#734) - #37
Merged
Conversation
…in deps-vcpkg and deps-cmake, and a test kit for plugins (mcpp#734) - L2, `plugins-core` (renamed from `surface`, which is kept as an alias until 2027-03-28): `mcpp.plugins.declare`, the new `mcpp.plugins.toolset`, which turns the engine's build information into how a toolset reaches a foreign build system (`instance`, `chain`, `detected`), and the new `mcpp.plugins.fs`, which takes `write_if_changed` and the placement helpers from `mcpp.deps`. `plugins-testing` adds `mcpp.plugins.testing`. - deps-vcpkg builds the ports with the toolset mcpp resolved. A Visual Studio instance is selected with VCPKG_VISUAL_STUDIO_PATH and the standard triplet; any other toolset is named in a derived triplet `<base>-mcpp-<hash>` whose text and chain-loaded toolchain hold no path, with the derived triplet as the host triplet and a kept PATH on the MSVC ABI. An MSBuild port under `chain` is refused by name. The C runtime follows the program's contract, and a project triplet that contradicts it is refused naming both statements. - deps-cmake: the Visual Studio generator pointed at the instance, or Ninja with mcpp's ninja and the named tools; CMAKE_MSVC_RUNTIME_LIBRARY follows the program; one build directory per toolset statement. - Compatibility units under `compat/` (`toolset = detected`, the 0.16.0 names in `mcpp::deps`), and a CI check that fails once a unit's date has passed. - `[package] mcpp = ">=2026.9.28.3"`. - Tests: `tests/plugin-logic` (14 cases on stated contexts, every host), the C runtime leg on the Visual Studio row, and a Windows job with Visual Studio masked and the managed toolset: a CMake port, a CMake subproject, a make port (icu) and the MSBuild refusal (libusb).
…reads the call stack - mcpp runs its GCC payload with a sysroot, a binutils directory and a link model that only its own command lines carry, so the driver alone is not a complete handover: vcpkg's compiler detection failed with it on CI. On that row the host compiler's libstdc++ is the program's C++ library, and `resolved` answers `detected`, stating why. The clang payloads are complete through their `.cfg` files and stay `chain`. - The MSBuild watch matched the current file, which inside a function is the caller's (the portfile), so it never fired; it now matches the helper in the call stack, by its own directory and file names (measured with CMake 4.4: the helper is refused, a CMake helper's read is not).
…ng the toolset module With mcpp.plugins.toolset in mcpp.deps' re-export chain, GCC 16 emitted no vector<string>::push_back(string&&) for a build program that calls deps::archive::unpack, and its link failed (the Linux archive-consumer row).
…ne's whole PATH The engine's tool_env PATH is the cl.exe directory followed by the PATH of the process that ran mcpp. Under Git Bash that carries Git's msys tools and runtime, and icu's configure, run by vcpkg with that PATH kept, failed with 'invalid variable name: 0'. The toolset's and the SDK's binary directories are what a foreign system needs, as the design's measurement M3c kept.
…t and the design records refer to the validation project Two design records named after it are renamed accordingly.
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.
Implements the plugin half of mcpp-community/mcpp#734, as designed in mcpp's
.agents/docs/2026-09-28-build-cost-foreign-toolsets-and-library-surface-design.md(§3, §6; §13.5 records the tasks and the departures). Release 0.17.0; the package floor is mcpp 2026.9.28.3 (mcpp-community/mcpp#735).What changes
plugins-core(renamed fromsurface, kept as an alias until 2027-03-28):mcpp.plugins.declare, the newmcpp.plugins.toolsetandmcpp.plugins.fs.plugins-testingadds the test kit.[package] mcpp = ">=2026.9.28.3". Compatibility units undercompat/, and a CI check that fails once a unit's date has passed.all-rules-compileon every row;check-compat-retirement.shmcpp.plugins.toolset: how the resolved toolset reaches a foreign build system.instancefor a Visual Studio toolset,chainfor a managed MSVC toolset and the clang rows,detectedon request and on the Linux GCC row, whose payload driver is not a complete handover.tests/plugin-logicVCPKG_VISUAL_STUDIO_PATH(same ABI hash as before), or a derived triplet<base>-mcpp-<hash>whose text and chain-loaded toolchain hold no path, the derived triplet as host triplet and the toolset's directories on a kept PATH on the MSVC ABI; an MSBuild port underchainrefused by name; the C runtime follows the program's contract and a contradicting project triplet is refused. deps-cmake: the Visual Studio generator on that instance, or Ninja with mcpp's ninja;CMAKE_MSVC_RUNTIME_LIBRARYfollows the program. docs/deps.md states each mechanism, the port kinds it builds, and the upgrade effect.mcpp.plugins.testing: a plugin function runs in a child process against a stated context, and its directives and files are checked.tests/plugin-logic: 14 cases; removing the host-triplet argument fails exactly the managed-row caseReadings
Dispatch run 36441093549 (
mcpp_source_ref=feat/734-build-plugin-architecture), all four jobs green:llvm@22.1.8the ports build with mcpp's clang through a derived triplet and the two toolsets' prefixes coexist; deps-cmake with mcpp's clang; the compatibility check.x64-windows; a self-contained program's ports arex64-windows-staticand link, andx64-windowsnamed under it is refused naming both statements.msvc@14.44.35207. A CMake port (fmt) and a CMake subproject build with the toolset named; a make-based port (icu) builds with the toolset first on the kept PATH; an MSBuild port (libusb) is refused by name.Findings on the way, each fixed here and recorded in the design: the GCC payload driver is not a complete handover (it runs with a sysroot, binutils and a link model only mcpp's command lines carry); a
variable_watchcallback sees the caller's file, so the MSBuild refusal matches the call stack; the engine'stool_envPATH carries the whole process PATH (Git's msys tools broke icu's configure), so the chain's PATH is the tools' own directories; GCC 16 dropped an instantiation when the compatibility unit imported the toolset module.The push-triggered CI pins the released mcpp 2026.9.27.1 and stops at the package floor until 2026.9.28.3 is released; the pin moves in this PR then.