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

WA: Disable JS legacy transformation manually until it is completely removed from the atomicfu plugin. #4313

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

mvicsokolova
Copy link
Collaborator

This change fixes this train failure.

e: KLIB resolver: The same 'unique_name=io.ktor:ktor-io' found in more than one library: /mnt/agent/work/1edc2f021dd239f7/project.ktor/ktor-io/build/classes/atomicfu/js/main, /mnt/agent/work/1edc2f021dd239f7/project.ktor/ktor-io/build/classes/kotlin/js/main
Please file an issue to https://kotl.in/issue and meanwhile use CLI flag `-Xklib-duplicated-unique-name-strategy` with one of the following values:
allow-all-with-warning: Use all KLIB dependencies, even when they have same `unique_name` property.
allow-first-with-warning: Use the first KLIB dependency with clashing `unique_name` property. No order guarantees are given though.
deny: Fail a compilation with the error.

Through an oversight atomicfu-gradle-plugin kept tranformJs option (corresponding to the legacy JS transformation) enabled by default, and with no *.js files to transform it just copied the compileJs output directory.

Here is the similar fix merged into kotlinx.coroutines: Kotlin/kotlinx.coroutines#4223

@bjhham
Copy link
Contributor

bjhham commented Sep 16, 2024

Could you check the CI build error?

Error:

org.gradle.api.InvalidUserCodeException: Querying the mapped value of map(flatmap(provider(task 'generatePrecompiledScriptPluginAccessors', class org.gradle.kotlin.dsl.provider.plugins.precompiled.tasks.GeneratePrecompiledScriptPluginAccessors))) before task ':buildSrc:generatePrecompiledScriptPluginAccessors' has completed is not supported

Scan:
https://scans.gradle.com/s/sabm6fewg2hke

@mvicsokolova mvicsokolova force-pushed the kotlin-community/disable-atomicfu-js branch from 58b41da to 9c88555 Compare September 23, 2024 11:19
@mvicsokolova mvicsokolova changed the base branch from kotlin-community/dev to main September 23, 2024 11:23
@mvicsokolova
Copy link
Collaborator Author

Seems that now, my fix is not the reason of the build failure anymore. @bjhham could please have a look? 🙏

Also, I've changed the base branch from kotlin-community to main. I'm not sure, what is the process of providing the fixes for the kotlin-community in ktor, but at least in other kotlinx libraries, the fix should appear in the dev branch first.

build.gradle.kts Outdated
@@ -102,7 +102,7 @@ apply(from = "gradle/compatibility.gradle")
plugins {
id("org.jetbrains.dokka") version "1.9.20" apply false
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.16.3"
id("org.jetbrains.kotlinx.atomicfu") version "0.25.0" apply false
//id("org.jetbrains.kotlinx.atomicfu") version "0.25.0" apply false
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the original purpose of disabling the plugin here? 👀

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the purpose is to add the plugin to the build classpath but apply it later

build.gradle.kts Outdated Show resolved Hide resolved
@e5l
Copy link
Member

e5l commented Sep 25, 2024

LGTM, will be merged after CI check

@e5l e5l merged commit c70d218 into main Sep 25, 2024
10 of 12 checks passed
@e5l e5l deleted the kotlin-community/disable-atomicfu-js branch September 25, 2024 10:56
woainikk pushed a commit that referenced this pull request Oct 2, 2024
tbogdanova added a commit that referenced this pull request Oct 8, 2024
…pletely removed from the atomicfu plugin. (#4313)"

This reverts commit 46f67ad.
woainikk pushed a commit that referenced this pull request Oct 10, 2024
…removed from the atomicfu plugin. (#4313)

* WA: Disable JS legacy transformation manually until it is completely removed from the atomicfu plugin.

* fixup! Fix getting the atomicfu version from libs

* Update build.gradle.kts

---------

Co-authored-by: Leonid Stashevsky <[email protected]>
woainikk added a commit that referenced this pull request Oct 10, 2024
…removed from the atomicfu plugin. (#4313)

* WA: Disable JS legacy transformation manually until it is completely removed from the atomicfu plugin.

* fixup! Fix getting the atomicfu version from libs

* Update build.gradle.kts

---------

Co-authored-by: Leonid Stashevsky <[email protected]>
woainikk pushed a commit that referenced this pull request Oct 10, 2024
…removed from the atomicfu plugin. (#4313)

* WA: Disable JS legacy transformation manually until it is completely removed from the atomicfu plugin.

* fixup! Fix getting the atomicfu version from libs

* Update build.gradle.kts

---------

Co-authored-by: Leonid Stashevsky <[email protected]>
woainikk added a commit that referenced this pull request Oct 11, 2024
…pletely removed from the atomicfu plugin. (#4313)"

This reverts commit 3c5e984.
woainikk added a commit that referenced this pull request Oct 11, 2024
…removed from the atomicfu plugin. (#4313)

* WA: Disable JS legacy transformation manually until it is completely removed from the atomicfu plugin.

* fixup! Fix getting the atomicfu version from libs
woainikk pushed a commit that referenced this pull request Oct 11, 2024
…removed from the atomicfu plugin. (#4313)

* WA: Disable JS legacy transformation manually until it is completely removed from the atomicfu plugin.

* fixup! Fix getting the atomicfu version from libs

* Update build.gradle.kts

---------

Co-authored-by: Leonid Stashevsky <[email protected]>
woainikk pushed a commit that referenced this pull request Oct 11, 2024
…removed from the atomicfu plugin. (#4313)

* WA: Disable JS legacy transformation manually until it is completely removed from the atomicfu plugin.

* fixup! Fix getting the atomicfu version from libs

* Update build.gradle.kts

---------

Co-authored-by: Leonid Stashevsky <[email protected]>
woainikk pushed a commit that referenced this pull request Oct 11, 2024
…removed from the atomicfu plugin. (#4313)

* WA: Disable JS legacy transformation manually until it is completely removed from the atomicfu plugin.

* fixup! Fix getting the atomicfu version from libs

* Update build.gradle.kts

---------

Co-authored-by: Leonid Stashevsky <[email protected]>
woainikk pushed a commit that referenced this pull request Oct 14, 2024
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.

4 participants