Skip to content

[🍒] [6.1] Discard non-indexed relations instead of entire references. #79589

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

dylansturg
Copy link
Contributor

  • Explanation:
    • Fixes a regression in index data, where entire references are discarded instead of just the relation. This occurs when the reference has a relation where the related entity is not indexed. Instead of discarding the entire reference, e.g. a function call, this fix discards the relation to a non-indexed symbol, e.g. the received-by relation to a private type.
  • Scope:
    • This adds references to the index output, and should not impact code compilation or other compiler outputs. These references were emitted in the past, removed starting in Swift 6.0, so reintroducing them is likely safe.
  • Issues:
    • N/A
  • Original PRs:
  • Risk:
    • Low. This only adds some new references to index data.
  • Testing:
    • New test case, and existing test suite for index data and its users.
  • Reviewers:

References for function calls where there would normally be a received-by relationship were being discarded. This happened when the receiver type is a non-indexed type, e.g. a private type in a system framework. The function call could be public or defined in any module though, so discarding it entirely because of the receiver type is not desirable.

Follow up to refine the behavior of [previous commit](swiftlang@b65d8c2).
@dylansturg dylansturg requested a review from a team as a code owner February 24, 2025 21:51
@allevato
Copy link
Member

@swift-ci please test

@allevato
Copy link
Member

@swift-ci please test macOS platform

@allevato
Copy link
Member

@swift-ci please test macOS platform

1 similar comment
@allevato
Copy link
Member

@swift-ci please test macOS platform

@allevato allevato merged commit ce5e607 into swiftlang:release/6.1 Feb 26, 2025
5 checks passed
@dylansturg dylansturg deleted the index-discard-relations-cp branch February 26, 2025 14:43
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.

3 participants