Skip to content

Commit a696329

Browse files
committed
Update to Graal 19
1 parent 77fc4ca commit a696329

File tree

6 files changed

+40
-14
lines changed

6 files changed

+40
-14
lines changed

pom.xml

+6-2
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
<maven.compiler.source>1.8</maven.compiler.source>
1919
<maven.compiler.testSource>1.8</maven.compiler.testSource>
2020
<maven.compiler.testTarget>1.8</maven.compiler.testTarget>
21-
<graal.version>1.0.0-rc12</graal.version>
21+
<graal.version>19.0.0</graal.version>
2222
</properties>
2323

2424
<dependencyManagement>
2525
<dependencies>
2626
<dependency>
2727
<groupId>io.vertx</groupId>
2828
<artifactId>vertx-stack-depchain</artifactId>
29-
<version>3.6.3</version>
29+
<version>3.7.1</version>
3030
<type>pom</type>
3131
<scope>import</scope>
3232
</dependency>
@@ -87,6 +87,10 @@
8787
<phase>package</phase>
8888
</execution>
8989
</executions>
90+
<configuration>
91+
<imageName>lambda</imageName>
92+
<buildArgs>--enable-all-security-services --report-unsupported-elements-at-runtime --allow-incomplete-classpath</buildArgs>
93+
</configuration>
9094
</plugin>
9195
</plugins>
9296
</build>

src/main/java/SVMSubstitutions.java

-11
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,3 @@ public static ResolverProvider factory(Vertx vertx, AddressResolverOptions optio
5959
return new DefaultResolverProvider();
6060
}
6161
}
62-
63-
@AutomaticFeature
64-
class RuntimeReflectionRegistrationFeature implements Feature {
65-
public void beforeAnalysis(BeforeAnalysisAccess access) {
66-
try {
67-
RuntimeReflection.register(java.util.LinkedHashMap.class.getDeclaredConstructor());
68-
} catch (NoSuchMethodException e) {
69-
throw new RuntimeException(e);
70-
}
71-
}
72-
}

src/main/java/vertx/lambda/Lambda.java

+7
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@
2626
@FunctionalInterface
2727
public interface Lambda {
2828

29+
String LAMBDA_RUNTIME_AWS_REQUEST_ID = "Lambda-Runtime-Aws-Request-Id";
30+
String LAMBDA_RUNTIME_DEADLINE_MS = "Lambda-Runtime-Deadline-Ms";
31+
String LAMBDA_RUNTIME_INVOKE_FUNCTION_ARN = "Lambda-Runtime-Invoke-Function-Arn";
32+
String LAMBDA_RUNTIME_TRACE_ID = "Lambda-Runtime-Trace-Id";
33+
String LAMBDA_RUNTIME_CLIENT_CONTEXT = "Lambda-Runtime-Client-Context";
34+
String LAMBDA_RUNTIME_COGNITO_IDENTITY = "Lambda-Runtime-Cognito-Identity";
35+
2936
/**
3037
* Responses are asynchronous.
3138
*

src/main/java/vertx/lambda/LambdaBootstrap.java

+2
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ private void success(String requestURI, Buffer result, Handler<AsyncResult<Void>
156156
}
157157

158158
private void fail(String requestURI, String errMsg, String errType) {
159+
System.err.println("ERR: " + errMsg);
160+
159161
final JsonObject error = new JsonObject()
160162
.put("errorMessage", errMsg)
161163
.put("errorType", errType);

src/main/resources/META-INF/native-image/io.vertx/vertx-core/native-image.properties

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
Args = -H:+ReportUnsupportedElementsAtRuntime \
1+
Args = --initialize-at-build-time=io.netty,io.vertx,com.fasterxml.jackson,javax \
2+
--initialize-at-run-time=io.netty.util.internal.logging.Log4JLogger,io.netty.handler.codec.http.HttpObjectEncoder,io.netty.handler.codec.http.websocketx.WebSocket00FrameEncoder,io.netty.handler.codec.http2.Http2CodecUtil,io.netty.handler.codec.http2.DefaultHttp2FrameWriter,io.netty.handler.ssl.ReferenceCountedOpenSslServerContext,io.netty.handler.ssl.JdkNpnApplicationProtocolNegotiator,io.netty.handler.ssl.ReferenceCountedOpenSslEngine,io.netty.handler.ssl.ConscryptAlpnSslEngine,io.netty.handler.ssl.JettyNpnSslEngine,io.netty.handler.ssl.ReferenceCountedOpenSslClientContext,io.vertx.core.net.impl.transport.EpollTransport,io.vertx.core.net.impl.transport.KQueueTransport,io.vertx.core.http.impl.VertxHttp2ClientUpgradeCodec \
3+
-H:+UseServiceLoaderFeature \
4+
-H:IncludeResources=META-INF/.* \
5+
-H:ReflectionConfigurationFiles=classes/${.}/reflection.json
6+
7+
Args0 = -H:+ReportUnsupportedElementsAtRuntime \
28
--allow-incomplete-classpath \
39
--rerun-class-initialization-at-runtime=io.netty.handler.codec.http2.Http2CodecUtil \
410
--delay-class-initialization-to-runtime=io.netty.handler.codec.http.HttpObjectEncoder,io.netty.handler.codec.http2.DefaultHttp2FrameWriter,io.netty.handler.codec.http.websocketx.WebSocket00FrameEncoder,io.netty.handler.ssl.JdkNpnApplicationProtocolNegotiator,io.netty.handler.ssl.ReferenceCountedOpenSslEngine,io.vertx.core.net.impl.transport.EpollTransport,io.vertx.core.net.impl.transport.KQueueTransport,io.netty.handler.ssl.ReferenceCountedOpenSslClientContext,io.netty.handler.ssl.ReferenceCountedOpenSslServerContext,io.netty.handler.ssl.ConscryptAlpnSslEngine,io.netty.handler.ssl.JettyNpnSslEngine \

src/main/resources/META-INF/native-image/io.vertx/vertx-core/reflection.json

+18
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,23 @@
44
"methods": [
55
{ "name": "<init>", "parameterTypes": [] }
66
]
7+
},
8+
{
9+
"name": "io.vertx.core.impl.launcher.commands.RunCommand",
10+
"allDeclaredConstructors": true,
11+
"allDeclaredMethods": true
12+
},
13+
{
14+
"name": "io.vertx.core.impl.launcher.commands.VertxIsolatedDeployer",
15+
"allDeclaredConstructors": true,
16+
"allDeclaredMethods": true
17+
},
18+
{
19+
"name": "java.lang.Long",
20+
"allDeclaredConstructors": true
21+
},
22+
{
23+
"name": "java.lang.Integer",
24+
"allDeclaredConstructors": true
725
}
826
]

0 commit comments

Comments
 (0)