indygreg / apple-platform-rs

Rust crates supporting Apple platform development
579 stars 46 forks source link

fix: build errors when no features are enabled #123

Closed baszalmstra closed 9 months ago

baszalmstra commented 10 months ago

When the notarize feature is not enabled, some enum variants from the Subcommands were not included. This change ensures that is also done in the place where these variants are used.

Without this chance the following errors are reported when not building with default features:

error[E0599]: no variant or associated item named `EncodeAppStoreConnectApiKey` found for enum `Subcommands` in the current scope
    --> apple-codesign\src\cli\mod.rs:2316:26
     |
1850 | enum Subcommands {
     | ---------------- variant or associated item `EncodeAppStoreConnectApiKey` not found for this enum
...
2316 |             Subcommands::EncodeAppStoreConnectApiKey(c) => c,
     |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^ variant or associated item not found in `Subcommands`

error[E0599]: no variant or associated item named `NotaryLog` found for enum `Subcommands` in the current scope
    --> apple-codesign\src\cli\mod.rs:2323:26
     |
1850 | enum Subcommands {
     | ---------------- variant or associated item `NotaryLog` not found for this enum
...
2323 |             Subcommands::NotaryLog(c) => c,
     |                          ^^^^^^^^^ variant or associated item not found in `Subcommands`

error[E0599]: no variant or associated item named `NotarySubmit` found for enum `Subcommands` in the current scope
    --> apple-codesign\src\cli\mod.rs:2324:26
     |
1850 | enum Subcommands {
     | ---------------- variant or associated item `NotarySubmit` not found for this enum
...
2324 |             Subcommands::NotarySubmit(c) => c,
     |                          ^^^^^^^^^^^^ variant or associated item not found in `Subcommands`

error[E0599]: no variant or associated item named `NotaryWait` found for enum `Subcommands` in the current scope
    --> apple-codesign\src\cli\mod.rs:2325:26
     |
1850 | enum Subcommands {
     | ---------------- variant or associated item `NotaryWait` not found for this enum
...
2325 |             Subcommands::NotaryWait(c) => c,
     |                          ^^^^^^^^^^ variant or associated item not found in `Subcommands`