File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -107,12 +107,14 @@ func listTestsForSwiftPM(_ tests: some Sequence<Test>) -> [String] {
107
107
// Group tests by the name components of the tests' IDs. If the name
108
108
// components of two tests' IDs are ambiguous, present their source locations
109
109
// to disambiguate.
110
- return Dictionary (
110
+ let initialGroups = Dictionary (
111
111
grouping: tests. lazy. map ( \. id) ,
112
112
by: \. nameComponents
113
113
) . values. lazy
114
114
. map { ( $0, isAmbiguous: $0. count > 1 ) }
115
- . flatMap { testIDs, isAmbiguous in
115
+
116
+ // This operation is split to improve type-checking performance.
117
+ return initialGroups. flatMap { testIDs, isAmbiguous in
116
118
testIDs. lazy
117
119
. map { testID in
118
120
if !isAmbiguous, testID. sourceLocation != nil {
You can’t perform that action at this time.
0 commit comments