Skip to content

Commit b0c950d

Browse files
authored
Ensure we can always build bitwarden-sm (#333)
We need to ensure `bitwarden-sm` is always buildable to avoid breaking sdk-sm.
1 parent 025f818 commit b0c950d

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.github/workflows/build-rust-crates.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
env:
1111
CARGO_TERM_COLOR: always
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
build:
1518
name: Building ${{matrix.package}} for - ${{ matrix.os }}
@@ -27,8 +30,10 @@ jobs:
2730
package:
2831
- bitwarden-api-api
2932
- bitwarden-api-identity
33+
- bitwarden-core
3034
- bitwarden-crypto
3135
- bitwarden-generators
36+
- bitwarden-sm
3237

3338
steps:
3439
- name: Checkout

crates/bitwarden-core/src/client/internal.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ use bitwarden_state::registry::StateRegistry;
1010
use chrono::Utc;
1111
use uuid::Uuid;
1212

13-
use super::encryption_settings::EncryptionSettings;
13+
#[cfg(any(feature = "internal", feature = "secrets"))]
14+
use crate::client::encryption_settings::EncryptionSettings;
1415
#[cfg(feature = "secrets")]
15-
use super::login_method::ServiceAccountLoginMethod;
16+
use crate::client::login_method::ServiceAccountLoginMethod;
1617
use crate::{
1718
auth::renew::renew_token, client::login_method::LoginMethod, error::UserIdAlreadySetError,
1819
key_management::KeyIds, DeviceType,

crates/bitwarden-core/src/key_management/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
//! [Encryptable](bitwarden_crypto::Encryptable) and [Decryptable](bitwarden_crypto::Encryptable).
1010
use bitwarden_crypto::{key_ids, KeyStore, SymmetricCryptoKey};
1111

12+
#[cfg(feature = "internal")]
1213
pub mod crypto;
14+
#[cfg(feature = "internal")]
1315
mod crypto_client;
14-
16+
#[cfg(feature = "internal")]
1517
pub use crypto_client::CryptoClient;
1618

1719
key_ids! {

0 commit comments

Comments
 (0)