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

Move the KSP and compiler target definitions into rules_kotlin #1014

Conversation

Bencodes
Copy link
Collaborator

@Bencodes Bencodes commented Aug 18, 2023

Some organizational changes to allow easier support for Bzlmod. This may introduce breaking changes for those that are depending on the targets declared directly inside of the com_github_jetbrains_kotlin/com_github_google_ksp repositories.

The new compiler target references can be found under the @io_bazel_rules_kotlin//kotlin/compiler:... package. We may start to reduce the visibility of these and ask users to eventually start pulling their standard libraries from maven.

Details: With Bzlmod we are unable to easily import kt_ macros from within a Bazel repository. To work around this we can shuffle the actual kt_ target creation into io_bazel_rules_kotlin instead of inside the declared com_github_jetbrains_kotlin/com_github_google_ksp repositories.

@restingbull
Copy link
Collaborator

This is pretty big breaking change, as is. Given that the repository hasn't provided a deprecation warning, I'm not in favor of it as is -- which was why I didn't approve it previously.

I think I see a less invasive way to fix the cyclic dependency.

@Bencodes Bencodes added the bzlmod label Sep 7, 2023
@Bencodes Bencodes force-pushed the move-the-ksp-and-compiler-target-definitions-into-rules_kotlin branch from 824d988 to bfc2a9c Compare September 8, 2023 22:49
@Bencodes Bencodes merged commit 8d79e6a into master Sep 8, 2023
3 checks passed
nkoroste added a commit to nkoroste/rules_kotlin that referenced this pull request Sep 15, 2023
…idanceKotlin_upstream

* upstream/master:
  Move the KSP and compiler target definitions into rules_kotlin (bazelbuild#1014)
  Avoid running java_common#compile against KSP generated outputs (bazelbuild#990)
  Update kt_java_stub_template to 6.2.1 (bazelbuild#992)
  Disable strict deps for Android example (bazelbuild#1013)
  Group the all_tests jobs together in presubmit.yml (bazelbuild#1008)
  Add rules_java 6.4.0 (bazelbuild#1010)
  Update Bazel to 6.3.2 (bazelbuild#1007)
  Update rules_jvm_external to 5.3 (bazelbuild#1009)
  Migrate usages of deprecated `JavaInfo` fields (bazelbuild#1005)
  Remove unnecessary Java runtime dependencies (bazelbuild#1000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants