Skip to content

[5.5] [SymbolGraph] add sourceOrigin info for all protocol implementations #37815

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

Resolves rdar://78680450

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

Change Information

  • Explanation: Adds sourceOrigin information for symbols that implement protocol requirements when the protocol and the implementation are in the same module.
  • Scope of issue: Currently, the sourceOrigin field in the symbol graph's relationships only appears when a symbol is synthesized, or when the protocol being implemented was defined in a different module. When a symbol is implementing a locally-defined protocol and also inherits docs, there is currently no way to relate the implementation to the symbol that defined the docs it's inheriting.
  • Risk: Low. The added code only adds a new field in more places.
  • Automated Testing: The lit test "SymbolGraph/Relationships/Synthesized/InheritedDocs" has been updated to exercise this situation.

@QuietMisdreavus QuietMisdreavus requested a review from a team as a code owner June 7, 2021 15:11
@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

swift-ci commented Jun 7, 2021

Build failed
Swift Test OS X Platform
Git Sha - e4b6582

@QuietMisdreavus QuietMisdreavus changed the title Quiet misdreavus/5.5/source origin with feeling [5.5] [SymbolGraph] add sourceOrigin info for all protocol implementations Jun 7, 2021
@QuietMisdreavus
Copy link
Contributor Author

FATAL: Unable to delete script file /var/folders/_8/79jmzf2142z2xydc_01btlx00000gn/T/jenkins3885156208099152097.sh

@swift-ci Please test macOS platform

@QuietMisdreavus
Copy link
Contributor Author

Ditto for the toolchain build.

@swift-ci Please build toolchain macOS platform

@QuietMisdreavus
Copy link
Contributor Author

Toolchain build failed again in the SwiftPM tests:

Tests/SimpleTests/SwiftTests.swift:1:8: error: module compiled with Swift 5.3.2 cannot be imported by the Swift 5.5 compiler: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/XCTest.swiftmodule/x86_64-apple-macos.swiftmodule

@swift-ci Please build toolchain macOS platform

@shahmishal
Copy link
Member

This is known issue, and it was resolved with this PR #37823

@shahmishal
Copy link
Member

@swift-ci Please build toolchain macOS platform

@swift-ci
Copy link
Contributor

macOS Toolchain
Download Toolchain
Git Sha - e4b6582

Install command
tar -zxf swift-PR-37815-1008-osx.tar.gz --directory ~/

@QuietMisdreavus QuietMisdreavus merged commit 5190907 into release/5.5 Jun 11, 2021
@QuietMisdreavus QuietMisdreavus deleted the QuietMisdreavus/5.5/sourceOrigin-with-feeling branch June 11, 2021 23:11
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.

5 participants