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

gazelle plugin creates java_library with name='PACKAGENAME', but tries to use an nonexisting java_library named :PACKAGENAME-test-lib #304

Open
cristifalcas opened this issue Oct 30, 2024 · 0 comments

Comments

@cristifalcas
Copy link

This is happening only in test folders.

Like the title says, gazelle creates a library with the package name, but tries to use what seems to be a library that would be created when using java_test_suite.
We do not use java_test_suite, so in our case gazelle doesn't do the right thing:

java_binary(
    name = "TextFormatCommand",
    testonly = True,
    main_class = "some.class.path.text.TextFormatCommand",
    visibility = ["//visibility:public"],
    runtime_deps = [":text-test-lib"],
)

java_library(
    name = "text",
    testonly = True,
    srcs = ["TextFormatCommand.java"],
    deps = [
        "@jvm_deps//:com_google_guava_guava",
        "@jvm_deps//:info_picocli_picocli",
        "@jvm_deps//:junit_junit",
    ],
)

Any way we can configure this behaviour?
Or a known fix for this issue?

Other then that, gazelle for java works pretty well!

Thank you

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

1 participant