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

Spawn tasks using Worker API #170

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eyalroth
Copy link
Contributor

Fixes #75.

This makes the plugin tasks (ScoverageReport and ScoverageAggregate) run using Gradle's worker API, which provides an ability to run them with a custom classpath without affecting the main Gradle classpath/classloader.

Logging may change slightly, as the the worker API does not expose a way to use the project's logger (see gradle/gradle#2678).

Another aspect that may change is the performance of the Gradle build. #75 initially addressed the performance hit caused by spawning each task in its own process, so the fix then (version 3 I think) was to run in the main Gradle process, which introduced the pollution of the classpath/classloader.

Looking at the worker API documentation about isolation modes, it's implied that running with a separate class loader will not spawn another process (otherwise why would there be another isolation mode just for running in a separate process?), so my hopes are that the performance is not impacted in a significant way.

…'s classpath to the main gradle classloader
@eyalroth
Copy link
Contributor Author

Looks like the Worker API is causing metaspace memory issues, see gradle/gradle#15200, gradle/gradle#8291, gradle/gradle#8221.

I'm placing the PR back into draft mode until Gradle will provide a better way to run tasks with an isolated classpath.

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

Successfully merging this pull request may close these issues.

reportScoverage without extra JVM process
1 participant