-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[5.1 08-28-2019] Cherry-picking recent Swift framework ABI checker enhancements #27011
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
nkcsgexi
merged 31 commits into
swiftlang:swift-5.1-branch-08-28-2019
from
nkcsgexi:abi-checker-cherry-pick-08-28-19
Sep 6, 2019
Merged
[5.1 08-28-2019] Cherry-picking recent Swift framework ABI checker enhancements #27011
nkcsgexi
merged 31 commits into
swiftlang:swift-5.1-branch-08-28-2019
from
nkcsgexi:abi-checker-cherry-pick-08-28-19
Sep 6, 2019
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There could be cases where several modules having types of the same name. Using fully qualified names could help us detect changing from using one of them to another. The commit also updates the existing ABI/API baselines to incorporate such change.
…es separated by modules
…ift overlay in SDKs
…g Swift frameworks
…modules This patch also adds fixed-swift-modules to hard-code CreateML, which could not be found in the regular framework search path.
…xtensions themselves "Extension A has been removed" isn't very informative, we should emit diagnostics for each members in the extension.
…ping framework content
…agnosing module difference This change introduces a Json format change where we always print fully qualified type names everywhere. This is beneficial for diagnosing purposes but may not be ideal for generating migrator scripts. To resolve this conflict, the patch also introduces a flag -migrator to opt-out fully qualified type names. After the format change, we need to update the ABI and API baselines for the Swift stdlib.
… prefer to loading via interfaces ABI checker imports Swift frameworks by using Swift interfaces for various reasons. The existing way of controlling preferred importing mechanism is by setting an environment variable (SWIFT_FORCE_MODULE_LOADING), which may lead to performance issues because the stdlib could also be loaded in this way. This patch adds a new front-end option to specify module names for which we prefer to importing via Swift interface. The option currently is only accessible via swift-api-digester. rdar://54559888
…inary.swift Under `-enable-library-evolution`, a slight AST difference is still found when importing from .swiftinterface and from .swiftmodule. The difference is whether @objc attribute is inherited by a Swift class subclassing an Objc class.
rdar://54797695
Framework authors usually have different schemes for different deployment targets. We should exclude platform-unavailable ABIs from the Json file so developers will only be warned of the breakages that are relevant to the current scheme. rdar://54273296
ABI/API checker should check semantic differences of two modules. Adhering too strictly to the actual ASTs could yield false positives. This patch populates ObjC, Dynamic and Final to the attribute list if AST APIs say so. rdar://50217247
…seline for a single module This allows us to generate baselines for the Swift stdlib using an Xcode release.
When running the ABI checker from the build artifact, the executable should be able to find baselines in the same relative paths as if it's running from a toolchain.
…specific baselines from relative path""
…for ABI baselines In case we need to also include framework API baselines in the future, we should have an additional layer of directory for ABI baseline files.
@swift-ci please test |
akyrtzi
approved these changes
Sep 4, 2019
…derBase to ParseableInterfaceModuleLoader, NFC We shouldn't over-expose this field since only ParseableInterfaceModuleLoader is using it.
…aseline Framework authors may be interested in comparing the current framework build against an empty baseline to find public APIs without @available attributes. This change makes such exercise easier.
@swift-ci please test |
Build failed |
Build failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Explanation: Cherry-picking recent Swift ABI checker changes into the submission branch. The changes are mostly in three parts: (1) submitting known Swift framework baselines into the toolchain, (2) submitting workflow enhancements python scripts into the toolchain, and (3) fixing issues reported by adopting Swift framework authors.
Scope: These are only enhancements to swift-api-digester and the tool's driving python scripts.
Issue: rdar://54309029, rdar://50217247, rdar://54273296, rdar://54797695, and rdar://54559888
Risk: Very Low since the changes are of no direct impacts on end users
Testing: local testing; unit testing; CI testing
Reviewed by: @akyrtzi