Bazel和课堂的可见性

发布于 2025-02-04 05:43:14 字数 718 浏览 2 评论 0原文

我有一个MonorePo项目,其中

backend
|- jvm
    |- apps
        |- core-service
            |- api
               |- src
               |- BUILD.bazel
            |- app
               |- src
               |- BUILD.bazel
        |- post-service
            |- api
               |- src
               |- BUILD.bazel
            |- app
               |- src
               |- BUILD.bazel
        ...
    |- libs
        |-core
           |- src
           |- BUILD.bazel
        ...
    |- BUILD.bazel
|- .bazelproject
|- BUILD.bazel

有一个问题。例如,如果我在不同的服务中有两个具有相同名称的类。当我在代码中使用此类(例如,在核心服务中)时,我可以意外地导入错误的类(从后服务)。我只有在运行构建时才能理解这一点。 bu一些原因,想法导入了错误的班级,直到我运行构建之前,一切看起来都很好。

它是Bazel配置还是想法配置的一部分?

I have a monorepo project with the structure

backend
|- jvm
    |- apps
        |- core-service
            |- api
               |- src
               |- BUILD.bazel
            |- app
               |- src
               |- BUILD.bazel
        |- post-service
            |- api
               |- src
               |- BUILD.bazel
            |- app
               |- src
               |- BUILD.bazel
        ...
    |- libs
        |-core
           |- src
           |- BUILD.bazel
        ...
    |- BUILD.bazel
|- .bazelproject
|- BUILD.bazel

I have an issue. For instance, if I have two classes with the same name in different services. When I use this class in a code (for example, in core-service), I can accidentally import the wrong class (from post-service). And I will understand this only when I run the build. Bu some reason, IDEA imported the wrong class, and everything is looking fine till I run the build.

Is it part of Bazel configuration or IDEA configuration?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文