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

Failed to resolve kotlin-stdlib-js for Kotlin 2.0 #1176

Open
neckbosov opened this issue May 24, 2024 · 5 comments
Open

Failed to resolve kotlin-stdlib-js for Kotlin 2.0 #1176

neckbosov opened this issue May 24, 2024 · 5 comments

Comments

@neckbosov
Copy link

rules_kotlin version: 1.9.1
Bazel version: 5.4.1

I tried to update kotlin version to 2.0 in my project and got following error:

external/rules_kotlin/kotlin/compiler/BUILD.bazel:22:22: no such target '@com_github_jetbrains_kotlin//:lib/kotlin-stdlib-js.jar': target 'lib/kotlin-stdlib-js.jar' not declared in package ''

What can cause such an error? I tried to look at the rules_kotlin code but failed to understand where @com_github_jetbrains_kotlin came from. What can I do to solve the problem?

@pettermahlen
Copy link
Contributor

pettermahlen commented May 24, 2024

I am running into something similar. AFAICT, kotlin-stdlib-js is distributed as a klib artifact, not a jar. It wasn't the same in 1.9.23; that included a .jar file.

@neckbosov
Copy link
Author

Looks related to #808

@restingbull
Copy link
Collaborator

We are considering removing js support for 2.0 -- until such time as we have proper kotlin native support.

@restingbull
Copy link
Collaborator

Voting Box is Open

@bcorso
Copy link

bcorso commented Dec 6, 2024

@restingbull we're hitting this issue in Dagger when trying to update to Kotlin 2.0.21 (we are not using js).

Is there any way to get Kotlin 2 working with rules_kotlin v1.9.6?

Is it expected to be fixed in rules_kotlin v2.0.0?

copybara-service bot pushed a commit to google/dagger that referenced this issue Dec 6, 2024
This CL:

  * Updates KSP to 2.0.21-1.0.28
  * Updates kotlin-metadata-jvm to 2.0.21
  * Note: due to bazelbuild/rules_kotlin#1176 we can't actually update Kotlin itself to 2.0.21, but somehow that doesn't seem to cause an issue
  * Migrates kotlin-metadata-jvm usages to the new API (the pre-2.0.0 APIs are deprecated).
  * Updates XProcessing and XProcessing Testing jars
  * Adds flags to fall back to Kotlin 1.9 for compiler tests (Working on getting these tests working with K2/KSP2 is in progress).
  * Updated all of our artifact tests to use the same Kotlin and KSP versions.
  * Added `compat_kt_jvm_library` to alias output jars to the expected locations.

Fixes #4525

RELNOTES=Fixes #4525: Update kotlin-jvm-metadata to 2.0.21 to remove dependency on Beta version.
PiperOrigin-RevId: 702486745
copybara-service bot pushed a commit to google/dagger that referenced this issue Dec 6, 2024
This CL:

  * Updates KSP to 2.0.21-1.0.28
  * Updates kotlin-metadata-jvm to 2.0.21
  * Note: due to bazelbuild/rules_kotlin#1176 we can't actually update Kotlin itself to 2.0.21, but somehow that doesn't seem to cause an issue
  * Migrates kotlin-metadata-jvm usages to the new API (the pre-2.0.0 APIs are deprecated).
  * Updates XProcessing and XProcessing Testing jars
  * Adds flags to fall back to Kotlin 1.9 for compiler tests (Working on getting these tests working with K2/KSP2 is in progress).
  * Updated all of our artifact tests to use the same Kotlin and KSP versions.
  * Added `compat_kt_jvm_library` to alias output jars to the expected locations.

Fixes #4525

RELNOTES=Fixes #4525: Update kotlin-jvm-metadata to 2.0.21 to remove dependency on Beta version.
PiperOrigin-RevId: 703516835
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

No branches or pull requests

4 participants