The sound distributed version control system

#836 Pijul does not build/install with --no-default-features

Opened by philomathiclife on November 18, 2023 Good first bug
philomathiclife on November 18, 2023

Pijul version 1.0.0.-beta.7 does not build/install when built/installed with --no-default-features. thrussh_keys::key::PublicKey::RSA requires the openssl feature, but identity::create::Complete::prompt_ssh relies on that enum variant without the appropriate cfg attribute.

[zack@laptop ~]$ cargo install --version "1.0.0-beta.7" --no-default-features pijul
⋮
error[E0599]: no variant named `RSA` found for enum `thrussh_keys::key::PublicKey`
   --> /home/zack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pijul-1.0.0-beta.7/src/identity/create.rs:163:48
    |
163 | ...                   PublicKey::RSA { ref hash, .. } => hash.name().identity_file(),
    |                                  ^^^ variant not found in `thrussh_keys::key::PublicKey`

error[E0599]: no variant named `RSA` found for enum `thrussh_keys::key::PublicKey`
   --> /home/zack/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pijul-1.0.0-beta.7/src/identity/create.rs:175:24
    |
175 |             PublicKey::RSA { ref hash, .. } => hash.name().identity_file(),
    |                        ^^^ variant not found in `thrussh_keys::key::PublicKey`

For more information about this error, try `rustc --explain E0599`.
philomathiclife on November 18, 2023

Just confirmed that adding #[cfg(feature = "openssl")] above the RSA match arms allows the code to compile correctly.

pmeunier added tag Good first bug on December 25, 2023
ryanbooker added a change on January 8, 2024
6YFVGETBT7V6ILC34RECOJVFWKSCUL466C2PJ3D7726LAUOTF3SQC