apple / apple/swift-binary-parsing

error: no such module 'XCTest'

Open
#43 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
387
Forks
24
Avg merge
1h 3m
Merged PRs (30d)
2

Description

Hi, Was looking into this library for a project and got some errors running the tests locally.

### Steps to Reproduce
```
git clone https://github.com/apple/swift-binary-parsing
git checkout 0.0.1
swift test
```

```
macOS: 26.1 (25B78)

swift --version
Apple Swift version 6.2.1 (swift-6.2.1-RELEASE)
Target: arm64-apple-macosx26.0
Build config: +assertions
```

### Expected behavior
Passing tests for release branch.

### Actual behavior
```
swift-snapshot-testing/Sources/SnapshotTesting/AssertSnapshot.swift:1:8: error: no such module 'XCTest'
1 | import XCTest
| `- error: no such module 'XCTest'
2 |
3 | #if canImport(Testing)
```

Thanks,
Zane

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure by checking out tag 0.0.1 and running swift test. Start with the XCTest import error in swift-snapshot-testing/Sources/SnapshotTesting/AssertSnapshot.swift, then trace why XCTest is unavailable for this test setup. Done means the release branch tests pass on the reported Swift and macOS environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.