Skip to content

Use new noncopyable types infrastructure #72276

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 16, 2024
Merged

Conversation

kavon
Copy link
Member

@kavon kavon commented Mar 12, 2024

depends on swiftlang/llvm-project#8384

This PR switches the compiler over to use the infrastructure underpinning NoncopyableGenerics, without actually enabling that experimental feature. This means the compiler can take advantage of the newer, better diagnostics that are now the same whether you enable the feature or not. Overall this is meant to be an NFC.

As a result of using the new infrastructure, it's possible to remove a bunch of old scaffolding code that was used either for the old or new infrastructure. For example, we no longer need a special flag in the control block of the swiftmodule to indicate whether it was compiled with NoncopyableGenerics infrastructure, since it's just always used as of this new module version.

@kavon kavon force-pushed the ncgenerics-xfails-3 branch from 71b256d to 583fc22 Compare March 12, 2024 22:55
@kavon
Copy link
Member Author

kavon commented Mar 12, 2024

@swift-ci smoke test

@kavon kavon force-pushed the ncgenerics-xfails-3 branch 2 times, most recently from 43a41d0 to 6151882 Compare March 13, 2024 00:34
@kavon
Copy link
Member Author

kavon commented Mar 13, 2024

swiftlang/llvm-project#8384
@swift-ci smoke test

@kavon kavon force-pushed the ncgenerics-xfails-3 branch from 6151882 to dcd7b02 Compare March 13, 2024 01:53
@kavon
Copy link
Member Author

kavon commented Mar 13, 2024

swiftlang/llvm-project#8384
@swift-ci smoke test

1 similar comment
@kavon
Copy link
Member Author

kavon commented Mar 13, 2024

swiftlang/llvm-project#8384
@swift-ci smoke test

@kavon
Copy link
Member Author

kavon commented Mar 14, 2024

@kavon
Copy link
Member Author

kavon commented Mar 14, 2024

swiftlang/llvm-project#8384
@swift-ci smoke test

1 similar comment
@kavon
Copy link
Member Author

kavon commented Mar 14, 2024

swiftlang/llvm-project#8384
@swift-ci smoke test

kavon added 16 commits March 14, 2024 23:10
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.
It's not currently clear whether this is a regression or just a test
that needs updating. Investigation is needed.
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.
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.
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.
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.
After removing the implicit conditional conformance synthesis for
inverses, this test wasn't updated.
@kavon kavon force-pushed the ncgenerics-xfails-3 branch from c1f1edc to ca25edb Compare March 15, 2024 06:10
@kavon
Copy link
Member Author

kavon commented Mar 15, 2024

swiftlang/llvm-project#8384
@swift-ci smoke test

@kavon kavon requested review from mikeash and al45tair as code owners March 15, 2024 07:49
@kavon
Copy link
Member Author

kavon commented Mar 15, 2024

swiftlang/llvm-project#8384
@swift-ci smoke test

@lorentey
Copy link
Member

swiftlang/llvm-project#8384
@swift-ci smoke test macOS platform

@kavon kavon force-pushed the ncgenerics-xfails-3 branch from a554dfc to ca25edb Compare March 15, 2024 16:12
@kavon
Copy link
Member Author

kavon commented Mar 15, 2024

swiftlang/llvm-project#8384
@swift-ci smoke test macOS platform

@kavon
Copy link
Member Author

kavon commented Mar 15, 2024

swiftlang/llvm-project#8384
@swift-ci smoke test linux

@kavon
Copy link
Member Author

kavon commented Mar 15, 2024

swiftlang/llvm-project#8384
@swift-ci smoke test windows

@kavon kavon merged commit 76c6510 into swiftlang:main Mar 16, 2024
@kavon kavon deleted the ncgenerics-xfails-3 branch March 18, 2024 21:02
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.

2 participants