From 73d3ce83cebb68e156955fe6eee8e98b13a5a0bd Mon Sep 17 00:00:00 2001 From: Colton Hurst Date: Thu, 26 Sep 2024 12:05:17 -0400 Subject: [PATCH] [PM-12431] Temporarily un-export bitwarden_fido (#1072) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 🎟ī¸ Tracking https://bitwarden.atlassian.net/browse/PM-12431 ## 📔 Objective Temporarily un-export `bitwarden-fido`. We can't release crates for `1.0` because: - `bitwarden-fido` currently relies on dependencies that are GitHub repositories ([reference](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-other-registries)) - `bitwarden-fido` is not yet released (same with the aforementioned dependencies) This PR also includes the auto-updates to the `Cargo.lock file`, which should be fine. ⭐ī¸**NOTE**⭐ī¸: This will break CI, this should only be merged when we are ready to do 1.0 releases of `bitwarden`, `bws`, etc. It should quickly be followed up a PR, after release, which reverses this. ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## đŸĻŽ Reviewer guidelines - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹī¸ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠ī¸ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or â™ģī¸ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- .github/workflows/publish-rust-crates.yml | 2 +- Cargo.lock | 1 - crates/bitwarden/Cargo.toml | 6 ++++-- crates/bitwarden/src/error.rs | 4 +++- crates/bitwarden/src/lib.rs | 16 ++++++++++++---- 5 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-rust-crates.yml b/.github/workflows/publish-rust-crates.yml index bdb39d9b7..ec9848127 100644 --- a/.github/workflows/publish-rust-crates.yml +++ b/.github/workflows/publish-rust-crates.yml @@ -72,7 +72,7 @@ jobs: env: PUBLISH_GRACE_SLEEP: 10 CARGO_REGISTRY_TOKEN: ${{ steps.retrieve-secrets.outputs.cratesio-api-token }} - run: cargo-release release publish --exclude bw --exclude bws --execute --no-confirm + run: cargo-release release publish --exclude bw --exclude bws --exclude bitwarden-fido --execute --no-confirm - name: Update deployment status to Success if: ${{ inputs.release_type != 'Dry Run' && success() }} diff --git a/Cargo.lock b/Cargo.lock index a1a9bcd23..9bfdbe70c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -367,7 +367,6 @@ dependencies = [ "bitwarden-core", "bitwarden-crypto", "bitwarden-exporters", - "bitwarden-fido", "bitwarden-generators", "bitwarden-send", "bitwarden-sm", diff --git a/crates/bitwarden/Cargo.toml b/crates/bitwarden/Cargo.toml index f927564cf..31d84b877 100644 --- a/crates/bitwarden/Cargo.toml +++ b/crates/bitwarden/Cargo.toml @@ -30,7 +30,8 @@ uniffi = [ "bitwarden-core/uniffi", "bitwarden-crypto/uniffi", "bitwarden-exporters/uniffi", - "bitwarden-fido/uniffi", + # PR #1072 + # "bitwarden-fido/uniffi", "bitwarden-generators/uniffi", "bitwarden-send/uniffi", "bitwarden-vault/uniffi", @@ -43,7 +44,8 @@ bitwarden-api-identity = { workspace = true } bitwarden-core = { workspace = true } bitwarden-crypto = { workspace = true } bitwarden-exporters = { workspace = true, optional = true } -bitwarden-fido = { workspace = true, optional = true } +# PR #1072 +# bitwarden-fido = { workspace = true, optional = true } bitwarden-generators = { workspace = true, optional = true } bitwarden-send = { workspace = true, optional = true } bitwarden-sm = { workspace = true, optional = true } diff --git a/crates/bitwarden/src/error.rs b/crates/bitwarden/src/error.rs index 06ef09648..a6f6c09de 100644 --- a/crates/bitwarden/src/error.rs +++ b/crates/bitwarden/src/error.rs @@ -37,6 +37,8 @@ pub enum Error { ExportError(#[from] ExportError), // Fido + /* + # PR #1072 #[cfg(all(feature = "uniffi", feature = "internal"))] #[error(transparent)] MakeCredential(#[from] bitwarden_fido::MakeCredentialError), @@ -57,7 +59,7 @@ pub enum Error { #[cfg(all(feature = "uniffi", feature = "internal"))] #[error(transparent)] Fido2Client(#[from] bitwarden_fido::Fido2ClientError), - + */ #[error("Internal error: {0}")] Internal(Cow<'static, str>), } diff --git a/crates/bitwarden/src/lib.rs b/crates/bitwarden/src/lib.rs index c87693ce7..5751c313b 100644 --- a/crates/bitwarden/src/lib.rs +++ b/crates/bitwarden/src/lib.rs @@ -79,10 +79,18 @@ pub mod internal { pub use bitwarden_vault::*; } - #[cfg(feature = "uniffi")] - pub mod fido { - pub use bitwarden_fido::*; - } + /* + PM-12431 + # PR #1072 + + Temporarily un-export bitwarden_fido, as bitwarden_fido + is not ready for release yet. This will unblock the + 1.0 releases. + */ + // #[cfg(feature = "uniffi")] + // pub mod fido { + // pub use bitwarden_fido::*; + // } } #[cfg(feature = "internal")] pub use internal::*;