You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [Collections] Disable target trie in some of the tests
Motivation:
Some of the package collection tests don't require search and finish quickly, so when background thread tries to `populateTargetTrie` it results in signal 4.
For [example](#3623 (comment)):
```
10:23:08 Test Suite 'PackageCollectionsTests' started at 2021-07-20 10:21:53.935
10:23:08 Test Case '-[PackageCollectionsTests.PackageCollectionsTests testCollectionPendingTrustConfirmIsKeptOnAdd]' started.
10:23:08 Test Case '-[PackageCollectionsTests.PackageCollectionsTests testCollectionPendingTrustConfirmIsKeptOnAdd]' passed (0.105 seconds).
10:23:08 Exited with signal code 4
```
Modifications:
Set `initializeTargetTrie` to `false` for these tests such that `populateTargetTrie` is not called.
* [Collections] Don't queue populateTargetTrie if there is no data
Motivation:
`populateTargetTrie`, potentially because it's done in a background queue, causes a lot of random crashes in tests (not just in SwiftPM but other projects as well). The exception happens inside SQLite C library and it's not yet clear what the real cause is. However, since most tests do not use the package collections feature at all, `populateTargetTrie` is basically a no-op and therefore doesn't need to be queued.
Modification:
Queue `populateTargetTrie` only if there is package collection data.
This code change doesn't actually fix anything but may perhaps reduce the chance of crashing.
rdar://80840989
0 commit comments