Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,10 @@ grpc-gcp = [ "dep:protobuf", "dep:grpc-protobuf", "dep:grpc", "dep:grpc-google",
"dep:rustls", "dep:protobuf-well-known-types" ]
grpc-routeguide = ["dep:grpc", "dep:grpc-protobuf", "dep:protobuf", "dep:rand"]
grpc-helloworld = ["dep:grpc", "dep:grpc-protobuf", "dep:protobuf"]
full = ["gcp", "routeguide", "reflection", "autoreload", "health", "grpc-web",
default = ["gcp", "routeguide", "reflection", "autoreload", "health", "grpc-web",
"tracing", "uds", "streaming", "mock", "json-codec", "compression", "tls",
"tls-rustls", "tls-client-auth", "types", "cancellation", "h2c",
"grpc-routeguide", "grpc-helloworld", "grpc-gcp"]
default = ["full"]
"grpc-routeguide", "grpc-helloworld"]
# Workaround for cargo-udeps bug.
# TODO: Remove once the fix is released: https://github.com/est31/cargo-udeps/pull/338
h2 = []
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Once your credentials are set up, you will need your GCP Project ID, which can
be found on the main dashboard of the Google Cloud Console. With both of these
ready, you can run the example like so:
```bash
$ cargo run --bin grpc-gcp-client -- <project-id>
$ cargo run --bin grpc-gcp-client --features grpc-gcp -- <project-id>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still a required feature for the binary in the cargo.toml though? Does that actually mean you have to set it manually or else it won't run?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, after removing grpc-gcp from the default set, it must be explicitly enabled. Otherwise the build fails:

cargo run --bin grpc-gcp-client --features grpc-protobuf-build/build-plugin -- "$PROJECT" 

error: target `grpc-gcp-client` in package `examples` requires the features: `grpc-gcp`
Consider enabling them by passing, e.g., `--features="grpc-gcp"`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's kind of crazy. Maybe we should have a separate crate for each example? I think that could simplify all this dependency management stuff a lot.

But we should also still think about doing (1) from #2661 and splitting grpc examples from tonic.

Maybe we move the tonic examples either under tonic/ or rename to tonic-examples?

```

[Application Default Credentials]: https://docs.cloud.google.com/docs/authentication/application-default-credentials
Expand Down
2 changes: 1 addition & 1 deletion tonic-reflection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tonic-prost = { version = "0.14.6", path = "../tonic-prost", default-features =

[dev-dependencies]
tokio-stream = {version = "0.1", default-features = false, features = ["net"]}
tonic = { version = "0.14.6", path = "../tonic", default-features = false, features = ["transport"] }
tonic = { version = "0.14.6", path = "../tonic", default-features = false, features = ["transport", "router"] }

[lints]
workspace = true
Expand Down
Loading