Skip to content

Conversation

@lorentey
Copy link
Member

[This is an updated version of #522, with the source branch within the same repository.]

  • Review RigidArray, UniqueArray APIs; split implementation into multiple files
  • Set the availability of these new types to match the Swift 5.0-aligned OS releases. (We can loosen this later, but we want to use spans in the implementation of most nontrivial operations, and spans are only available from >=5.0 runtimes.)
  • Use consistent indentation & add file headers in TrailingElementsModule
  • Disable UnstableContainersPreview package trait while we're debugging a runtime crash
  • Rename struct Borrow to struct Ref, and struct Inout to struct Mut.

This also includes #520, in order to (potentially) speed up validation work.

Checklist

  • I've read the Contribution Guidelines
  • My contributions are licensed under the Swift license.
  • I've followed the coding style of the rest of the project.
  • I've added tests covering all new code paths my change adds to the project (if appropriate).
  • I've added benchmarks covering new functionality (if appropriate).
  • I've verified that my change does not break any existing tests or introduce unexplained benchmark regressions.
  • I've updated the documentation if necessary.

Azoy and others added 9 commits September 24, 2025 23:21
- Set availability to match Span availability
- Split implementation into multiple source files
- Add OutputSpan-based primitives that can be the bases of all append/insertion/replaceSubrange variants
- Add the ability to consume a subrange of items using an InputSpan
- Add bulk copying operations generic over the new Container protocol
@lorentey
Copy link
Member Author

CI issues:

  • The Xcode 26.0 job is unable to run our tests as SwiftPM is unable to load libswiftCompatibilitySpan.dylib.
  • Something somewhere requires a successful run with Xcode 16.2, but that appears to be not available for CI testing.

@lorentey lorentey mentioned this pull request Sep 27, 2025
7 tasks
…rwin OS releases

References to Span types trigger an issue where SwiftPM isn’t able to run command line executable targets or tests on older OSes.

Set the availability of everything that needs span types to the most recent Apple OS releases.

Hopefully we’ll be able to revert this once we figure out a better workaround.
We are not reexporting this from the top-level `Collections` module.
SwiftPM’s command line test runner is unable to load the Span backdeployment library (libswiftCompatibilitySpan.dylib) when trying to execute tests for the new modules (BasicContainers, ContainersPreview and TrailingElementsModule) on older macOS releases.

I see no obvious way to work around this.
@lorentey lorentey merged commit de074f2 into main Sep 27, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants