Commit a03f5ec
authored
This reverts the change recently made in #1644. It ended up causing slow
type-checking of certain complex expressions passed to `#expect`, such
as [this
one](https://github.com/swiftlang/swift-build/blob/48e5c4ff4f37aa6ce2c85b5ff1e8600fe809b722/Tests/SWBBuildSystemTests/BuildTaskBehaviorTests.swift#L1079)
in particular in the swift-build project:
```swift
#expect(output.unsafeStringValue.split(separator: "\n").map({ $0.split("=").0 }).sorted().filter { $0 != "VCToolsInstallDir" && !$0.hasPrefix("ANDROID_") && !$0.hasPrefix("QNX_") } == [
"LLBUILD_BUILD_ID", "LLBUILD_CONTROL_FD", "LLBUILD_LANE_ID", "LLBUILD_TASK_ID"
])
```
It appears the new `__checkBinaryOperation()` overload added in that PR
caused type-checking to become more complex and slower for complex
expressions such as this. It may be possible to implement an alternate
approach for this which checks the type at runtime only, to avoid
needing an additional overload.
Related to: rdar://173002947
### Checklist:
- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
1 parent 99dc231 commit a03f5ec
2 files changed
Lines changed: 0 additions & 48 deletions
File tree
- Sources/Testing/Expectations
- Tests/TestingTests
Lines changed: 0 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | 667 | | |
696 | 668 | | |
697 | 669 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1288 | 1288 | | |
1289 | 1289 | | |
1290 | 1290 | | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
1294 | | - | |
1295 | | - | |
1296 | | - | |
1297 | | - | |
1298 | | - | |
1299 | | - | |
1300 | | - | |
1301 | | - | |
1302 | | - | |
1303 | | - | |
1304 | | - | |
1305 | | - | |
1306 | | - | |
1307 | | - | |
1308 | | - | |
1309 | | - | |
1310 | | - | |
1311 | 1291 | | |
1312 | 1292 | | |
1313 | 1293 | | |
| |||
0 commit comments