Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: 'JavaInfo' value has no field or method 'transitive_deps' with Bazel@HEAD #1003

Closed
sgowroji opened this issue Aug 10, 2023 · 3 comments · Fixed by #1005
Closed

Error: 'JavaInfo' value has no field or method 'transitive_deps' with Bazel@HEAD #1003

sgowroji opened this issue Aug 10, 2023 · 3 comments · Fixed by #1005

Comments

@sgowroji
Copy link
Member

https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/3228#_

Platform : Ubuntu, Windows, MacOS

Logs :

ERROR: /var/lib/buildkite-agent/builds/bk-docker-2kj2/bazel-downstream-projects/rules_kotlin/examples/android/libAndroid/BUILD.bazel:17:15: in kt_jvm_library rule //libAndroid:util:
Traceback (most recent call last):
	File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/6e490b9802546f7a64fd0b8b6a256010/external/io_bazel_rules_kotlin/kotlin/internal/jvm/impl.bzl", line 221, column 36, in kt_jvm_library_impl
		_kt_jvm_produce_jar_actions(ctx, "kt_jvm_library") if ctx.attr.srcs or ctx.attr.resources else export_only_providers(
	File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/6e490b9802546f7a64fd0b8b6a256010/external/io_bazel_rules_kotlin/kotlin/internal/jvm/compile.bzl", line 535, column 50, in kt_jvm_produce_jar_actions
		outputs_struct = _run_kt_java_builder_actions(
	File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/6e490b9802546f7a64fd0b8b6a256010/external/io_bazel_rules_kotlin/kotlin/internal/jvm/compile.bzl", line 794, column 36, in _run_kt_java_builder_actions
		_run_merge_jdeps_action(
	File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/6e490b9802546f7a64fd0b8b6a256010/external/io_bazel_rules_kotlin/kotlin/internal/jvm/compile.bzl", line 264, column 70, in _run_merge_jdeps_action
		inputs = depset(jdeps, transitive = [depset([], transitive = [dep.transitive_deps for dep in deps])])
Error: 'JavaInfo' value has no field or method 'transitive_deps'
Available attributes: _compile_time_java_dependencies, _constraints, _neverlink, _transitive_full_compile_time_jars, annotation_processing, api_generating_plugins, compilation_info, compile_jars, full_compile_jars, java_outputs, module_flags_info, outputs, plugins, runtime_output_jars, source_jars, transitive_compile_time_jars, transitive_native_libraries, transitive_runtime_jars, transitive_source_jars
(02:25:59) ERROR: /var/lib/buildkite-agent/builds/bk-docker-2kj2/bazel-downstream-projects/rules_kotlin/examples/android/libAndroid/BUILD.bazel:17:15: Analysis of target '//libAndroid:util' failed
(02:25:59) ERROR: Analysis of target '//app:force_build_apks_test' failed; build aborted: Analysis failed
(02:25:59) INFO: Elapsed time: 10.639s
(02:25:59) INFO: 0 processes.
(02:25:59) ERROR: Build did NOT complete successfully
(02:25:59) ERROR: Couldn't start the build. Unable to run tests

Steps :

git clone https://github.com/bazelbuild/rules_kotlin.git && cd rules_kotlin/examples/android
git reset d584c431c1c8bc214e8df28475801fa1cf86864e --hard
export USE_BAZEL_VERSION=dbd9e1889f899fe20c7e1195bbde57a8c40b4327
bazel test //... 

CC Greenteam @comius

@comius
Copy link
Contributor

comius commented Aug 11, 2023

cc @hvadehra
Can you fix rules_kotlin?

hvadehra added a commit to hvadehra/rules_kotlin that referenced this issue Aug 11, 2023
`transitive_deps` was an alias for `transitive_compile_time_jars`
`transitive_runtime_deps` was an alias for `transitive_runtime_jars`

The fields were deprecated in 2021, and are dropped in Bazel@HEAD

Fixes bazelbuild#1003
hvadehra added a commit to hvadehra/rules_kotlin that referenced this issue Aug 11, 2023
transitive_deps was an alias for transitive_compile_time_jars transitive_runtime_deps was an alias for transitive_runtime_jars

The fields were deprecated in 2021, and are dropped in Bazel@HEAD

Fixes bazelbuild#1003
@Bencodes
Copy link
Collaborator

@comius there's a PR open for this already waiting to be reviewed #1004

@comius
Copy link
Contributor

comius commented Aug 11, 2023

@comius there's a PR open for this already waiting to be reviewed #1004

Thank you all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants