feedback on --permit-illegal-access

Jochen Theodorou blackdrag at gmx.org
Fri Apr 7 10:15:06 UTC 2017



On 07.04.2017 09:11, Alan Bateman wrote:
> On 07/04/2017 00:09, Jochen Theodorou wrote:
>
>> Hi,
>>
>> so today I found finally _JAVA_OPTIONS to get our gradle build running
>> and of course I used --permit-illegal-access and I thought I give some
>> feedback here.
>>
>> Running a clean test on our build will result in 44531 warning
>> messages. Of which 6394 are unique. of course some of those warnings
>> are actually from gradle and some are from xstream, but that makes
>> maybe 21 less.
>>
>> Why do we have such a huge amount of warnings? That is because of the
>> way we are building our meta classes, which we still have to change
>> and use JDK9 special code (something we tried to avoid)
 >
> The implementation makes a best effort to avoid emitting duplicate
> warnings. Are these 44531 warnings coming from one run of the VM or is
> this the total from many `java` commands run in the build? Another
> possibility is code generation. The filtering of duplicates is based on
> the perpetrator's call stack and the victim. If Groovy is generating a
> lot of classes and the code is say using a shared utility class to hack
> in then these usages would not be unique.

both I guess. Many of our tests are in script form, which means they are 
runtime compiled and executed. The tests are executed in parallel, I 
guess on my computer it was around 8 parallel running JVMs. Most 
messages are reported for the same class though, because that is kind of 
our base class for the meta class initialization process.

> Running with -Dsun.reflect.debugModuleAccessChecks=access will give you
> a full stack trace at each warning and should help debug this.

yes, will check that soon

bye Jochen


More information about the jigsaw-dev mailing list