Skip to content

Commit

Permalink
[PM-12431] Temporarily un-export bitwarden_fido (#1072)
Browse files Browse the repository at this point in the history
## 🎟️ 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

<!-- Suggested interactions but feel free to use (or not) as you desire!
-->

- 👍 (`:+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
  • Loading branch information
coltonhurst authored Sep 26, 2024
1 parent 4d5b713 commit 73d3ce8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-rust-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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() }}
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions crates/bitwarden/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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 }
Expand Down
4 changes: 3 additions & 1 deletion crates/bitwarden/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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>),
}
Expand Down
16 changes: 12 additions & 4 deletions crates/bitwarden/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down

0 comments on commit 73d3ce8

Please sign in to comment.