mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 16:25:36 +00:00
Add module display names, reject duplicate pack classes, log pack modules
ModuleInfo gains a required, non-blank display name next to id and version: ModuleInfo.of(id, name, version). PackModules now fails when a class is in two jars of one pack, naming the class and both jars. ModuleJar indexes class names while it reads the entry point, so the check runs before the pack class loader exists and nothing is half-loaded. Jars are read with the runtime's multi-release version, like the loader reads them: a versioned class counts once under its base name; module-info.class and anything under META-INF/ are ignored. A successful load logs one INFO summary through System.Logger with the display name, id, version and jar of each module, or a line saying the pack has no module jars. PackModulesSummary builds the text and is tested without a logging backend.
This commit is contained in:
1 parent
4fa6ddcd7a
commit
b137bc6d92
19 files changed
+328
-53
No files matched your search
@@ -17,7 +17,7 @@ public final class TerrainModule implements IrisModule {
|
||||
|
||||
@Override
|
||||
public ModuleInfo info() {
|
||||
return ModuleInfo.of("iris:terrain", "test");
|
||||
return ModuleInfo.of("iris:terrain", "Terrain", "test");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user