Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework plugin classloader hierarchy #25616

Open
4 tasks
mlopatkin opened this issue Jul 5, 2023 · 3 comments
Open
4 tasks

Rework plugin classloader hierarchy #25616

mlopatkin opened this issue Jul 5, 2023 · 3 comments

Comments

@mlopatkin
Copy link
Member

mlopatkin commented Jul 5, 2023

Our current approach of having (roughly) per-project classloaders is problematic in certain cases, especially when plugins try to talk to each other.

Tasks

Preview Give feedback
  1. a:bug in:build-services in:plugin-development
  2. @configuration-cache a:bug in:build-services
    bamboo
  3. a:bug in:buildscript-compilation in:plugin-management
  4. a:bug in:build-src in:buildscript-compilation in:plugin-management in:reporting-tasks
@yogurtearl
Copy link
Contributor

Other things to consider:

  • Having many version of the same Classs loaded by different classloaders potentially has a high memory cost (uses more Metaspace)
  • the "per-project classloaders" are not well documented, which makes them extra surprising. Whatever the new solution is it should be well documented.

@yogurtearl
Copy link
Contributor

Another classloader issue with testing plugins using GradleRunner and withPluginClasspath: #21637

@ALikhachev
Copy link
Contributor

One more case: KT-57162
KGP is loaded by classloader of the root project. Additionally, AGP is loaded in the classloader of a child project. KGP applied in the child project cannot interact with AGP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants