This message was deleted.
# community-support
s
This message was deleted.
j
It looks like the answer is obviously no, so I think I'll just use a patched gradle
g
If scaladoc isn't run in a forked process you could try to set gradle jvm options via
org.gradle.jvmargs
(e.g. in project's
gradle.properties
), see https://docs.gradle.org/current/userguide/build_environment.html
j
Unfortunately it is run in a forked process, I can see the 'Started Gradle worker daemon... with fork options ... { ... maxHeapSize=1G, jvmArgs=[], keepAliveMode=DAEMON } Setting org.gradle.jvmArgs was my first hope, unless there is a way to force gradle to not make a worker, I would definitely be OK with that if possible
atm, I'm looking at just adding to https://github.com/gradle/gradle/blob/master/subprojects/scala/src/main/java/org/gradle/api/tasks/scala/ScalaDoc.java#L228, we already have a patched gradle on account of another issue, so another patch won't hurt I suppose.
g
ah, if it's a fork isn't
ForkOptions
or subclass accessible as part of the task configuration?
j
I don't think so, think this is a bit of a blind spot. If we look at https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/scala/ScalaDoc.html neither it or its parents have anything appropriate
g
they seem to use workerexecutor and don't expose much unfortunately
and i guess you already tried adding
-Xss...
to the additionalParameters without
-J
?
j
Yeah I tried, if you do that gradle effectively ends up trying to invoke
Copy code
scaladoc -Xss64m
which results in
Copy code
scaladoc error: bad option: '-Xss64m'
if you read scaladoc -help, you would think -J would do it, but if you just normally run
Copy code
scaladoc -J-Xss64
you get the expected
Copy code
The Java thread stack size specified is too small. Specify at least 180k
while if you pass this in to additionalParameters, it goes through silently, so it seems like (and from reading the code it makes sense), this -J-Xss won't do anything for scaladoc in the gradle case
Maybe there's something reflective I can do, but I don't feel especially confident with how that looks with respect to Gradle stuff.
g
unfortunately I'm not familiar with Gradle's Scala tooling, last time I used Scala with Apache Maven, so ideas above were just generic thoughts
j
No worries, thank you for the ideas. I'm really not hopefuly for this one, I think I understand the Gradle code well enough to say this one's not happening, it won't be so bad to just patch this one file.