google / cargo-raze

Generate Bazel BUILD from Cargo dependencies!
Apache License 2.0
480 stars 104 forks source link

Consolidate duplicated targeted dependencies. #512

Open sayrer opened 2 years ago

sayrer commented 2 years ago

This should actually fix #451.

sayrer commented 2 years ago

Hmm, I guess this will fix the problem, but it will create more select blocks than necessary. It will end up looking pretty similar to the bottom of features.rs, I'll see if it's worth making it generic.

sayrer commented 2 years ago

Most of the changes after bootstrapping are just innocuous alphabetization. But there are a few problems still there:

third_party/cargo/remote/BUILD.async-std-1.9.0.bazel (wasm32-wasi is newly missing) third_party/cargo/remote/BUILD.rand-0.8.3.bazel (libc is missing) third_party/cargo/remote/BUILD.reqwest-0.11.2.bazel (windows reqwest dependencies)

After those are resolved, it will make sense to eliminate platform select blocks with no members (this can happen if common dependencies are hoisted out of selects in an effort to avoid repetition)

sayrer commented 2 years ago

This latest revision fixed all of the bootstrapping problems I found above.

gferon commented 2 years ago

I'm having the same issue as described #483 with quanta. @sayrer Is there anyway I can help with pushing this PR to the finish line? (more testing for example).

sayrer commented 2 years ago

I'm having the same issue as described #483 with quanta. @sayrer Is there anyway I can help with pushing this PR to the finish line? (more testing for example).

I think we're mostly looking at reviewer bandwidth at the moment. I've been talking it over and have a way forward.