You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Trevor Flynn (Jira)" <ji...@apache.org> on 2021/12/07 00:08:00 UTC

[jira] [Updated] (GROOVY-10404) Unexpected class duplication in linux

     [ https://issues.apache.org/jira/browse/GROOVY-10404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Trevor Flynn updated GROOVY-10404:
----------------------------------
    Description: 
Hello, 

I am not entirely sure on the technical issues behind this problem, they seam to stem deep into the platform dependent components of the classloader. 

On windows, when loading a class both from within groovy and from the java side through the GroovyClassLoader, the returned class is the same class, and can be checked with a simple equality check. But when the same code is run on linux, the two classes returned are different classes. Even running an `isAssignableForm` will fail between the two. 

It is difficult to describe the complex load behavior that replicates the issue, as such I have built a simple example instead. Please see the attached example project. It has prebuilt run configurations for IDEA that utilize WSL for testing the linux side of the issue. 

This issue is new to groovy 4, and did not exist in groovy 3. 

 

Please let me know if any other additional information would be useful.

 

Thank you,

Trevor Flynn

  was:
Hello, 

I am not entirely sure on the technical issues behind this problem, they seem to stem deep into the platform dependent components of the classloader. 

On windows, when loading a class both from within groovy and from the java side through the GroovyClassLoader, the returned class is the same class, and can be checked with a simple equality check. But when the same code is run on linux, the two classes returned are different classes. Even running an `isAssignableForm` will fail between the two. 

It is difficult to describe the complex load behavior that replicates the issue, as such I have built a simple example instead. Please see the attached example project. It has prebuilt run configurations for IDEA that utilize WSL for testing the linux side of the issue. 

This issue is new to groovy 4, and did not exist in groovy 3. 

 

Please let me know if any other additional information would be useful.

 

Thank you,

Trevor Flynn


> Unexpected class duplication in linux
> -------------------------------------
>
>                 Key: GROOVY-10404
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10404
>             Project: Groovy
>          Issue Type: Bug
>          Components: GroovyScriptEngine
>    Affects Versions: 4.0.0-rc-1
>            Reporter: Trevor Flynn
>            Priority: Major
>         Attachments: GroovyTest.zip
>
>
> Hello, 
> I am not entirely sure on the technical issues behind this problem, they seam to stem deep into the platform dependent components of the classloader. 
> On windows, when loading a class both from within groovy and from the java side through the GroovyClassLoader, the returned class is the same class, and can be checked with a simple equality check. But when the same code is run on linux, the two classes returned are different classes. Even running an `isAssignableForm` will fail between the two. 
> It is difficult to describe the complex load behavior that replicates the issue, as such I have built a simple example instead. Please see the attached example project. It has prebuilt run configurations for IDEA that utilize WSL for testing the linux side of the issue. 
> This issue is new to groovy 4, and did not exist in groovy 3. 
>  
> Please let me know if any other additional information would be useful.
>  
> Thank you,
> Trevor Flynn



--
This message was sent by Atlassian Jira
(v8.20.1#820001)