[PM-37746] Add fallback to local sdk package#2665
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2665 +/- ##
==========================================
- Coverage 87.83% 86.88% -0.95%
==========================================
Files 1707 1891 +184
Lines 165908 179009 +13101
==========================================
+ Hits 145728 155536 +9808
- Misses 20180 23473 +3293 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
8540b1a to
9474709
Compare
| if [ -z "$BITWARDEN_SDK_PATH" ]; then | ||
| # Last resort: local sdk-internal checkout at the well-known sibling path. | ||
| # SRCROOT is set by Xcode in build phases; derive from script location for standalone runs. | ||
| _script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| _repo_root="$(dirname "$_script_dir")" | ||
| _local_sdk_path="${SRCROOT:-$_repo_root}/../sdk-internal/crates/bitwarden-uniffi/swift" | ||
| if [ -d "$_local_sdk_path" ]; then | ||
| BITWARDEN_SDK_PATH="$(cd "$_local_sdk_path" && pwd)" | ||
| fi | ||
| fi |
There was a problem hiding this comment.
🤔 Is this needed? I mean wouldn't this end up being the exact same as the BITWARDEN_SDK_PATH path passed in local-idk.yml -> settings? Or which potential path case would this cover?
There was a problem hiding this comment.
Nice catch! You're right, lines 61-69 can be removed. Thank you
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR adds a fallback for Code Review DetailsNo actionable findings. The |
| if [ -z "$BITWARDEN_SDK_PATH" ]; then | ||
| echo "error: Could not locate sdk-swift checkout under SourcePackages/ — ensure SPM packages are resolved before running Sourcery." | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
⛏️ I think this error message should be updated as SourcePackages/ path is only for non-local flow.
🎟️ Tracking
PM-37746
📔 Objective
Fall back to a local sdk-internal checkout and locally built sdk package when "LOCAL_SDK=true bootstrap".
📸 Screenshots