Open paulfariello opened 12 months ago
Note that swagger define 2 kind of dependencies for hyper (one being feature-gated):
[features]
multipart_related = ["mime_multipart", "hyper_0_10", "mime_0_2"]
[dependencies]
hyper = "0.14"
# multipart/related
hyper_0_10 = {package = "hyper", version = "0.10", default-features = false, optional=true}
When crate_universe
is building the dep list it looks for optional package to check if they should be enabled with regards to features:
But it do so based on crate name and not on crate alias nor crate id (based on name + version).
and thus skip the hyper dependency.
Addressed by https://github.com/bazelbuild/rules_rust/pull/2265
Current version (
0.30
) is unable to build a simple swagger external crate.Step to reproduce
WORKSPACE
and simply run:
The following error is raised:
Details
Swagger crate has a pretty simple Cargo.toml https://github.com/Metaswitch/swagger-rs/blob/master/Cargo.toml
Mainly it depends on hyper (not optional):
The corresponding generated
BUILD
file is:There is no declared dependencies to
hyper
.