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

Bzlmod Workflow for developing against an updated released_ rules_kotlin? #1237

Open
erikkerber opened this issue Nov 20, 2024 · 3 comments
Open

Comments

@erikkerber
Copy link
Contributor

erikkerber commented Nov 20, 2024

rules_kotlin uses rules_kotlin to build and bootstrap itself. It does this by pulling in earlier releases of the ruleset

During development, what is the best way to change the "released" version? If I just swap out the @released_rules_kotlin with the current repository, it just yields circular dependencies.

How do the maintainers work with this?

EDIT

The README speaks to this a bit in the context of WORKSPACE. I couldn't (quickly) figure out if this was possible with bzlmod setups and local_repository.

@erikkerber erikkerber changed the title Workflow for developing against an updated released_ rules_kotlin? Bzlmod Workflow for developing against an updated released_ rules_kotlin? Nov 20, 2024
@restingbull
Copy link
Collaborator

You mean to use the in development rules_kotlin? Or that the bootstrap module is old?

@erikkerber
Copy link
Contributor Author

Concretely—I wanted to just plug in Kotlin 2.1.0-RC2 to see if the issues with 2.0.20 were resolved (2.0.20 failed with a class load error in Kotlin libraries themselves).

Using bzlmod, and pointing to a local version of rules_kotlin with these changes, rules_kotlin then downloads the last released version of rules_kotlin (1.9), and bootstraps itself with that. Doing that results in errors like:

external/rules_kotlin+/src/main/kotlin/io/bazel/kotlin/plugin/SkipCodeGen.kt:77:29: error: class 'org.jetbrains.kotlin.analyzer.AnalysisResult.Companion' was compiled with an incompatible version of Kotlin. The actual metadata version is 2.1.0, but the compiler version 1.9.0 can read versions up to 2.0.0.

My understanding is that the "released" Kotlin is not compatible with my local development version. What I'm not sure how to do is to shim out the released Kotlin with, I guess, what is essentially my local version as well.

@restingbull
Copy link
Collaborator

restingbull commented Nov 21, 2024

That issue is blocking the 2.0.20 release. :/

Recent changes made it happen before we cut the release, as opposed to after.

I'm currently trying to sort out the stdlib + compiler plugin issues to unblock this.

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

2 participants