You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/01/09 00:29:40 UTC

[GitHub] [maven-mvnd] electrum opened a new issue #576: Daemon reuse ignores differences in `.mvn/jvm.config`

electrum opened a new issue #576:
URL: https://github.com/apache/maven-mvnd/issues/576


   I was experimenting with adding the `--add-exports` lines to `.mvn/jvm.config` to make  [Error Prone](https://errorprone.info/docs/installation#maven) 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:
   
   1. Do a build with a single JVM config like `-Xmx1G`
   2. Add another JVM config like `--add-exports=...`
   3. Do another build and notice it incorrectly reuses the existing daemon
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-mvnd] gnodet closed issue #576: Daemon reuse ignores differences in `.mvn/jvm.config`

Posted by GitBox <gi...@apache.org>.
gnodet closed issue #576:
URL: https://github.com/apache/maven-mvnd/issues/576


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-mvnd] gnodet commented on issue #576: Daemon reuse ignores differences in `.mvn/jvm.config`

Posted by GitBox <gi...@apache.org>.
gnodet commented on issue #576:
URL: https://github.com/apache/maven-mvnd/issues/576#issuecomment-1008736597


   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...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-mvnd] electrum commented on issue #576: Daemon reuse ignores differences in `.mvn/jvm.config`

Posted by GitBox <gi...@apache.org>.
electrum commented on issue #576:
URL: https://github.com/apache/maven-mvnd/issues/576#issuecomment-1009207149


   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?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-mvnd] gnodet commented on issue #576: Daemon reuse ignores differences in `.mvn/jvm.config`

Posted by GitBox <gi...@apache.org>.
gnodet commented on issue #576:
URL: https://github.com/apache/maven-mvnd/issues/576#issuecomment-1009676835


   > 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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org