Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbashir committed Jun 16, 2024
1 parent dc8f4db commit f4ce79a
Show file tree
Hide file tree
Showing 15 changed files with 53 additions and 470 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins {
group = "io.art.java"

tasks.withType(type = Wrapper::class) {
gradleVersion = "7.2"
gradleVersion = "8.5"
}

generator {
Expand Down
9 changes: 4 additions & 5 deletions core/src/main/java/io/art/core/graal/GraalCoreFeature.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package io.art.core.graal;

import com.oracle.svm.core.annotate.*;
import org.graalvm.nativeimage.hosted.*;
import static io.art.core.constants.GraalConstants.*;
import static io.art.core.graal.GraalNativeRegistrator.*;
import org.graalvm.nativeimage.hosted.Feature;

import static io.art.core.constants.GraalConstants.GRAAL_NATIVE_CORE_CLASSES;
import static io.art.core.graal.GraalNativeRegistrator.registerForNativeUsage;

@AutomaticFeature
public class GraalCoreFeature implements Feature {
@Override
public void beforeAnalysis(BeforeAnalysisAccess access) {
Expand Down
32 changes: 18 additions & 14 deletions core/src/main/java/io/art/core/graal/GraalNativeRegistrator.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
package io.art.core.graal;

import com.oracle.svm.core.jdk.*;
import com.oracle.svm.core.jni.*;
import com.oracle.svm.hosted.*;
import com.oracle.svm.hosted.c.*;
import lombok.experimental.*;
import org.graalvm.nativeimage.hosted.Feature.*;
import org.graalvm.nativeimage.hosted.*;
import static com.oracle.svm.hosted.FeatureImpl.*;
import static io.art.core.checker.NullityChecker.*;
import static io.art.core.graal.GraalNativeLibraryConfiguration.Type.*;
import java.lang.reflect.*;
import java.util.*;
import com.oracle.svm.core.jdk.NativeLibrarySupport;
import com.oracle.svm.core.jdk.PlatformNativeLibrarySupport;
import com.oracle.svm.core.jni.JNIRuntimeAccess;
import com.oracle.svm.hosted.FeatureImpl;
import com.oracle.svm.hosted.c.NativeLibraries;
import io.art.core.checker.NullityChecker;
import lombok.experimental.UtilityClass;
import org.graalvm.nativeimage.hosted.Feature.BeforeAnalysisAccess;
import org.graalvm.nativeimage.hosted.RuntimeReflection;

import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Collection;

import static io.art.core.graal.GraalNativeLibraryConfiguration.Type.STATIC;

@UtilityClass
public class GraalNativeRegistrator {
Expand Down Expand Up @@ -57,13 +61,13 @@ public static void registerForNativeUsage(Class<?> owner) {
public static void registerNativeLibraries(BeforeAnalysisAccess access, GraalNativeLibraryConfiguration... libraries) {
NativeLibrarySupport nativeLibrarySupport = NativeLibrarySupport.singleton();
PlatformNativeLibrarySupport platformNativeLibrarySupport = PlatformNativeLibrarySupport.singleton();
NativeLibraries nativeLibraries = ((BeforeAnalysisAccessImpl) access).getNativeLibraries();
NativeLibraries nativeLibraries = ((FeatureImpl.BeforeAnalysisAccessImpl) access).getNativeLibraries();
Collection<String> libraryPaths = nativeLibraries.getLibraryPaths();
for (GraalNativeLibraryConfiguration library : libraries) {
libraryPaths.add(library.getLocation().resolve().toString());
if (library.isBuiltin() && library.getType() == STATIC) {
nativeLibrarySupport.preregisterUninitializedBuiltinLibrary(library.getName());
forEach(library.getBuiltinSymbolPrefixes(), platformNativeLibrarySupport::addBuiltinPkgNativePrefix);
NullityChecker.forEach(library.getBuiltinSymbolPrefixes(), platformNativeLibrarySupport::addBuiltinPkgNativePrefix);
nativeLibraries.addStaticJniLibrary(library.getName());
continue;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Args=-H:ReflectionConfigurationResources=${.}/reflection-config.json \
--initialize-at-build-time=sun.instrument.InstrumentationImpl
--features\=io.art.core.graal.GraalCoreFeature \
--initialize-at-build-time=sun.instrument.InstrumentationImpl
38 changes: 15 additions & 23 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,22 @@ org.gradle.parallel=true
org.gradle.jvmargs=-Xms1g -Xmx1g -XX:MetaspaceSize=1g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8 -Dhttps.protocols=TLSv1.2

# External dependency versions
jacksonVersion=2.10.+
lombokVersion=1.18.+
sl4jVersion=1.7.+
jacksonVersion=2.17.1
lombokVersion=1.18.32
sl4jVersion=1.7.9
guavaVersion=28.1-jre
reactorVersion=3.4.+
reactorNettyVersion=1+
rsocketVersion=1+
reactorVersion=3.6.7
reactorNettyVersion=1.1.20
rsocketVersion=1.1.4
tarantoolCartridgeConnectorVersion=0.3.3
messagePackVersion=0.8.+
vavrVersion=0.10.+
nettyVersion=4.1.69.Final
dropwizardVersion=1.3.+
metricsDropwizVersion=4.0.+
micrometerPrometheusVersion=1.+
micrometerJvmExtrasVersion=0.1.4
prometheusDropwizardSimpleClient=0.7+
dropwizardMetricsVersion=4.0.+
dropwizrdMetricsJvmVersion=4.1+
prometheusSimpleClientVersion=0.9+
graalVersion=21.3.0
messagePackVersion=0.9.8
vavrVersion=0.10.4
nettyVersion=4.1.111.Final
graalVersion=24.0.1
jctoolsVersion=3.3.0
lz4Version=1.7.+
jetbrainsAnnotationsVersion=21.+
junitVersion=5.+
junitPlatformVersion=1.7.+
lz4Version=1.8.0
jetbrainsAnnotationsVersion=24.1.0
junitVersion=5.10.2
junitPlatformVersion=1.10.2
jmhVersion=0.6.4
internalPluginVersion=main
internalPluginVersion=main
41 changes: 0 additions & 41 deletions metrics/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit f4ce79a

Please sign in to comment.