Skip to content

[6.0🍒] Use new noncopyable infrastructure #72377

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 29 commits into from
Mar 17, 2024

Conversation

kavon
Copy link
Member

@kavon kavon commented Mar 16, 2024

cherry-pick of #72276 that just missed the creation of the 6.0 branch.

relies on friend PR swiftlang/llvm-project#8420

kavon added 29 commits March 16, 2024 09:15
We don't support nested types in methods of generic types, so the new
error popping up about `A` being noncopyable is not too surprising,
but also not the point of this test anyway.

(cherry picked from commit 8f2ed59)
The infrastructure underpinning the new feature NoncopyableGenerics is
mature enough to be used.

(cherry picked from commit 149c052)
(cherry picked from commit 2a51f10)
Reabstraction thunks mangle generic signatures and are now including
inverse requirements (i.e., suppressions). Since these symbols are
always `shared`, they're not ABI so it's OK that they're now different,
to distinguish them from thunks with signatures that lack the inverses.

(cherry picked from commit 69e8263)
We are suppose to be able to query whether a type is Escapable or not at
runtime, in order to handle plain extensions of conditionally-Escapable
types, which are implicitly like this:

```
struct S<T: ~Escapable>: ~Escapable {}
extension S: Escapable where T: Escapable {}

extension S: P where T: Escapable {} // <- requires runtime information
```

While that's not yet implemented, it eventually will be once
NonescapableTypes matures.

(cherry picked from commit 8a13ced)
These tests of the type system are being updated because of the new
presence of Copyable and Escapable conformances & conformance
requirements.

(cherry picked from commit 102ccbc)
The test was relying on UnsafeMutablePointer (UMP) not having a Copyable
 requirement. Those Copyable requirements are more prominent when using
the new infrastructure for noncopyable types. Since UMP is planned to
have `~Copyable` on its generic parameter quite soon, this shouldn't
remain broken for too long.

(cherry picked from commit 2951162)
It's not currently clear whether this is a regression or just a test
that needs updating. Investigation is needed.

(cherry picked from commit 9ae263c)
It's not currently clear whether this is a regression or just a test
that needs updating. For now it seems harmless to just update the test
rather than disable it.

(cherry picked from commit d73dfe9)
(cherry picked from commit 8f97b7f)
This test is failing to verify the generic signature for this bogus
 program, because the generic signature isn't minimal. We should
 gracefully handle this situation and still have a minimal signature,
 despite rejecting this program.

(cherry picked from commit 53fb8c3)
The presence of Copyable/Escapable conformances doesn't affect ABI. Only
their absence in terms of suppressed requirements like `~Copyable` need
to be output for diffing by the APIDigester.

(cherry picked from commit 3b02f30)
This appears to be a code path that wasn't previously stressed when
deserializing a bogus module, but now it is with NoncopyableGenerics, as
Copyable is often emitted as a builtin conformance.

(cherry picked from commit b40611f)
After removing the implicit conditional conformance synthesis for
inverses, this test wasn't updated.

(cherry picked from commit f18c7f9)
(cherry picked from commit ca25edb)
(cherry picked from commit b5840cf)
@kavon kavon requested a review from adrian-prantl as a code owner March 16, 2024 16:19
@kavon
Copy link
Member Author

kavon commented Mar 16, 2024

@kavon kavon merged commit 9647cdd into swiftlang:release/6.0 Mar 17, 2024
@kavon kavon deleted the 6.0-enable-noncopyable-infra branch April 1, 2024 22:20
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