We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
(rule 'rust_library') doesn't contain declared provider 'CcInfo'
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
Hello! I have an issue in my rust library as JNI after upgrading rules_rust to this commit #361:
load("@//:config.bzl", "rustc_flags") load("@io_bazel_rules_rust//rust:rust.bzl", "rust_library") rust_library( name = "somelib", srcs = ["src/lib.rs"], crate_root = "src/lib.rs", crate_type = "cdylib", rustc_flags = rustc_flags, deps = [ "//cargo:jni", ], visibility = ["//visibility:public"], )
bazel build:
Traceback (most recent call last): File "/home/xxx/Projects/testapp/BUILD.bazel", line 4 rust_binary(name = 'joiner.so') File "/home/xxx/.cache/bazel/_bazel_johndoe/96364899299eda1f2874771f867b1be1/external/io_bazel_rules_rust/rust/private/rust.bzl", line 169, in _rust_binary_impl rustc_compile_action(ctx = ctx, <2 more arguments>) File "/home/xxx/.cache/bazel/_bazel_johndoe/96364899299eda1f2874771f867b1be1/external/io_bazel_rules_rust/rust/private/rustc.bzl", line 508, in rustc_compile_action establish_cc_info(ctx, <4 more arguments>) File "/home/xxx/.cache/bazel/_bazel_johndoe/96364899299eda1f2874771f867b1be1/external/io_bazel_rules_rust/rust/private/rustc.bzl", line 551, in establish_cc_info dep[CcInfo] <target //cargo/vendor/jni-0.17.0:jni> (rule 'rust_library') doesn't contain declared provider 'CcInfo'
Dependencies has been generated by cargo-raze v0.3.6.
The text was updated successfully, but these errors were encountered:
Yes there is an obvious bug I wonder why it was not caught earlier.
Sorry, something went wrong.
Ok it wasn't caught because it would be triggered only with staticlib / cdylib
Do not add CcInfo from dependencies that don't have them
447030e
The current code is failing for any cdylib or staticlib with a rust dependency (without CcInfo provider). Fixes bazelbuild#368.
Do not add CcInfo from dependencies that don't have them (#369)
f41a008
The current code is failing for any cdylib or staticlib with a rust dependency (without CcInfo provider). Fixes #368.
Now it's working again. Thank you!
Successfully merging a pull request may close this issue.
Hello!
I have an issue in my rust library as JNI after upgrading rules_rust to this commit #361:
bazel build:
Dependencies has been generated by cargo-raze v0.3.6.
The text was updated successfully, but these errors were encountered: