blackdrag commented on PR #3109:
URL: https://github.com/apache/groovy/pull/3109#issuecomment-6870169164

   I think this new implementation is already an improvement - however I still 
have 2 not so small suggestions here:
   
   1. Remove the ThreadLocal-based name propagation
   The generated-name information should travel with the GroovyCodeSource from 
the moment it is created. We already store the extra-information on it. The 
changes are in place for the compiler side, but for the inner loader it would 
be good enough to set this on the loader itself only after the compilation. 
That should remove most of the new public methods too.
   
   2. Replace ParallelLockMapKeys with behavioural tests
   The current tests inspect ClassLoader.parallelLockMap through 
MethodHandles.privateLookupIn and a VarHandle. This means we test a private JDK 
implementation detail and even require a forked JVM that open java.lang to test 
this. The intended behaviour is that the load calls to the parent loaders are 
not happening. So I would check that by recording them instead. That also 
aligns with the testing style in Groovy9236
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to