jmillikin / rules_bison

Bazel build rules for GNU Bison
Apache License 2.0
16 stars 25 forks source link

`bison_java_library` needs to declare a Java toolchain dependency in recent Bazel versions #16

Closed jmillikin closed 1 month ago

jmillikin commented 1 month ago
$ bazel-7.3.1 test //...
INFO: Invocation ID: 9d846372-b06e-4903-a38a-c0bc23e9e309
ERROR: /home/john/src/rules_bison/trunk/tests/BUILD:51:19: in bison_java_library rule //tests:HelloJavaParser: 
Traceback (most recent call last):
    File "/home/john/src/rules_bison/trunk/bison/rules/bison_java_library.bzl", line 37, column 36, in _bison_java_library
        java_info = java_common.compile(
    File "/virtual_builtins_bzl/common/java/java_common.bzl", line 65, column 19, in _compile
    File "/virtual_builtins_bzl/common/java/java_common_internal_for_builtins.bzl", line 195, column 63, in compile
Error in create_header_compilation_action: Rule 'bison_java_library' in '/home/john/src/rules_bison/trunk/tests/BUILD:51:19' must declare '@@bazel_tools//tools/jdk:toolchain_type' toolchain in order to use java_common. See https://github.com/bazelbuild/bazel/issues/18970.
ERROR: /home/john/src/rules_bison/trunk/tests/BUILD:51:19: Analysis of target '//tests:HelloJavaParser' failed
jmillikin commented 1 month ago

Fixed in https://github.com/jmillikin/rules_bison/commit/352bf2c1c0366ff69cc43bdee7f748de2c480511