ors*_*har 12 java compilation build bazel
Bazel在清理编译(java)期间显示所有编译警告.
但是 - 当我们重新运行bazel build时 - 我们失去了所有的警告.
是否有任何标志可以显示缓存目标的原始警告?
示例回购: https ://github.com/or-shachar/bazel-sample-repo/tree/warning(branch warning)
首次输出:
? bazel build //...
INFO: Found 1 target...
INFO: From Building src/main/java/com/example/libmy_warning_lib.jar (1 source file):
src/main/java/com/example/MyLib.java:12: warning: [static] static variable should be qualified by type name, MyLib, instead of by an expression
this.x = this.x + 2.1;
^
src/main/java/com/example/MyLib.java:12: warning: [static] static variable should be qualified by type name, MyLib, instead of by an expression
this.x = this.x + 2.1;
^
Target //src/main/java/com/example:my_warning_lib up-to-date:
bazel-bin/src/main/java/com/example/libmy_warning_lib.jar
INFO: Elapsed time: 3.286s, Critical Path: 1.03s
Run Code Online (Sandbox Code Playgroud)
下次运行:
? bazel build //...
INFO: Found 1 target...
Target //src/main/java/com/example:my_warning_lib up-to-date:
bazel-bin/src/main/java/com/example/libmy_warning_lib.jar
INFO: Elapsed time: 0.244s, Critical Path: 0.01s
Run Code Online (Sandbox Code Playgroud)
正如您所看到的 - 我们正在丢失缓存运行时的警告.如果某些标志无法使用 - 可能值得添加为功能.
| 归档时间: |
|
| 查看次数: |
262 次 |
| 最近记录: |