Skip to content

"Folder ... contains more Java files then configured in Bazel" when file is used in a java_library package. #116

@toumorokoshi

Description

@toumorokoshi

I'm getting this error when running the extension on bazel itself:

Folder '/home/yusuke.tsutsumi/workspace/bazel/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac' contains more Java files then configured in Bazel. This is a scenario which is challenging to support in IDEs! Consider re-structuring your source code into separate folder hierarchies and Bazel packages.
 - javac/JavacOptions.java
 - javac/WerrorCustomOption.java

I looked at the files, and those are used in a separate target, although indeed they are explicitly excluded from the javac target

Although I think the error is still correct in that the package structure is difficult for parse properly - it is still a technically correct usage of bazel.

At minimum maybe this should be a warning and not an error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions