Skip to content

[NFC] Clean Up Some Unneeded TypeCheckerOptions #31879

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 3 commits into from
May 19, 2020

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented May 19, 2020

While refactoring in 48805b1, I accidentally added the computation of this bit before CompilerInstance::setupInputs is called. This means that the compiler currently does not have any knowledge of any primary input buffers, and thus the check for whole module mode is trivially true. As a consequence, this bit has been true ever since.

Since we seem to have got on just fine without computing this correctly, just inline that truthiness everywhere.

Whoops

Also, while I'm here, we don't need InImmediateMode.

CodaFi added 2 commits May 18, 2020 19:40
The last reader of this bit was the legacy integrated REPL.
While refactoring in 48805b1, I accidentally added the computation of this bit before CompilerInstance::setupInputs is called. This means that the compiler currently does not have any knowledge of any primary input buffers, and thus the check for whole module mode is trivially true. As a consequence, this bit has been true ever since.

Since we seem to have got on just fine without computing this correctly, just inline that truthiness everywhere.

Whoops
@CodaFi
Copy link
Contributor Author

CodaFi commented May 19, 2020

@swift-ci test

Copy link
Contributor

@davidungar davidungar left a comment

Choose a reason for hiding this comment

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

Looks pretty good. Hope it works!

We actually wanted to use forEachFileToTypeCheck, which will restrict
the source files we analyze to just the given primaries in incremental
mode, and the whole module's source files otherwise.
@CodaFi
Copy link
Contributor Author

CodaFi commented May 19, 2020

@swift-ci test

@CodaFi
Copy link
Contributor Author

CodaFi commented May 19, 2020

@CodaFi CodaFi merged commit 1fd2ac5 into swiftlang:master May 19, 2020
@CodaFi CodaFi deleted the mtimes-often-lie branch May 19, 2020 05:38
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.

2 participants