We are forced to do this due to an Xcode issue (#364) with underscored module names.
This module remains unstable, despite the removal of the underscore. Directly importing it from outside the package remains unsupported. This module and/or its entire contents may go away or change in incompatible ways in any future swift-collections release.
This is a temporary staging area for prototyping potential future stdlib additions.
(We do not expect to ship it in any tagged release of swift-collections.)
Our updated minimum toolchain requirement is Swift 5.7, and the stdlib in that version has the fix included.
We’ve seen reports that the bug may not deploy back in all cases to earlier OS releases, but it still seems worth trying to remove the workaround, as it has some undesirable runtime implications.
Swift 5.8 is out now, so let’s bump the minimum required toolchain to Swift 5.6. (The package wants to support three major language releases, and now that 5.8 is out, supporting 5.5 would bump that to four.)
- Sources/_CollectionsTestSupport → Tests/_CollectionsTestSupport
- Refactor Package.swift to allow switching between the default
polymodule and the new monomodule product configurations
(by editing the manifest file).
- Fix build errors in the monomodule variant.
These are disabled on the package manifest level.
To locally reenable them, Package.swift needs to be manually edited to enable COLLECTIONS_ENABLE_UNSTABLE_MODULES.
To mark a module as ready for production use, it has to be defined using `registerLibrary` instead of `registerUnstableLibrary`. This can only be done once the module has gone through API review. (Or if it becomes an underscored — i.e., explicitly unstable — module.)
These marker-like protocols will allow certain
generic operations to get a performance boost
if the passed-in value happens to be guaranteed
to contain unique elements or to be sorted.
Also, review API checker protocols for Sets and
sorted collections and adjust things as needed.
BitSet gains custom implementations for min()
and max() as part of these improvements.
It is not tenable to continue supporting ancient toolchains
indefinitely, as each supported toolchain version adds a nontrivial
amount of prerelease testing work. Additionally, working around
bugs in older toolchains that have been long since resolved is not a
productive use of anyone’s time.
Users who are stuck on older toolchains are of course welcome to
continue using the last package release that supports their
platform. (And they may continue to receive bug fix updates, as
we can always tag new bugfix releases on older minor release
branches.)