Open ericmcbride opened 2 days ago
I may have another occurrence of this same issue with rules_rust/0.54.1 (not 100% sure, but it might be worth sharing my scenario here).
In my case it is related to this optional dependency of tauri-plugin-v2.03
:
[target."cfg(target_os = \"macos\")".dependencies]
plist = { version = "1", optional = true }
It fails (use of undeclared crate or module plist
) when my MODULE.bazel
looks like the following:
crate.from_cargo(
name = "crates_libraries",
cargo_lockfile = "//:Cargo.lock",
manifests = [
"//:Cargo.toml",
...
],
supported_platform_triples = [
# "aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"x86_64-apple-darwin",
],
)
However, it builds successfully when I add the aarch64
platform:
supported_platform_triples = [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"x86_64-apple-darwin",
],
I'm using MacOS x86_64.
Note.- I've tried rules_rust/0.53.0
and it also fails.
Sadly this didnt work. Its still trying to build. Im gonna try a crate.select based off platform for features. Not sure what changed that broke this.
Update: Cannot get it to work. Seems like the appropriate cfg(target_os = "macos")
aren't working correctly. Not sure if reqwest is the only one. I will add a sample example. Reqwest is a large library and it would suck to see this break all of rules rust
We have updated to rules rust 0.54.1 and we are noticing a weird regression with the
reqwest
library. They added a default feature configurationdefault = ["default-tls", "charset", "http2", "macos-system-configuration"]
for a mac-os specific crate. It takes the following flagsFor some reason on linux x86 and linux-arm64 it s hitting the
target_os
flag in bazel and it is not doing so with withrules_rust 0.48.0
or with cargo. Any idea why this is happening?Ive tried using the
crate.annotation
But i am getting cyclic deps
Any idea why this could happen? This is stopping us from updating rust.