Skip to content

Commit cf37297

Browse files
authored
feat(mcpp.plugins): 0.5.0, an island's entry points in the module's namespace (#372)
`docs/42` states one rule for both lanes: the module name and the namespace are one identifier path. The shader lane followed it and `mcpp.tools.island` did not, emitting every entry point at global scope, so `import app.kernels` bought a file name and nothing else. A root's directories now extend the namespace exactly as a payload tree's do. The API says roots rather than files: `options::roots` names the directories implementations live under and `options::layout_root` names the one whose structure decides where entry points live. `options::strip_prefix` emits a short spelling beside the authored name, which stays canonical because it is the symbol. Breaking for a consumer of `tools-island`, and `latest` moves anyway: every published consumer pins an exact version, and the three examples in mcpp that use the generator move to 0.5.0 in the same batch. The floor stays at mcpp 2026.9.8.1. This changes what the package generates, not what it asks the engine for. The CN asset is the same bytes as the GitHub source archive of tag v0.5.0, sha256 ec11aa99e84d8d003afff9d93a9e76d8b84926ab2586058ee5d51344559777b9, verified by downloading it back after the upload.
1 parent cfd5a54 commit cf37297

1 file changed

Lines changed: 46 additions & 4 deletions

File tree

‎pkgs/m/mcpp.plugins.lua‎

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- each member selected by a feature.
33
--
44
-- [dependencies.mcpp]
5-
-- plugins = { version = "0.3.0", features = ["rules-spirv"], host-module = true }
5+
-- plugins = { version = "0.5.0", features = ["rules-spirv"], host-module = true }
66
--
77
-- // build.mcpp
88
-- import mcpp;
@@ -262,6 +262,27 @@
262262
-- reserved for this package. `mcpplibs:rules-cuda@0.1.0` (pkgs/r/rules-cuda.lua)
263263
-- stays in the index, superseded by this collection.
264264
--
265+
-- 0.5.0 gives an island's entry points the module's own namespace. `docs/42`
266+
-- states one rule for both lanes -- the module name and the namespace are one
267+
-- identifier path -- and the shader lane followed it while `mcpp.tools.island`
268+
-- did not: every entry point was emitted at global scope, so `import
269+
-- app.kernels` bought a file name and nothing else. A root's directories now
270+
-- extend the namespace exactly as a payload tree's do.
271+
--
272+
-- The API says roots rather than files. `options::roots` names the directories
273+
-- implementations live under and `options::layout_root` names the one whose
274+
-- structure decides where entry points live; every other root only has to
275+
-- define the same names. `options::strip_prefix` emits a short spelling beside
276+
-- the authored name, which stays canonical because it is the symbol.
277+
--
278+
-- It is BREAKING for a consumer of `tools-island`: a qualified name replaces a
279+
-- global one. Every published consumer pins an exact version, so moving
280+
-- `latest` breaks none of them, and the three examples in mcpp that use the
281+
-- generator move to 0.5.0 in the same batch.
282+
--
283+
-- The floor does not move. 0.5.0 changes what the package generates, not what
284+
-- it asks the engine for, so it stays at mcpp 2026.9.8.1.
285+
--
265286
-- The descriptor points at the source archive of the tag, the shape `grpcgen`
266287
-- established; the CN asset is the same bytes, so one sha256 names both.
267288
package = {
@@ -275,6 +296,13 @@ package = {
275296

276297
xpm = {
277298
linux = {
299+
["0.5.0"] = {
300+
url = {
301+
GLOBAL = "https://github.com/mcpp-community/mcpp-plugins/archive/refs/tags/v0.5.0.tar.gz",
302+
CN = "https://gitcode.com/mcpp-res/mcpp-plugins/releases/download/0.5.0/mcpp-plugins-0.5.0.tar.gz",
303+
},
304+
sha256 = "ec11aa99e84d8d003afff9d93a9e76d8b84926ab2586058ee5d51344559777b9",
305+
},
278306
["0.4.0"] = {
279307
url = {
280308
GLOBAL = "https://github.com/mcpp-community/mcpp-plugins/archive/refs/tags/v0.4.0.tar.gz",
@@ -352,9 +380,16 @@ package = {
352380
},
353381
sha256 = "adf1f9d6691a5d05a8a4a94e83c733ea39caee1510ce2c9af4cb23bebabea9f5",
354382
},
355-
["latest"] = { ref = "0.4.0" },
383+
["latest"] = { ref = "0.5.0" },
356384
},
357385
macosx = {
386+
["0.5.0"] = {
387+
url = {
388+
GLOBAL = "https://github.com/mcpp-community/mcpp-plugins/archive/refs/tags/v0.5.0.tar.gz",
389+
CN = "https://gitcode.com/mcpp-res/mcpp-plugins/releases/download/0.5.0/mcpp-plugins-0.5.0.tar.gz",
390+
},
391+
sha256 = "ec11aa99e84d8d003afff9d93a9e76d8b84926ab2586058ee5d51344559777b9",
392+
},
358393
["0.4.0"] = {
359394
url = {
360395
GLOBAL = "https://github.com/mcpp-community/mcpp-plugins/archive/refs/tags/v0.4.0.tar.gz",
@@ -432,9 +467,16 @@ package = {
432467
},
433468
sha256 = "adf1f9d6691a5d05a8a4a94e83c733ea39caee1510ce2c9af4cb23bebabea9f5",
434469
},
435-
["latest"] = { ref = "0.4.0" },
470+
["latest"] = { ref = "0.5.0" },
436471
},
437472
windows = {
473+
["0.5.0"] = {
474+
url = {
475+
GLOBAL = "https://github.com/mcpp-community/mcpp-plugins/archive/refs/tags/v0.5.0.tar.gz",
476+
CN = "https://gitcode.com/mcpp-res/mcpp-plugins/releases/download/0.5.0/mcpp-plugins-0.5.0.tar.gz",
477+
},
478+
sha256 = "ec11aa99e84d8d003afff9d93a9e76d8b84926ab2586058ee5d51344559777b9",
479+
},
438480
["0.4.0"] = {
439481
url = {
440482
GLOBAL = "https://github.com/mcpp-community/mcpp-plugins/archive/refs/tags/v0.4.0.tar.gz",
@@ -512,7 +554,7 @@ package = {
512554
},
513555
sha256 = "adf1f9d6691a5d05a8a4a94e83c733ea39caee1510ce2c9af4cb23bebabea9f5",
514556
},
515-
["latest"] = { ref = "0.4.0" },
557+
["latest"] = { ref = "0.5.0" },
516558
},
517559
},
518560

0 commit comments

Comments
 (0)