Files
Iris/src/main/java/com/volmit/host/MissingClasses.java
T
piexel 98bd9a9c12 Let pack jars use classes nobody has, as optional dependencies
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.
2026-10-05 20:27:24 +02:00

19 lines
650 B
Java

package com.volmit.host;
import java.util.List;
import java.util.Objects;
/** Classes a module jar uses that neither its pack, Iris nor the JDK has, usually optional
* dependencies of a library the jar bundles. The jar still loads; code that needs one of these
* classes throws {@link NoClassDefFoundError} when it runs.
*
* @param origin the jar path relative to its pack
* @param classNames the missing classes as sorted binary names
*/
public record MissingClasses(String origin, List<String> classNames) {
public MissingClasses {
Objects.requireNonNull(origin, "origin");
classNames = List.copyOf(classNames);
}
}