Skip to content

[5.5][SymbolGraph] add sourceOrigin field for symbols implementing remote protocol requirements #37352

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

QuietMisdreavus
Copy link
Contributor

@QuietMisdreavus QuietMisdreavus commented May 10, 2021

rdar://77626724

This PR ports #37351 to the release/5.5 branch.

Change information

  • Explanation: Manually-implemented properties or methods that are written to conform to a protocol are not linked to the protocol.
  • Scope of Issue: Without this relation tying together the implementation and the protocol, there's no way to mask out properties or methods that only exist for the purpose of that implementation.
  • Origination: The original implementation of inherited docs in the symbol graph ([SymbolGraph] Add information about "inherited docs" for synthesized symbols #36863) only accounted for "synthesized" symbols, leaving out concrete properties/methods that were still protocol implementations.
  • Risk: Low. This change is isolated to the SymbolGraphGen library, and edge rendering is only used when generating symbol graphs in swift-symbolgraph-extract and in symbol-graph serialization requested by -emit-symbol-graph.
  • Automated Testing: A new lit test "SymbolGraph/Relationships/Synthesized/RemoteInheritedDocs.swift" has been added, to exercise this code path. Existing automated tests have passed.

@QuietMisdreavus QuietMisdreavus requested a review from a team as a code owner May 10, 2021 22:50
@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please build toolchain macOS platform

@swift-ci
Copy link
Contributor

macOS Toolchain
Download Toolchain
Git Sha - 23c5fb4

Install command
tar -zxf swift-PR-37352-980-osx.tar.gz --directory ~/

@QuietMisdreavus
Copy link
Contributor Author

I added some extra checks to the test based on #37351 (comment).

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 20301ee

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test macOS platform

@QuietMisdreavus QuietMisdreavus merged commit 90a5ef8 into release/5.5 May 13, 2021
@QuietMisdreavus QuietMisdreavus deleted the QuietMisdreavus/5.5/protocol-req-sourceOrigin branch May 13, 2021 16: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.

4 participants