Stop reserving namespaces, let a jar list several modules and add ModuleJarCheck for builds that write module jars

ReservedNamespaces and ModuleHost.reservingNamespaces are gone: a pack module may use any
namespace, iris included. A module id is still loaded once, and the duplicate error now names
the origin and class of both modules, so two modules of one jar can be told apart.

A jar lists one module class per line in META-INF/services/com.volmit.IrisModule and loads all
of them in that order; each class must still be defined in the jar. A jar with several modules
is excused by the optional packages of all of them.

ModuleJarCheck runs the load's class checks on one jar without loading it.
This commit is contained in:
piexel committed 2026-10-09 14:08:33 +02:00
1 parent ef4b640867
commit 42d31a9ce4
21 files changed
+330 -208

No files matched your search

@@ -202,7 +202,7 @@ class PlacementLifecyclePortTest {
@Test
void loadingThePortCatalogsEveryConditioningSettingsType() {
var loaded = LoadedModules.load(PlacementModules.builtIns(), Map.of(), Set.of(), Set.of(), Set.of());
var loaded = LoadedModules.load(PlacementModules.builtIns(), Map.of(), Set.of(), Set.of());
assertEquals(List.of("example:moss", "iris:snow", "iris:stilt"),
loaded.catalog().settings().stream().map(settings -> settings.id().toString()).toList());