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

1.6.2: JS(IR) - Atomicfu Runtime not found #3305

Closed
hfhbd opened this issue May 28, 2022 · 11 comments
Closed

1.6.2: JS(IR) - Atomicfu Runtime not found #3305

hfhbd opened this issue May 28, 2022 · 11 comments
Assignees
Labels

Comments

@hfhbd
Copy link
Contributor

hfhbd commented May 28, 2022

After updating to 1.6.2, it is not possible to build the project, if it contains a JS(IR) sourceset.

reproducer:

plugins {
    kotlin("multiplatform") version "1.6.21"
}

repositories {
    mavenCentral()
}

kotlin {
    jvm()
    js(IR) {
        browser()
    }

    sourceSets {
        commonMain {
            dependencies {
                implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2")
            }
        }
    }
}

Project: https://github.com/hfhbd/repro-coroutines162-JS-IR

e: Could not find "org.jetbrains.kotlin:kotlinx-atomicfu-runtime" in [/Users/philipwedemann/Library/Application Support/kotlin/daemon]
e: java.lang.IllegalStateException: FATAL ERROR: Could not find "org.jetbrains.kotlin:kotlinx-atomicfu-runtime" in [/Users/philipwedemann/Library/Application Support/kotlin/daemon]
	at org.jetbrains.kotlin.ir.backend.js.KlibKt$toResolverLogger$1.fatal(klib.kt:117)
	at org.jetbrains.kotlin.library.KotlinLibrarySearchPathResolver.resolve(SearchPathResolver.kt:175)
	at org.jetbrains.kotlin.library.SearchPathResolver$DefaultImpls.resolve$default(SearchPathResolver.kt:20)
	at org.jetbrains.kotlin.library.SearchPathResolverKt.resolve(SearchPathResolver.kt:29)
	at org.jetbrains.kotlin.library.resolver.impl.KotlinLibraryResolverImpl$resolveDependencies$2$2.invoke(KotlinLibraryResolverImpl.kt:122)
	at org.jetbrains.kotlin.library.resolver.impl.KotlinLibraryResolverImpl$resolveDependencies$2$2.invoke(KotlinLibraryResolverImpl.kt:122)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
	at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:170)
	at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
	at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:214)
	at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:169)
	at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
	at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:786)
	at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:816)
	at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:807)
	at org.jetbrains.kotlin.library.resolver.impl.KotlinLibraryResolverImpl.resolveDependencies(KotlinLibraryResolverImpl.kt:135)
	at org.jetbrains.kotlin.library.resolver.impl.KotlinLibraryResolverImpl.resolveWithDependencies(KotlinLibraryResolverImpl.kt:44)
	at org.jetbrains.kotlin.ir.backend.js.JsLibraryResolverKt.jsResolveLibraries(JsLibraryResolver.kt:51)
	at org.jetbrains.kotlin.ir.backend.js.ModulesStructure.<init>(klib.kt:643)
	at org.jetbrains.kotlin.ir.backend.js.KlibKt.prepareAnalyzedSourceModule(klib.kt:540)
	at org.jetbrains.kotlin.ir.backend.js.KlibKt.prepareAnalyzedSourceModule$default(klib.kt:527)
	at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.doExecute(K2JsIrCompiler.kt:244)
	at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:178)
	at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:71)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:91)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:43)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:93)
	at org.jetbrains.kotlin.incremental.IncrementalJsCompilerRunner.runCompiler(IncrementalJsCompilerRunner.kt:200)
	at org.jetbrains.kotlin.incremental.IncrementalJsCompilerRunner.runCompiler(IncrementalJsCompilerRunner.kt:77)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:367)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally$default(IncrementalCompilerRunner.kt:309)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl$rebuild(IncrementalCompilerRunner.kt:115)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileImpl(IncrementalCompilerRunner.kt:167)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:77)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile$default(IncrementalCompilerRunner.kt:68)
	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execJsIncrementalCompiler(CompileServiceImpl.kt:565)
	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execJsIncrementalCompiler(CompileServiceImpl.kt:101)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1807)
@mpetuska
Copy link

I had the same issue. Fortunately, downgrading to 1.6.1 "fixed" it for now.

@mvicsokolova
Copy link
Contributor

mvicsokolova commented May 30, 2022

The WA is adding compiler plugin dependency, like this:

sourceSets {
        commonMain {
            dependencies {
                implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2")
                implementation("org.jetbrains.kotlin:atomicfu:1.6.21") // atomicfu compiler plugin dependency
            }
        }
    }

@mvicsokolova
Copy link
Contributor

kotlinx.atomicfu with the corresponding fix was released 0.17.3 .
New version of kotlinx.coroutines with updated kotlinx.atomicfu will be released soon.

@joffrey-bion
Copy link
Contributor

Hey, any updates on this?

TheMrMilchmann added a commit to GW2ToolBelt/GW2APIClient that referenced this issue Jun 7, 2022
qwwdfsad added a commit that referenced this issue Jun 15, 2022
Test for #3305 

Co-authored-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
Co-authored-by: dkhalanskyjb <52952525+dkhalanskyjb@users.noreply.github.com>
@dkhalanskyjb
Copy link
Collaborator

Fixed in #3321.

@fluidsonic
Copy link

I have this issue after updating from 1.6.0 to 1.6.4.
Even though atomicfu resolves to 1.17.3 I still get this error.

Build Scan: https://scans.gradle.com/s/za65vgcq2paza

git clone git@github.com:fluidsonic/fluid-graphql.git -b coroutines-1.6.4
cd fluid-graphql
./gradlew build
> Task :fluid-graphql-execution:compileKotlinJs FAILED
e: Could not find "org.jetbrains.kotlin:kotlinx-atomicfu-runtime" in [/Users/marc/Library/Application Support/kotlin/daemon]
e: java.lang.IllegalStateException: FATAL ERROR: Could not find "org.jetbrains.kotlin:kotlinx-atomicfu-runtime" in [/Users/marc/Library/Application Support/kotlin/daemon]

pablobaxter pushed a commit to pablobaxter/kotlinx.coroutines that referenced this issue Sep 14, 2022
Test for Kotlin#3305 

Co-authored-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
Co-authored-by: dkhalanskyjb <52952525+dkhalanskyjb@users.noreply.github.com>
@amal
Copy link

amal commented Mar 10, 2023

@mgroth0
Copy link

mgroth0 commented Mar 15, 2023

Same for me. Started happening with 1.7.0-Beta

@mgroth0
Copy link

mgroth0 commented Mar 15, 2023

@amal did you find a workaround?

@amal
Copy link

amal commented Mar 15, 2023

@mgroth0 nope just returned to stable coroutines for now.

@mvicsokolova
Copy link
Contributor

Hi!
This issue was fixed in AtomicfuGradlePlugin: Kotlin/kotlinx-atomicfu#283

As a temporary WA you can add this dependency to the jsMain sourceSet:

implementation("org.jetbrains.kotlin:kotlinx-atomicfu-runtime:1.8.20-RC")

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

No branches or pull requests

9 participants