Skip to content

refactor(cli): split install selection and manifest resolution helpers#52

Merged
peters merged 2 commits intomainfrom
refactor/install-phase-1
Apr 9, 2026
Merged

refactor(cli): split install selection and manifest resolution helpers#52
peters merged 2 commits intomainfrom
refactor/install-phase-1

Conversation

@peters
Copy link
Copy Markdown
Contributor

@peters peters commented Apr 9, 2026

What changed

  • convert the surge install command implementation from a single install.rs file into an install/ module tree
  • move install target and channel selection logic into crates/surge-cli/src/commands/install/selection.rs
  • move install manifest and storage-resolution helpers into crates/surge-cli/src/commands/install/resolution.rs
  • keep execute and the local/remote install execution flow in install/mod.rs so this phase only extracts early-resolution logic
  • update the maintainability baseline entry from install.rs to install/mod.rs with the reduced production-line count

Why

crates/surge-cli/src/commands/install.rs had become the largest file in the workspace and mixed interactive selection, manifest/storage resolution, and install execution in one module. This phase peels off the low-risk helper surfaces first so later install refactors can work against a smaller orchestration root.

Impact

  • no intended CLI behavior change
  • existing install tests continue to target the same helper behavior, but now through focused internal modules
  • the maintainability guardrail now tracks the new install/mod.rs path instead of the removed flat file

Validation

  • git submodule update --init --recursive
  • ./scripts/sync-surge-core-vendor.sh --check
  • ./scripts/check-version-sync.sh
  • cargo fmt --all -- --check
  • ./scripts/check-maintainability.sh
  • cargo test -p surge-cli commands::install::tests::
  • cargo check -p surge-cli
  • RUSTFLAGS="-D warnings" cargo test --workspace
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo clippy --workspace --lib --bins --examples -- -D warnings -D clippy::unwrap_used -D clippy::expect_used
  • cargo clippy --workspace --all-targets --all-features -- -D warnings -W clippy::pedantic
  • dotnet format dotnet/Surge.slnx --verify-no-changes
  • dotnet test dotnet/Surge.slnx --configuration Release

@peters peters marked this pull request as ready for review April 9, 2026 11:03
@peters peters merged commit fa57a36 into main Apr 9, 2026
12 checks passed
@peters peters deleted the refactor/install-phase-1 branch April 9, 2026 11:03
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.

1 participant