Skip to content

[SR-7342] Teach EmitImportedModules action to evaluate conditional co… #15739

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
Apr 5, 2018

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Apr 4, 2018

…mpilation blocks.

Missed this while implementing SE-0075. Will need to cherry-pick this into 4.2 as well.

Resolves SR-7342.

@CodaFi CodaFi requested a review from jrose-apple April 4, 2018 19:13
@CodaFi
Copy link
Contributor Author

CodaFi commented Apr 4, 2018

@swift-ci please smoke test

@CodaFi
Copy link
Contributor Author

CodaFi commented Apr 4, 2018

AFAICT no other callers of performParseOnly need to evaluate conditionals.

Copy link
Contributor

@jrose-apple jrose-apple left a comment

Choose a reason for hiding this comment

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

Thanks for taking this!


#if canImport(Swift) // To wit, true
import Swift
#endif
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you include a condition that's false, too?

@jrose-apple jrose-apple requested review from huonw and benlangmuir April 4, 2018 20:45
Copy link
Contributor

@benlangmuir benlangmuir left a comment

Choose a reason for hiding this comment

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

I agree with Jordan this should have a test for a false condition; otherwise LGTM.

@CodaFi
Copy link
Contributor Author

CodaFi commented Apr 4, 2018

Tests passed, added two false conditional tests, holding for @huonw

@CodaFi
Copy link
Contributor Author

CodaFi commented Apr 4, 2018

@swift-ci please smoke test and merge

@CodaFi
Copy link
Contributor Author

CodaFi commented Apr 4, 2018

Oh boy, here I go yelling at CI again

@swift-ci please smoke test

@CodaFi
Copy link
Contributor Author

CodaFi commented Apr 5, 2018

⛵️

@CodaFi CodaFi merged commit e143634 into swiftlang:master Apr 5, 2018
@CodaFi CodaFi deleted the trade-war branch April 5, 2018 04:37
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