Skip to content

Conversation

Hinton
Copy link
Member

@Hinton Hinton commented Oct 16, 2025

🎟️ Tracking

📔 Objective

Fix compile error after merge of #471

⏰ 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

@Hinton Hinton requested review from a team as code owners October 16, 2025 18:51
@Hinton Hinton requested a review from nikwithak October 16, 2025 18:51
@Hinton Hinton enabled auto-merge (squash) October 16, 2025 18:51
Copy link

claude bot commented Oct 16, 2025

Claude finished @Hinton's task —— View job


Code Review Complete ✓

Summary of Changes

This PR fixes two compile errors introduced by PR #471 (which added Bitwarden-Client-Name and Bitwarden-Client-Version headers):

  1. Fixed enum variant name collision in SyncError enum (line 30)
  2. Added missing field bitwarden_client_version in test setup (line 258)

Critical Issues

None found. The fixes are correct and necessary.


Code Quality Assessment

✓ Good Practices Observed

  • Minimal, targeted fix that addresses only the compile errors
  • Enum variant name now follows Rust naming conventions consistently
  • Test code properly updated to match API changes

Detailed Analysis

1. Enum Variant Name Fix (Line 30)

Change:

// Before (incorrect - redundant naming)
NotAuthenticatedError(#[from] NotAuthenticatedError),

// After (correct)
NotAuthenticated(#[from] NotAuthenticatedError),

Analysis:

  • The variant name NotAuthenticatedError was redundant since it wraps the NotAuthenticatedError type
  • The fix follows Rust conventions where enum variants don't repeat the wrapped type's suffix
  • Consistent with other variants in the enum (e.g., VaultParse wraps VaultParseError)
  • This was likely a compile error due to naming collision or inconsistency introduced by changes in PR Add headers Client-Name and Client-Version #471

Impact: None on functionality, purely a naming/compilation fix.

2. Test Setup Field Addition (Line 258)

Change:

Client::new(Some(ClientSettings {
    identity_url: api_config.base_path.clone(),
    api_url: api_config.base_path,
    user_agent: api_config.user_agent.unwrap(),
    device_type: DeviceType::SDK,
    bitwarden_client_version: None,  // ← Added this field
}))

Analysis:

Impact: Allows tests to compile and run correctly with the updated ClientSettings structure.


Suggestions

No changes needed. This is a straightforward compilation fix.


Action Items

  • ✅ Merge when CI passes

Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Detailsd2895bd2-97bc-4de4-afd5-66fda334d64a

Great job! No new security vulnerabilities introduced in this pull request

Copy link

Copy link

codecov bot commented Oct 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.34%. Comparing base (fc75b90) to head (3b6ea0e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #515      +/-   ##
==========================================
- Coverage   78.40%   78.34%   -0.06%     
==========================================
  Files         287      287              
  Lines       28057    28092      +35     
==========================================
+ Hits        21998    22010      +12     
- Misses       6059     6082      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Hinton Hinton merged commit 68a44bf into main Oct 16, 2025
52 checks passed
@Hinton Hinton deleted the compile-error branch October 16, 2025 19:05
bw-ghapp bot pushed a commit to bitwarden/sdk-swift that referenced this pull request Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants