Skip to content

Commit

Permalink
Add missing required features to Cargo.toml for examples (#432)
Browse files Browse the repository at this point in the history
* Add missing required features to serve-zone example.

* Fix required-features listed in Cargo.toml for the query-zone example.

* Fix required-features listed in Cargo.toml for the client-transports example.

* Echo all run commands to check examples, and exit immediately on error (also ensures a final success doesn't cause previous failures to be ignored).

* Fix required-features listed in Cargo.toml for the server-transports example.

* Remove unused import except when feature is enabled that needs it.
  • Loading branch information
ximon18 authored and tertsdiepraam committed Nov 22, 2024
1 parent e1c1db8 commit 4c8f2d1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ jobs:
# Run the temporary script:
bash ${{ runner.temp }}/check-examples.sh
bash -x -e ${{ runner.temp }}/check-examples.sh
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,23 +121,23 @@ required-features = ["std", "rand"]

[[example]]
name = "client-transports"
required-features = ["net", "unstable-client-transport"]
required-features = ["net", "tokio-rustls", "unstable-client-transport"]

[[example]]
name = "server-transports"
required-features = ["net", "unstable-server-transport"]
required-features = ["net", "tokio-stream", "tracing-subscriber", "unstable-client-transport", "unstable-server-transport"]

[[example]]
name = "read-zone"
required-features = ["zonefile"]

[[example]]
name = "query-zone"
required-features = ["zonefile", "unstable-zonetree"]
required-features = ["tracing-subscriber", "unstable-zonetree", "zonefile"]

[[example]]
name = "serve-zone"
required-features = ["zonefile", "net", "unstable-server-transport", "unstable-zonetree"]
required-features = ["zonefile", "net", "tokio-stream", "tracing-subscriber", "tsig", "unstable-client-transport", "unstable-server-transport", "unstable-zonetree"]

[[example]]
name = "ixfr-client"
Expand Down
1 change: 1 addition & 0 deletions examples/client-transports.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/// Using the `domain::net::client` module for sending a query.
use std::net::{IpAddr, SocketAddr};
use std::str::FromStr;
#[cfg(feature = "unstable-validator")]
use std::sync::Arc;
use std::time::Duration;
use std::vec::Vec;
Expand Down

0 comments on commit 4c8f2d1

Please sign in to comment.