Repository navigation
Description
Summary
mcpp-index now has a naming and layout rule for build plugins (packages whose modules a build.mcpp imports), and it would let mcpp add tell a build plugin from a library by its id alone. This issue records the rule, what we measured in the engine, and what mcpp add could do with it. Nothing here needs an engine change to work; it is information for you to use as you see fit.
Rule and design record: https://github.com/mcpplibs/mcpp-index/blob/main/docs/build-plugins.md and .agents/docs/2026-11-21-mcpp-build-plugin-naming-plan.md.
The rule
A build plugin's id is <owner>.mplugin.<name>; its module name and C++ namespace are that id (mcpplibs.mplugin.slint, mcpplibs::mplugin::slint). mplugin is a kind segment, as mwrap is for module wrappers (mcpplibs.mwrap.slint). Packages whose first segment is mcpp stay the mcpp project's. Descriptors live in a flat pkgs/mcpp/ directory (identity is still what the descriptor declares). Build rules published earlier (mcpplibs.slintgen, mcpplibs.grpcgen, mcpplibs.protogen, mcpplibs.clangtidy, mcpplibs.openkal-bind) are frozen as they are and move to the new form when they next need a version.
What we measured (mcpp 2026.11.18.1, the index's CI pin, and 2026.11.20.1; one host-module package per row, built from a build.mcpp that imports it)
| package id | module | engine warning |
|---|---|---|
mcpplibs.mplugin.slint |
mcpplibs.mplugin.slint |
none; mcpp::graph_file() is callable unqualified inside namespace mcpplibs::mplugin::slint |
mcpp.mcpplibs.slint |
mcpp.mcpplibs.slint |
"is under 'mcpp.' but not under its own namespace … a plugin names its modules 'mcpp.mcpp.mcpplibs.*'" |
mcpplibs.mcpp.slint |
mcpplibs.mcpp.slint |
none, but mcpp:: inside mcpplibs::mcpp::slint resolves to mcpplibs::mcpp ('graph_file' is not a member of 'mcpplibs::mcpp') |
mcpp.acme.x |
mcpp.plugins.x |
the "belongs to the modules maintained by the mcpp project" warning (the whole namespace is compared, not its first segment) |
mcpplibs.slintgen (existing) |
mcpp.mcpplibs.slintgen |
none |
So a module name outside mcpp. is not covered by the §9 check, which is what the new form relies on.
What mcpp add could do (a suggestion)
- An id whose second segment is
mplugin: write[build-dependencies]withhost-module = trueinstead of[dependencies]. mcpp.plugins: also a build dependency, but it needsfeatures(mcpp addhas only--devtoday).mcpp.platformsis not a build plugin (it is theplatform = "…"data package), so a first segment ofmcppalone is not a signal. The id is enough; the directory is not (pkgs/mcpp/holds both).- Possible extras, no more than ideas:
--build/--depoverrides; a hint when the id is a frozen one (FROZEN: superseded by <id>is in its description);mcpp removethe same way.
Happy to answer questions or measure more.
Activity
speak-agent commentedon Nov 27, 2026
Implemented in mcpp 2026.11.27.1 (#1023) as
mcpp add --build. Like--dev, it writes to a table of its own,[build-dependencies].mcpp removetakes--devand--build.mcpp adddoes not infer the table from the id, because the engine already knows a build plugin from its sources (a module that only build programs import). The<owner>.mplugin.<name>convention stays the index's. A plugin written into[dependencies]is still reported ashost-module-in-dependencies, and the remedy now spells both commands.