You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
Note the inclusion of the `-D` to set the `org.graalvm.nativeimage.imagecode` property. In normal operation a built native executable will have this property set (automatically by the image building process). If there is any code that will behave differently due to it being set (which may occur if trying to work around something not supported by GraalVM) then we should set it when running with the agent too, so that code executed whilst the agent is attached matches the code that will run in the final executable.
48
49
49
-
=== Using it with maven
50
+
==== Using it with maven
50
51
51
52
Let's look at how to pull the ideas here together and apply them to a project.
52
53
@@ -110,18 +111,18 @@ Finally, this following snippet would go into the maven pom:
Finally, before you post about it not working, please check the <<troubleshooting,troubleshooting guide>>, which is full of information on pitfalls, common problems, and how to deal with them (through fixes and workarounds).
91
91
92
92
We would love to hear about your successes and failures through the project issue tracker.
93
-
Work has been started on an extension model that makes it easy to support areas of Spring the feature does not yet reach.
94
-
If you want to make a contribution here, see the <<extension_guide,extension guide>>.
95
-
Please be aware this is pre-1.0 and, as such, some of these options and extension APIs are still evolving and may change before it is finally considered done.
93
+
If you want to make a contribution here, see the <<how-to-contribute,how to contribute guide>>.
94
+
Please be aware this project is still incubating and, as such, some of these options and extension APIs are still evolving and may change before it is finally considered done.
Copy file name to clipboardexpand all lines: spring-graalvm-native-docs/src/main/asciidoc/support.adoc
+3-2
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
-
[[support-scope]]
2
-
== Support scope
1
+
[[support]]
2
+
== Support
3
3
4
4
=== Language
5
5
@@ -41,4 +41,5 @@ Group ID is `org.springframework.cloud`.
41
41
42
42
=== Limitations
43
43
44
+
- `@Configuration` and related annotations like `@SpringBootApplication` should specify `proxyBeanMethods = false` in order to not require CGLIB proxies. In practice, the main limitation with attribute set is that bean dependencies should be specified as explicit method parameter rather that by `@Bean` method invocation. Notice this attribute https://github.com/spring-projects-experimental/spring-graalvm-native/issues/248[could be inferred in the future].
44
45
- Only proxies on interfaces are supported for now
Copy file name to clipboardexpand all lines: spring-graalvm-native-docs/src/main/asciidoc/troubleshooting.adoc
+5-5
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ If you see an error like:
30
30
----
31
31
====
32
32
33
-
It could be due to https://github.com/oracle/graal/issues/2748[oracle/graal#2748] bug which impact GraalVM 20.2.0. This is a transient error so re-run
33
+
It could be due to https://github.com/oracle/graal/issues/2748[oracle/graal#2748] bug which impact GraalVM 20.2.0. This is a transient error so run again
34
34
the build. If a newer GraalVM 20.2.x is available, please update to use it.
35
35
36
36
==== DataSize was unintentionally initialized at build time
@@ -72,7 +72,7 @@ Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:
72
72
----
73
73
====
74
74
75
-
This is due to https://github.com/spring-projects/spring-boot/issues/23130[this bug] that will be fixed asap.
75
+
This is due to https://github.com/spring-projects/spring-boot/issues/23130[this bug] that will be fixed in Spring Boot 2.4.0-M3.
76
76
The workaround is to try to modify the content (change space to tabs, add or remove line breaks, etc.) to not hit that bug or
77
77
to replace `<BP_BOOT_NATIVE_IMAGE_BUILD_ARGUMENTS>` element by a `META-INF/native-image/<GROUP_ID>/<ARTIFACT_ID>/native-image.properties`
78
78
file with `Args = ...` content.
@@ -133,7 +133,7 @@ You have a number of options to address it:
133
133
* Download a new version of GraalVM that includes a fixed agent.
134
134
135
135
* Raise a bug against the `spring-graalvm-native` project, as a key aim of the feature is to make sure these things get registered.
136
-
If it is not "`obvious`" that it should be registered, it may be necessary for a new or expanded hint to the added to the `spring-graalvm-native-configuration` project (see the <<extension_guide,extension guide>> if you want to explore that).
136
+
If it is not "`obvious`" that it should be registered, it may be necessary for a new or expanded hint to the added to the `spring-graalvm-native-configuration` project (see the <<how-to-contribute,how to contribute guide>> if you want to explore that).
137
137
138
138
* Manually add it.
139
139
The `native-image` run picks up any configuration it finds.
@@ -211,7 +211,7 @@ Snapshots are regularly published and obviously ahead of releases and milestones
211
211
Sometimes, you want to use the feature but cannot.
212
212
Maybe you like that the feature offers that more optimal mode of discarding unnecessary configuration at image-build time, which the agent mode does not.
213
213
When you use the feature, you either get an error about some missing piece of configuration or, worse, you get no error and it does not work (implying there is probably missing configuration that is not critical for the app to start but is just critical for it to actually work).
214
-
If the error is clear, you can follow the guidelines in the <<extension_guide,extension guide>> and perhaps contribute it back.
214
+
If the error is clear, you can follow the guidelines in the <<how-to-contribute,how to contribute guide>> and perhaps contribute it back.
215
215
But in the case where you have no idea, what do you do?
216
216
217
217
The first step to take here is try and run it with the agent, as follows:
@@ -323,4 +323,4 @@ Now create `src/main/resources/META-INF/native-image/reflect-config.json` with c
323
323
====
324
324
325
325
As we add the details found in the diff, we can rebuild the `native-image` each time and see which bits help.
326
-
Once computed, we can create a hint in the feature configuration project that captures this knowledge (see the <<extension_guide,extension guide>> for more info on that) or, if it is more related to this specific application than the infrastructure, we might leave that `reflect-config.json` in the project and commit it to our repository alongside the source for future use.
326
+
Once computed, we can create a hint in the feature configuration project that captures this knowledge (see the <<how-to-contribute,how to contribute guide>> for more info on that) or, if it is more related to this specific application than the infrastructure, we might leave that `reflect-config.json` in the project and commit it to our repository alongside the source for future use.
0 commit comments