-
Notifications
You must be signed in to change notification settings - Fork 20
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
#181 - move ktfmt to use Worker API for classloader isolation #182
#181 - move ktfmt to use Worker API for classloader isolation #182
Conversation
Notes on this comment:
While this PR addresses running ktfmt in an isolated class loader, it doesn't directly provide the capability to alter the ktfmt version separate from the plugin, though it does lay the groundwork for it. To do so requires addressing two challenges:
Binary compatibility can be handled by providing Semantic compatibility, in this context, refers to maintaining expected behaviour for current and future ktfmt versions. This is accomplished by having a robust test suite (large set of data to format, across different format styles / configurations, across different ktfmt versions), with deviations addressed by either the aforementioned adapters or 'fyi' documentation/release note updates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work @cloudshiftchris! Thank you very much for doing this 👍 really appreciate your time.
I've left several comments, which are mostly questions. Once this is all sorted out we can merge it and I can make a new release just after.
plugin-build/plugin/src/main/java/com/ncorti/ktfmt/gradle/FormattingOptionsBean.kt
Outdated
Show resolved
Hide resolved
plugin-build/plugin/src/main/java/com/ncorti/ktfmt/gradle/KtfmtPlugin.kt
Outdated
Show resolved
Hide resolved
plugin-build/plugin/src/main/java/com/ncorti/ktfmt/gradle/tasks/KtfmtBaseTask.kt
Outdated
Show resolved
Hide resolved
plugin-build/plugin/src/main/java/com/ncorti/ktfmt/gradle/tasks/KtfmtBaseTask.kt
Show resolved
Hide resolved
plugin-build/plugin/src/main/java/com/ncorti/ktfmt/gradle/tasks/KtfmtCheckTask.kt
Outdated
Show resolved
Hide resolved
plugin-build/plugin/src/main/java/com/ncorti/ktfmt/gradle/tasks/KtfmtWorkAction.kt
Outdated
Show resolved
Hide resolved
plugin-build/plugin/src/main/java/com/ncorti/ktfmt/gradle/tasks/KtfmtWorkAction.kt
Outdated
Show resolved
Hide resolved
plugin-build/plugin/src/main/java/com/ncorti/ktfmt/gradle/tasks/KtfmtWorkAction.kt
Outdated
Show resolved
Hide resolved
…s/KtfmtWorkAction.kt Co-authored-by: Nicola Corti <[email protected]>
…attingOptionsBean.kt Co-authored-by: Nicola Corti <[email protected]>
…s/KtfmtCheckTask.kt Co-authored-by: Nicola Corti <[email protected]>
@cortinico have addressed all PR feedback; will create a couple issues for later cleanup:
Should be good-to-go for isolated class loader changes. |
@cloudshiftchris do you need a new release with just this change or are you planning to follow-up on those items so we can make a release after? |
@cortinico eventually those changes will go into a new release; not large/material enough to warrant a release themselves. |
🚀 Description
This PR moves
ktfmt
to use the Worker API for class loader isolation to mitigate class path collisions with differing Kotlin/Gradle versions.📄 Motivation and Context
Addresses #181 and possibly #157, and likely other latent issues cause by class path conflicts.
🧪 How Has This Been Tested?
All unit and integration tests updated to reflect this change.
📦 Types of changes
✅ Checklist