Skip to content

[docs] Describe how _alwaysEmitIntoClient relates to library evolution. #38814

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
Sep 1, 2021

Conversation

varungandhi-apple
Copy link
Contributor

I also removed an admonition for stabilizing AEIC; I don't think these docs are the right place for that.

I will file separate tickets for tracking stabilization and desired changes to AEIC.

- Adding ``@_alwaysEmitIntoClient`` to a declaration breaks ABI but is a
source-compatible change.
- Removing ``@_alwaysEmitIntoClient`` from a declaration is a
binary-compatible and source-compatible change.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might modify this last point to something like:

- Removing ``@_alwaysEmitIntoClient`` from a declaration is a
   binary-compatible and source-compatible change, but its
   availability cannot be backdated earlier than the removal of
   the attribute.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized, if the availability needs to be updated, then it does create a source break, right? Consider:

  • A framework has @available(macOS 10.15, *) @_alwaysEmitIntoClient public func f in Xcode 11.0.
  • App A compiles against Xcode 11.0 fine with minimum deployment target macOS 10.15 and uses f without issues.
  • The framework removes the @_alwaysEmitIntoClient in Xcode 12.0, and the availability is updated to
    @available(macOS 11.0, *) (because the symbol isn't available on macOS 10.15 in the framework).
  • If App A tries to compile against the new SDK while maintaining macOS 10.15 as the deployment target, it will fail to compile.

@varungandhi-apple varungandhi-apple force-pushed the vg-aeic-lib-evo branch 2 times, most recently from e5b6f61 to 299f1df Compare August 20, 2021 23:22
@varungandhi-apple
Copy link
Contributor Author

@swift-ci smoke test and merge

2 similar comments
@varungandhi-apple
Copy link
Contributor Author

@swift-ci smoke test and merge

@varungandhi-apple
Copy link
Contributor Author

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit e4f0815 into swiftlang:main Sep 1, 2021
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.

4 participants