Skip to content

Conversation

@tshortli
Copy link
Contributor

@tshortli tshortli commented Apr 4, 2024

  • Explanation: Adoption of the #isolation macro as a default argument in the standard library exposed that the availbility of contents of default argument macro expansions were being mis-diagnosed. The nodes for auxilary files generated for default argument expansions were not being added to the enclosing file's TypeRefinementContext hierarchy, so the contents of the expansion would be diagnosed as if it were located in a context with the minimum availability for the compilation.
  • Scope: Affects any API adopting macros as default arguments. Fixing this for 6.0 is important because it unblocks adoption of the #isolation macro in various standard library APIs.
  • Issue/Radar: rdar://125812256
  • Original PR: AST: Fix availability checking for macros as default arguments #72813
  • Risk: Low.
  • Testing: Added a new test to the compiler test suite.
  • Reviewer: @ktoso

Adoption of the `#isolation` macro as a default argument in the standard
library exposed that the availbility of contents of default argument macro
expansions were being mis-diagnosed. The nodes for auxilary files generated for
default argument expansions were not being added to the enclosing file's
`TypeRefinementContext` hierarchy, so the contents of the expansion would be
diagnosed as if it were located in a context with the minimum availability for
the compilation.

Resolves rdar://125812256
@tshortli tshortli requested a review from a team as a code owner April 4, 2024 03:45
@tshortli
Copy link
Contributor Author

tshortli commented Apr 4, 2024

@swift-ci please test

@tshortli tshortli requested a review from hborla April 4, 2024 03:48
@tshortli tshortli changed the title AST: Fix availability checking for macros as default arguments [6.0] AST: Fix availability checking for macros as default arguments Apr 4, 2024
@tshortli tshortli added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.0 labels Apr 4, 2024
@tshortli tshortli enabled auto-merge April 4, 2024 04:46
@tshortli tshortli merged commit d7a0f08 into swiftlang:release/6.0 Apr 4, 2024
@tshortli tshortli deleted the isolation-macro-availability-6.0 branch April 4, 2024 19:58
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 6.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants