Skip to content

[Incremental Dependencies] Coarse-grained dependencies by default #32280

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
Jun 10, 2020

Conversation

davidungar
Copy link
Contributor

@davidungar davidungar commented Jun 9, 2020

Default to coarse-grained dependencies.

rdar://63984581

Explanation: The perturbation tester found a miscompile with fine-grained dependencies. Switch back to the legacy coarse-grained ones.

Scope: When using incremental compilation, it is possible that not all affected files will get miscompiled after adding a stored member. Based on the perturbation tester perturbing Alamofire, it is not likely, though it may be more likely in other code bases. Also will avoid a performance regression in 5.3.

Origination: When fine-grained dependencies were made the default, #29379, Jan 24, 2020.

Risk: Very low, since we used coarse-grained dependencies for years, and we still test them in 5.3.

Pull request URL: #32280

Reviewed by: Doug Gregor

Automated testing: Both the usual ci tests, and the Perturbation Tester. No miscompiles adding member functions or member storage to Alamofire.

Dependencies: none

Builder Impact: Anyone who uses incremental compilation.

Directions for exposing the bug:

  1. Download Alamofire, SHA dc671c9b5a71d16b457cf844a8e8e838e25cc5d1
  2. Compile incrementally
  3. At the top of RevocationTrustEvaluator.Options in ServerTrustEvaluation.swift, add “var foo = 17”
  4. Compile incrementally, see what gets rebuilt.
  5. Touch all the swift files, and compile again, comparing what gets rebuilt.

Because of the bug, the rebuilt files for 4 and 5 will differ.

@davidungar davidungar requested a review from a team as a code owner June 9, 2020 21:11
@davidungar
Copy link
Contributor Author

@swift-ci please smoke test

@theblixguy theblixguy added the r5.3 label Jun 9, 2020
@davidungar
Copy link
Contributor Author

@swift-ci please smoke test

@davidungar
Copy link
Contributor Author

@swift-ci please smoke test

@davidungar davidungar requested review from DougGregor, slavapestov and CodaFi and removed request for slavapestov and CodaFi June 10, 2020 16:55
@davidungar
Copy link
Contributor Author

@swift-ci please nominate

@davidungar davidungar removed the request for review from DougGregor June 10, 2020 17:15
@davidungar
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ad1bf22

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - ad1bf22

@davidungar davidungar merged commit b0340f0 into swiftlang:release/5.3 Jun 10, 2020
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants