Remove gc_option parameter and rename to set_xmx_if_not_set
I thought it would be cool and convenient to specify default value for garbage collection but the opposite is true: It is impossible to use a different GC when calling main_from_endpoint. Instead, do not specify a default GC and only set default -Xmx if requested by the user (which it is the case by default)
Otherwise it is impossible to change the garbage collector to, e.g., g1gc.
This may not be the best solution to this but we should probably solve this issue this way or another.
This is essential for the Python API to work with Java 17+ because some time between JDK 11 and 17 -XX:+UseConcMarkSweepGC became invalid (already deprecated in JDK 9).
I am not actively working on jgo anymore. @ctrueden would know if this PR is the right approach for setting garbage collector.
I think this is a good solution, but would not rename the existing function to set_xmx_if_not_set. Even though the default args added are memory only after this change, that might not always be the case in the future. The addition of the flag to control whether these default args are inferred and added is a good change, though. Anyway @marktsuchida I can clean up and merge this after I'm back from vacation next week.
Sounds good to me. I'm not blocked by this issue at the moment, just wanted to note my observation.