Build fixes

This commit is contained in:
crschnick 2024-06-22 01:46:15 +00:00
parent f465e19edc
commit 93eb1075ac
2 changed files with 4 additions and 18 deletions

View file

@ -46,7 +46,6 @@ public class AppExtensionManager {
INSTANCE.determineExtensionDirectories(); INSTANCE.determineExtensionDirectories();
INSTANCE.loadBaseExtension(); INSTANCE.loadBaseExtension();
INSTANCE.loadAllExtensions(); INSTANCE.loadAllExtensions();
INSTANCE.loadUaccExtension();
} }
if (load) { if (load) {
@ -140,7 +139,7 @@ public class AppExtensionManager {
} }
private void loadAllExtensions() { private void loadAllExtensions() {
for (var ext : List.of("jdbc", "proc")) { for (var ext : List.of("jdbc", "proc", "uacc")) {
var extension = findAndParseExtension(ext, baseLayer) var extension = findAndParseExtension(ext, baseLayer)
.orElseThrow(() -> ExtensionException.corrupt("Missing module " + ext)); .orElseThrow(() -> ExtensionException.corrupt("Missing module " + ext));
loadedExtensions.add(extension); loadedExtensions.add(extension);
@ -155,21 +154,6 @@ public class AppExtensionManager {
.layer(); .layer();
} }
private void loadUaccExtension() {
var extension = findAndParseExtension("uacc", extendedLayer)
.orElseThrow(() -> ExtensionException.corrupt("Missing module uacc"));
loadedExtensions.add(extension);
leafModuleLayers.add(extension.getModule().getLayer());
var scl = ClassLoader.getSystemClassLoader();
var cfs = leafModuleLayers.stream().map(ModuleLayer::configuration).toList();
var finder = ModuleFinder.ofSystem();
var cf = Configuration.resolve(finder, cfs, finder, List.of());
extendedLayer = ModuleLayer.defineModulesWithOneLoader(cf, leafModuleLayers, scl)
.layer();
}
private Optional<Extension> findAndParseExtension(String name, ModuleLayer parent) { private Optional<Extension> findAndParseExtension(String name, ModuleLayer parent) {
var inModulePath = ModuleLayer.boot().findModule("io.xpipe.ext." + name); var inModulePath = ModuleLayer.boot().findModule("io.xpipe.ext." + name);
if (inModulePath.isPresent()) { if (inModulePath.isPresent()) {

View file

@ -33,7 +33,9 @@ public class ShellStoreState extends DataStoreState implements OsNameState {
return b.build(); return b.build();
} }
protected void mergeBuilder(ShellStoreState shellStoreState, ShellStoreStateBuilder<?, ?> b) { // Do this with an object to fix javadoc compile issues
protected void mergeBuilder(ShellStoreState shellStoreState, Object builder) {
ShellStoreStateBuilder<?, ?> b = (ShellStoreStateBuilder<?, ?>) builder;
b.osType(useNewer(osType, shellStoreState.getOsType())) b.osType(useNewer(osType, shellStoreState.getOsType()))
.osName(useNewer(osName, shellStoreState.getOsName())) .osName(useNewer(osName, shellStoreState.getOsName()))
.shellDialect(useNewer(shellDialect, shellStoreState.getShellDialect())) .shellDialect(useNewer(shellDialect, shellStoreState.getShellDialect()))