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
I was experimenting with adding the --add-exports lines to .mvn/jvm.config to make Error Prone work without requiring <fork>true</fork>, in order to gain the benefits of the compiler warming up. This seems to work, but mvnd reuses a daemon with different JVM flags.
Reproduce:
Do a build with a single JVM config like -Xmx1G
Add another JVM config like --add-exports=...
Do another build and notice it incorrectly reuses the existing daemon
The text was updated successfully, but these errors were encountered:
The reason is that mvnd is not aware of all possible JVM options and which one should be discriminating and which one would allow reusing a daemon, so it only knows about a subset of options.
Options that should be discriminating can be added using the mvnd.jvmArgs system property which can be set in the .mvn/mvnd.properties configuration file. I guess things could be improved a bit...
What are some examples of options that would allow reusing a daemon? I can see that treating -Xmx as a minimum would allow reuse (the existing daemon has a larger max heap), but in general, it seems that reuse should not be allowed.
Is having different JVM options a common use case where we would want to try to reuse the daemon?
What are some examples of options that would allow reusing a daemon? I can see that treating -Xmx as a minimum would allow reuse (the existing daemon has a larger max heap), but in general, it seems that reuse should not be allowed.
Is having different JVM options a common use case where we would want to try to reuse the daemon?
Not really. The problem is more to identify which command line options that are discriminating, but I think all JVM options are, but we don't have any simply way to list them all really.
That's why mvnd.jvmArgs is discriminating, as it's name indicates you should give JVM options, while MAVEN_OPTS can contain system properties or other non discriminating properties.
That said, .mvn/jvm.config is supposed to contain JVM options, so it should really be discriminating.
gnodet
added a commit
to gnodet/mvnd
that referenced
this issue
Jan 11, 2022
I was experimenting with adding the
--add-exports
lines to.mvn/jvm.config
to make Error Prone work without requiring<fork>true</fork>
, in order to gain the benefits of the compiler warming up. This seems to work, butmvnd
reuses a daemon with different JVM flags.Reproduce:
-Xmx1G
--add-exports=...
The text was updated successfully, but these errors were encountered: