A module whose bundled library references optional integrations got a
WARNING on every pack load, with no way to say the classes are expected
to be absent. ModuleInfo now carries optionalPackages, set with
withOptionalPackages("org.slf4j", ...); ModuleInfo.of(id, name, version)
still declares none. Each package covers its subpackages.
Missing classes of a jar inside its own module's optional packages are
dropped from the warning and from PackModules.missingClasses(); other
jars are unaffected. The declaration comes from info(), so it is applied
after the entry classes exist. Load errors (hidden Iris classes, classes
missing from exposed packages) are decided before that and never depend
on it.
Package-name validation and whole-package matching move from
ExposedPackages to a new API value, PackageName, used by both.
The class check was stricter than the JVM: a bundled library that
references optional integrations failed the whole pack, although that
code only runs when the classes exist. Each missing reference is now
classified:
- the host has the class but hides it (Iris internals, Iris's copy of
a library): load error, saying modules cannot use Iris's classes;
- missing from the API: load error, as before (different Iris build);
- nobody has it: the pack loads. PackModules.missingClasses() lists
the classes per jar and the load logs one capped WARNING per pack,
formatted by MissingClassesWarning.
Reference resolution moves from PackClassCheck to PackReferenceCheck.