-
Notifications
You must be signed in to change notification settings - Fork 359
First round of noncopyable constructs: Box, RigidArray, DynamicArray
#508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Update minimum toolchain version to Swift 6.0. - Add a separate package manifest for Swift 6.2+. - Upgrade to Swift 6 language mode. - Except in _RopeModule, which has uncovered a language-mode related regression in debug builds. - Define availability macros. - Enable the Builtin module. - For the 6.2+ manifest: - Add a new package trait called “UnstableContainersPreview”. This is not yet functional. - Enable experimental language features `Lifetimes` and `InoutLifetimeDependence`. - Stop supporting COLLECTIONS_SINGLE_MODULE in package builds. - Update CMake & Xcode configurations to also assume Swift 6.2, reflecting the changes above.
This is just slapping `nonisolated(unsafe)` on global variables in the test suite. Our tests do not support concurrent execution.
In preparation of adding the public, noncopyable Box type
…ferPointer extensions
These are precursors for container protocols, referenced by the new array tests
Member
Author
|
@swift-ci test |
a04551c to
721cf95
Compare
Our current 6.2 development snapshots are wildly out of date and do not have OutputSpan yet.
0e7db11 to
66c4937
Compare
Member
Author
|
@swift-ci test |
Member
Author
|
😞 |
Member
Author
|
@swift-ci test |
Avoid using `@inlinable @_transparent` — the `@_transparent` attribute already implies inlinability, although evidently without the `@usableFromInline` parts. (`internal @_transparent` functions aren’t allowed to be called from inlinable functions.) `@usableFromInline @_transparent` or `@_alwaysEmitIntoClient @_transparent` expresses the author’s intention better, making the choice of exposing a symbol explicit.
Azoy
approved these changes
Aug 26, 2025
I’m not convinced this has a real effect, but.
2aec2d5 to
5cd5197
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This bumps the minimum required toolchain to Swift 6.0, and adds two new modules:
ArrayModuleandContainersPreview, and a (for now, dormant) new package traitUnstableContainersPreview, to enable source-unstable prototypes.ArrayModulewill ship preview versions of new, noncopyable array variants. We currently have two of these:RigidArrayandDynamicArray. Both are noncopyable, resizable array types with heap-allocated storage.DynamicArrayimplements dynamic storage resizing, whileRigidArrayrequires manual capacity management, and in exchange it provides more predictable runtime performance and memory use.ContainerPreviewwill ship source-unstable previews of new container protocols, providing a noncopyable/nonescapable-aware rethinking of Collection, focusing on predictably high performance. Initially, this is populated with the (planned to be source-stable)struct Box, a simple noncopyable, heap-allocated wrapper.Checklist