无法使用 Bazel (v0.10) 编译 Guava (v24.0)
Failing to compile Guava (v24.0) using Bazel (v0.10)
我最近分叉了 guava(v24.0,今天发布),目的是使用 Bazel 贡献一个并行构建系统进行编译和测试。我大部分时间都在工作,但我在编译收集包时遇到问题:
这是我看到的错误:
https://gist.github.com/perezd/4b39107381a9a032982fee3543c2f382
如果你想重现,我已经把我的 WIP 分支推到这里了:
https://github.com/perezd/guava/tree/bazel
重现命令(从项目根目录):
bazel 构建 guava/src/com/google/common/collect
有什么想法吗?不确定为什么会出现这些故障?这可能是 JDK9 的东西吗?
编辑:我是 运行 javac 1.8.0_151(OpenJDK 通过 ubuntu 中的 openjdk-8-jdk 包)。另外,不言而喻,maven 编译工作正常。
编辑:这是传递给 BazelJavaBuiler 的生成的参数文件的输出:https://gist.github.com/perezd/a730ff76f640f28fbf336174f48c8e8b
看起来你是 depending on the entire Checker Framework, rather than just the checker-compat-qual
, the annotations-only artifact that Guava uses。 Checker Framework 捆绑了 Guava 的旧副本,仅包括不扩展 JDK 的 Function
和 Predicate
的 Function
和 Predicate
的副本。
我最近分叉了 guava(v24.0,今天发布),目的是使用 Bazel 贡献一个并行构建系统进行编译和测试。我大部分时间都在工作,但我在编译收集包时遇到问题:
这是我看到的错误: https://gist.github.com/perezd/4b39107381a9a032982fee3543c2f382
如果你想重现,我已经把我的 WIP 分支推到这里了: https://github.com/perezd/guava/tree/bazel
重现命令(从项目根目录): bazel 构建 guava/src/com/google/common/collect
有什么想法吗?不确定为什么会出现这些故障?这可能是 JDK9 的东西吗?
编辑:我是 运行 javac 1.8.0_151(OpenJDK 通过 ubuntu 中的 openjdk-8-jdk 包)。另外,不言而喻,maven 编译工作正常。
编辑:这是传递给 BazelJavaBuiler 的生成的参数文件的输出:https://gist.github.com/perezd/a730ff76f640f28fbf336174f48c8e8b
看起来你是 depending on the entire Checker Framework, rather than just the checker-compat-qual
, the annotations-only artifact that Guava uses。 Checker Framework 捆绑了 Guava 的旧副本,仅包括不扩展 JDK 的 Function
和 Predicate
的 Function
和 Predicate
的副本。