Skip to content

[6.1] Update the compiler arguments used for background AST builds #1972

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

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Feb 8, 2025

  • Explanation: Fixes issues caused by a mismatch between the arguments used during preparation and background ASTs/indexing.
  • Scope: Settings handling
  • Issue: rdar://141508656
  • Original PR: Update the compiler arguments used for background AST builds #1971
  • Risk: Medium, this is a non-trivial change to settings handling. However, this is a well tested area (many tests are really integration tests using a SwiftPM project) and the alternative (crashes, loss of functionality, etc) is much worse.
  • Testing: Added a test case for a direct use of an invalid function.
  • Reviewer: @ahoppen

This fixes two issues:
1. The SwiftPM build system was setup without passing through whether it
   should prepare or not. This meant that we lost eg. the argument to
   allow compiler errors when building the AST (even though it was set
   when building the modules)
2. The compiler argument adjustment to remove harmful and unnecessary
   flags only applied to indexing arguments, not those passed to the AST
   builds

Resolves rdar://141508656.

(cherry picked from commit ab12429)
@bnbarham bnbarham requested a review from ahoppen as a code owner February 8, 2025 00:38
@bnbarham
Copy link
Contributor Author

bnbarham commented Feb 8, 2025

@swift-ci please test

@ahoppen
Copy link
Member

ahoppen commented Feb 10, 2025

@swift-ci Please test Windows

@bnbarham
Copy link
Contributor Author

@swift-ci please test Windows

@bnbarham bnbarham merged commit c19f78d into swiftlang:release/6.1 Feb 11, 2025
3 checks passed
@bnbarham bnbarham deleted the 6.1-pass-allow-errors-for-ast branch February 11, 2025 02:06
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