Skip to content

Fix minimal stdlib builds with noncopyable types #64622

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
merged 3 commits into from
Mar 28, 2023

Conversation

kavon
Copy link
Member

@kavon kavon commented Mar 24, 2023

This PR does a few things:

  1. give unofficial features in the area of noncopyable types their own feature flags, rather than piggybacking on MoveOnly.
  2. Add -enable-experimental-feature MoveOnly to the _Concurrency lib build and one test.

(2) is really just a temporary measure until toolchains and any other bespoke configurations catch up, since the stdlib is built with older compilers that expect the flag to be passed to it. I think after maybe a month of smooth sailing we can just revert the bits of (2)

resolves rdar://106849189

kavon added 3 commits March 24, 2023 15:43
I want to reserve Feature::MoveOnly only for move-only types and other
things that are part of SE-390. Other prototyped features like
noimplicitcopy and some older names for consume were left behind
as guarded by this Feature. That's really not the right way to do it,
as people will expect that the feature is enabled all the time, which
would put those unofficial features into on-by-default. So this change
introduces two new Features to guard those unofficial features.
We ran into an issue on minimal stdlib build configurations, because they
pull slightly older toolchains to build and test the stdlib. The noncopyable
`Job` type was adopted immediately after such types were enabled by default,
before the toolchain builds could catch up. Adding this flag to the build of
the `_Concurrency` lib should make things more robust when somewhat older
compilers are building this part of the stdlib.

part of resolving rdar://106849189
We ran into an issue on minimal stdlib build configurations, because they
pull slightly older toolchains to build and test the stdlib. Adding this flag
doesn't hurt anything and just ensures things will work with older compilers.
But it is not needed and should eventually be safe to remove.

part of resolving rdar://106849189
@kavon
Copy link
Member Author

kavon commented Mar 24, 2023

preset=stdlib_S_standalone_minimal_macho_x86_64,build,test
@swift-ci please clean test with toolchain and preset

@kavon
Copy link
Member Author

kavon commented Mar 25, 2023

@swift-ci please test

@kavon kavon force-pushed the bifurcate-moveonly-featureflag branch from 2186a9a to 27f13c3 Compare March 25, 2023 00:53
@kavon
Copy link
Member Author

kavon commented Mar 25, 2023

preset=stdlib_S_standalone_minimal_macho_x86_64,build,test
@swift-ci please clean test with toolchain and preset

@kavon kavon marked this pull request as ready for review March 27, 2023 17:24
@kavon kavon requested review from ktoso and removed request for xedin, slavapestov, rintaro, DougGregor, bnbarham, CodaFi, ahoppen and hborla March 27, 2023 17:25
@kavon
Copy link
Member Author

kavon commented Mar 27, 2023

@swift-ci please test

@kavon kavon force-pushed the bifurcate-moveonly-featureflag branch from 27f13c3 to 2be061c Compare March 28, 2023 18:21
@kavon
Copy link
Member Author

kavon commented Mar 28, 2023

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit 3be14e0 into swiftlang:main Mar 28, 2023
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