Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing examples fail with clap v3.2.25 #348

Closed
jonassmedegaard opened this issue Aug 19, 2023 · 2 comments · Fixed by #349
Closed

testing examples fail with clap v3.2.25 #348

jonassmedegaard opened this issue Aug 19, 2023 · 2 comments · Fixed by #349
Labels
defect Something that isn't as or doesn't work as intended

Comments

@jonassmedegaard
Copy link

How To Reproduce

env RUST_BACKTRACE=1 /usr/bin/cargo -Zavoid-dev-deps test --verbose --verbose -j2 --target x86_64-unknown-linux-gnu --release fails like this:

   Compiling clap v3.2.25
     Running `CARGO=/usr/bin/cargo CARGO_CRATE_NAME=clap CARGO_MANIFEST_DIR=/build/rust-palette-0.7.3+dfsg/debian/cargo_registry/clap-3.2.25 CARGO_PKG_AUTHORS='' CARGO_PKG_DESCRIPTION='A simple to use, efficient, and full-featured Command Line Argument Parser' CARGO_PKG_HOMEPAGE='' CARGO_PKG_LICENSE='MIT OR Apache-2.0' CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=clap CARGO_PKG_REPOSITORY='https://github.com/clap-rs/clap' CARGO_PKG_RUST_VERSION=1.56.1 CARGO_PKG_VERSION=3.2.25 CARGO_PKG_VERSION_MAJOR=3 CARGO_PKG_VERSION_MINOR=2 CARGO_PKG_VERSION_PATCH=25 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/build/rust-palette-0.7.3+dfsg/target/release/deps:/usr/lib:/usr/lib/libeatmydata' /usr/bin/sccache rustc --crate-name clap --edition=2021 /build/rust-palette-0.7.3+dfsg/debian/cargo_registry/clap-3.2.25/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no -C metadata=1424ba24467d4c26 -C extra-filename=-1424ba24467d4c26 --out-dir /build/rust-palette-0.7.3+dfsg/target/x86_64-unknown-linux-gnu/release/deps --target x86_64-unknown-linux-gnu -L dependency=/build/rust-palette-0.7.3+dfsg/target/x86_64-unknown-linux-gnu/release/deps -L dependency=/build/rust-palette-0.7.3+dfsg/target/release/deps --extern bitflags=/build/rust-palette-0.7.3+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libbitflags-7742a1585ab8b5b6.rmeta --extern clap_lex=/build/rust-palette-0.7.3+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libclap_lex-3539757ea6fe94c1.rmeta --extern indexmap=/build/rust-palette-0.7.3+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libindexmap-40d9880b5a3cafcc.rmeta --extern once_cell=/build/rust-palette-0.7.3+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libonce_cell-0731ead19a87d7c0.rmeta --extern textwrap=/build/rust-palette-0.7.3+dfsg/target/x86_64-unknown-linux-gnu/release/deps/libtextwrap-dfb6e8f403a72894.rmeta --cap-lints warn -C debuginfo=2 --cap-lints warn -C linker=x86_64-linux-gnu-gcc -C link-arg=-Wl,-z,relro --remap-path-prefix palette_0.7.3=/usr/share/cargo/registry//palette-0.7.3 --remap-path-prefix palette_derive_0.7.3=/usr/share/cargo/registry//palette_derive-0.7.3 --remap-path-prefix debian/cargo_registry=/usr/share/cargo/registry/ -C link-arg=-fuse-ld=mold`
error: `std` feature is currently required to build `clap`
  --> /build/rust-palette-0.7.3+dfsg/debian/cargo_registry/clap-3.2.25/src/lib.rs:96:1
   |
96 | compile_error!("`std` feature is currently required to build `clap`");
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: could not compile `clap` due to previous error
@jonassmedegaard jonassmedegaard added the defect Something that isn't as or doesn't work as intended label Aug 19, 2023
@jonassmedegaard
Copy link
Author

Build succeeds with this patch applied:

--- a/palette/Cargo.toml
+++ b/palette/Cargo.toml
@@ -85,6 +85,7 @@
 [dev-dependencies.clap]
 version = "3.2.23"
 default-features = false
+features = ["std"]

 [dev-dependencies.criterion]
 version = "0.4.0"

@Ogeon
Copy link
Owner

Ogeon commented Aug 19, 2023

Thanks for noticing this! It should be fine to add that feature, since it's only used by the examples. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Something that isn't as or doesn't work as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants