Skip to content

[4.2 EARLY] [Serialization] Always list the bridging header before any imports #17300

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

jrose-apple
Copy link
Contributor

  • Explanation: When debugging, we want to mimic the compilation environment as closely as possible so that Objective-C declarations are imported the same way. In cases where non-modular headers were being included both in imported modules and in a bridging header, we were getting different behavior between compilation and debugging, leading to crashes. This change makes sure that the debugger will load any bridging header first, like the compiler does.

  • Scope: Affects all app targets with bridging headers, but should have no significant effect except where a textual header is included in multiple ways.

  • Issue: rdar://problem/40471329

  • Risk: Medium-low. In an ideal world this has no effect at all; in a practical world we expect it to improve things. There's a small chance that someone was depending on the previous behavior for their real-world code, but it's hard to see how it would have compiled successfully in that case.

  • Testing: Added compiler regression tests.

  • Reviewed by: @DougGregor

…led-imports

[Serialization] Always list the bridging header before any imports

rdar://problem/40471329
(cherry picked from commit e5cec5f)
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please nominate

@jrose-apple jrose-apple merged commit 986bd48 into swiftlang:swift-4.2-branch-06-11-2018 Jun 18, 2018
@jrose-apple jrose-apple deleted the 4.2-EARLY-bridge-over-troubled-imports branch June 18, 2018 23:17
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.

1 participant