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]: Support test and src directories with the Kotlin Gazelle plugin #702

Open
MorganRoff-UnlikelyAI opened this issue May 22, 2024 · 0 comments
Labels
enhancement New feature or request untriaged Requires traige

Comments

@MorganRoff-UnlikelyAI
Copy link

MorganRoff-UnlikelyAI commented May 22, 2024

What is the current behavior?

So let's caveat this right away that I may well have something misconfigured, but here is what I'm seeing:

I have some Kotlin code that I'm migrating to Bazel. This is still in a Maven-style set up right now, with code under both regular code under src/main/java, and tests under src/test/java.

I'm trying to run Aspect's Kotlin Gazelle plugin to set up BUILD files for this project, but I'm getting an error like this:

gazelle: Resolution Error: Import "my.package.here" from "SomeClass.kt" resolved to multiple targets (//my/lib/src/main/java/my/package/here, //my/lib/src/test/java/my/package/here) - this must be fixed using the "gazelle:resolve" directive

Describe the feature

Ideally I would want this to resolve in the same way that the Java extension handles it from bazel-contrib/rules_jvm. This allows for a test package to overlap with the main package, and automatically imports the main package where necessary.

Please let me know if this is actually supported, and I have just configured something incorrectly/am missing a Gazelle directive.

@MorganRoff-UnlikelyAI MorganRoff-UnlikelyAI added the enhancement New feature or request label May 22, 2024
@github-actions github-actions bot added the untriaged Requires traige label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request untriaged Requires traige
Projects
None yet
Development

No branches or pull requests

1 participant