mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 00:04:42 +00:00
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.
19 lines
650 B
Java
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);
|
|
}
|
|
}
|