Skip to content

Introduce ProjectType and SPM project detection#43

Merged
ericodx merged 11 commits into
mainfrom
spm-project-type-and-configuration
Mar 30, 2026
Merged

Introduce ProjectType and SPM project detection#43
ericodx merged 11 commits into
mainfrom
spm-project-type-and-configuration

Conversation

@ericodx
Copy link
Copy Markdown
Owner

@ericodx ericodx commented Mar 30, 2026

Summary

  • Introduces ProjectType enum (xcode(scheme:destination:) / spm) as the single source of truth for project kind throughout the pipeline
  • Replaces the loose scheme: String / destination: String fields in RunnerConfiguration.BuildOptions, DiscoveryInput, and RunnerInput with a single projectType: ProjectType value
  • ConfigurationResolver now auto-detects SPM projects: when neither --scheme nor --destination is provided and a Package.swift is found at the project path, it resolves to .spm
  • ProjectDetector and ConfigurationFileWriter updated with SPM awareness — init generates SPM-specific config when a Package.swift is detected
  • Xcode projects (XCTest and Swift Testing) continue to work exactly as before — this phase is purely additive

Type of Change

  • feat: A new feature has been added.
  • refactor: A code change that neither fixes a bug nor adds a feature.
  • test: Addition or correction of tests.

Invariants Checklist

  • Original project is never modified — all mutations happen inside an isolated sandbox
  • xcodebuild build-for-testing runs exactly once for all schematizable mutants
  • No mutant results are lost or duplicated
  • Mutant positions (file, line, column) are accurate in all reported results
  • A cancelled task never leaves a simulator slot permanently acquired from the pool
  • schematizedContent never contains the __swiftMutationTestingID global declaration
  • Swift 6 Strict Concurrency compatible
  • Pipeline stages remain stateless pure transformations

Pipeline Impact

  • BuildStage
  • IncompatibleMutantExecutor
  • CLI / Configuration
  • Models / RunnerInput contract

Testing

  • Unit tests added or updated
  • Tests use mock ProcessLaunching — no real xcodebuild, xcrun simctl, or xcresulttool
  • Tests use FileHelpers for any filesystem interaction (temp directories only)
  • All tests pass locally (swift test)

@ericodx ericodx self-assigned this Mar 30, 2026
@ericodx ericodx changed the title Spm project type and configuration feat: Phase 1 - introduce ProjectType and SPM project detection Mar 30, 2026
@ericodx ericodx added feature New feature or request refactor Code change that neither fixes a bug nor adds a feature test Addition or correction of tests labels Mar 30, 2026
@ericodx ericodx merged commit 1de25fa into main Mar 30, 2026
1 check passed
@ericodx ericodx deleted the spm-project-type-and-configuration branch March 30, 2026 20:41
@ericodx ericodx changed the title feat: Phase 1 - introduce ProjectType and SPM project detection Introduce ProjectType and SPM project detection Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request refactor Code change that neither fixes a bug nor adds a feature test Addition or correction of tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant