You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi-Diddly-Ho, rules_jvm_external developers!
We're seeing a build failure with Bazel version 5+ with a missing field in JavaInfo. Everything works fine with Bazel 4.2.1, the pinned version in this repo, but the upgrade causes the build to fail.
Information
Running our build on the older version of Bazel works as expected: bazel run --define "maven_repo=file://$HOME/.m2/repository" //java/main/java/org/odict:odict.publish, and everything gets published, however, when upgrading we get:
ERROR: /Users/imelnikov/Documents/dev/odict/java/main/java/org/odict/BUILD.bazel:4:12: in maven_project_jar rule //java/main/java/org/odict:odict-project:
Traceback (most recent call last):
File "/private/var/tmp/_bazel_imelnikov/d792e4c95a32b3f00d6ffc5d5ab946f1/external/rules_jvm_external/private/rules/maven_project_jar.bzl", line 52, column 36, in _maven_project_jar_impl
targets = [] + target[JavaInfo].transitive_exports.to_list()
Error: 'JavaInfo' value has no field or method 'transitive_exports'
Available attributes: annotation_processing, api_generating_plugins, compilation_info, compile_jars, full_compile_jars, java_outputs, outputs, plugins, runtime_output_jars, source_jars, transitive_compile_time_jars, transitive_deps, transitive_native_libraries, transitive_runtime_deps, transitive_runtime_jars, transitive_source_jars
ERROR: /Users/imelnikov/Documents/dev/odict/java/main/java/org/odict/BUILD.bazel:4:12: Analysis of target '//java/main/java/org/odict:odict-project' failed
ERROR: Analysis of target '//java/main/java/org/odict:odict.publish' failed; build aborted:
The text was updated successfully, but these errors were encountered:
ivanempire
changed the title
JavaInfo value has no field or method 'transitive_exports' when upgrading to Blaze 5.x+
JavaInfo value has no field or method 'transitive_exports' when upgrading to Bazel 5.x+
Apr 11, 2022
Hi-Diddly-Ho,
rules_jvm_external
developers!We're seeing a build failure with Bazel version 5+ with a missing field in
JavaInfo
. Everything works fine with Bazel 4.2.1, the pinned version in this repo, but the upgrade causes the build to fail.Information
Running our build on the older version of Bazel works as expected:
bazel run --define "maven_repo=file://$HOME/.m2/repository" //java/main/java/org/odict:odict.publish
, and everything gets published, however, when upgrading we get:This happens because, from what we can tell, that field no longer exists in the latest versions of Bazel:
https://docs.bazel.build/versions/4.2.0/skylark/lib/JavaInfo.html#transitive_exports
https://docs.bazel.build/versions/5.1.0/skylark/lib/JavaInfo.html#transitive_exports <-- he's dead, Jim
I'd be happy to take a look at this and see if this can be fixed, couldn't find anything useful in Bazel's release notes. Thanks!
Our macro, for helpful reference:
The text was updated successfully, but these errors were encountered: