-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[ABI] Introduce an ABI checker that diffs symbols #69765
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
Conversation
@swift-ci please smoke test |
8c23827
to
6227a2f
Compare
@swift-ci please smoke test |
@swift-ci please test |
preset=buildbot_incremental,tools=RA,stdlib=RD,build |
Yes please! This is looking good 👍 |
@swift-ci please smoke test |
@swift-ci please smoke test |
@swift-ci please smoke test macOS |
@swift-ci please smoke test macOS |
Ok, this finally has caught the changes I proposed here. Now that we know this can catch these changes, I'm going to edit the exception list to be made aware of those changes. If that passes I will remove the ABI changes and remove the exceptions and commit. |
@swift-ci please smoke test macOS |
|
@swift-ci please test |
NOTE: This is still a draft, but I didn't want to mark the pull request as such because I wanted it to ping the stdlib reviewers. DO NOT MERGE YET.
This adds two new tests cases that takes a baseline macOS arm64/x86_64 stdlib release no assert symbols and diffs them against the just built stdlib's symbols. If there are additions or removals of symbols it will be caught here (unless symbols were modified on different platforms, archs, or configurations that I haven't created a baseline for yet).
To test that this works, I've added a new API with availability and removed an old legacy ABI symbol to exercise that the test will fail. Once the test fails, I will update the test case with the expected changes and rerun tests. Once the test (hopefully) passes with the expected changes, I'll remove the new API and uncomment the legacy API and just have the tests and baselines added.
One caveat that I think we should fix is that you can build multiple variations of the stdlib on one machine. For example, on macOS you can build both a x86_64 and arm64 stdlib on Apple Silicon, but there are no features indicating that we have both of those configurations available. With that in mind, these tests would fail on build-script invocations that are cross compiling for architectures other than the one your host is on. So it will probably require some testing changes to include such feature before being merged.
It might be easier for maintainability if the script to diff the symbols was in something more portable like a python script than shell scripts.