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

FR: Gazelle Kotlin Support #126

Open
rob-pomelo opened this issue Jan 30, 2023 · 8 comments
Open

FR: Gazelle Kotlin Support #126

rob-pomelo opened this issue Jan 30, 2023 · 8 comments

Comments

@rob-pomelo
Copy link

Hi is there any thought / interest in adding kotlin support to the gazelle extension?

Have briefly started to look at the changes required and curious if its on others radar.

Thanks!

@illicitonion
Copy link
Collaborator

Would gladly review some PRs (with tests) to enable this!

@MorganR
Copy link

MorganR commented Dec 1, 2024

I've put up a (very messy, don't use it) PR up (#313 ) for discussion on this

@shs96c
Copy link
Collaborator

shs96c commented Dec 2, 2024

Thank you for the PR. I'm pinging @restingbull, as he might be interested in this being part of rules_kotlin. We can work together to find the best place for this :)

@MorganR
Copy link

MorganR commented Dec 3, 2024

I'd also be curious what @alexeagle thinks about merging Kotlin support in with the Java plugin, given his experience from the independent Kotlin plugin.

@restingbull
Copy link

restingbull commented Dec 3, 2024

Hm. We are generally trying to keep our maintenance footprint small, and adding Go to the dependencies is a bit non-ideal for us.

@Bencodes @nkoroste -- Thoughts?

@MorganR
Copy link

MorganR commented Dec 13, 2024

@shs96c, I understand why it seems like rules_kotlin would be a good spot for this, but I actually think that if someone is using Kotlin specifically with the JVM, then the best place for handling those rules is in the same plugin that handles the Java rules. I put more thoughts about why this is the case in the draft PR I linked above.

The only new dependency it adds to rules_jvm is one new Maven dependency on the "kotlin" package for parsing the Kotlin files.

@shs96c
Copy link
Collaborator

shs96c commented Dec 13, 2024

I am quite persuaded by the argument that kotlin and java source is often co-mingled in a way that other JVM-based languages don't seem to do.

@alexeagle
Copy link
Collaborator

FWIW We already have a Kotlin gazelle extension over here: https://github.com/aspect-build/aspect-cli/tree/main/gazelle/kotlin written by @jbedard

There are no great options for where to place Gazelle extensions since they're always compiled from source and introduce new toolchain dependencies (e.g. you'd want to use Tree-Sitter and that needs a C++ toolchain) IMO bazel-contrib/bazel-gazelle#938 is needed, so that Gazelle binary can load extensions that rulesets ship as pre-built binaries on their releases page.

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

6 participants