Skip to content

[NoncopyableGenerics] provide stdlib build option #69402

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 1 commit into from
Oct 25, 2023

Conversation

kavon
Copy link
Member

@kavon kavon commented Oct 25, 2023

This helps set the stage for getting the stdlib building correctly with NoncopyableGenerics enabled. Disabled by default for now so this is an NFC.

The new build-script flag is --swift-stdlib-experimental-noncopyable-generics=1

This helps set the stage for getting the stdlib building
correctly with `NoncopyableGenerics` enabled. Disabled by
default for now so this is an NFC.
@kavon kavon requested a review from a team as a code owner October 25, 2023 16:30
@kavon
Copy link
Member Author

kavon commented Oct 25, 2023

@swift-ci please smoke test

@Azoy
Copy link
Contributor

Azoy commented Oct 25, 2023

is there any harm with just unconditionally setting this flag for the standard libraries now?

@kavon
Copy link
Member Author

kavon commented Oct 25, 2023

Right now I think we can't enable it by default because:

  1. it pollutes the stdlib with Copyable conformances on every type and type parameter. the plan is for these to be hidden/flipped around so that we only emit ~Copyable's when Copyable is not present.
  2. Right now NoncopyableGenerics requires asserts builds since it's still listed as an "Experimental" flag that is not available in production builds.
  3. In addition, there appears to be some small general bugs just building with this flag on now that I will address shortly (either in this PR or another one)

Once I address these issues I think we'll turn this on by default.

@kavon kavon merged commit 5b23b23 into swiftlang:main Oct 25, 2023
@kavon kavon deleted the noncopyable-generics-stdlib branch October 25, 2023 23:32
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