Skip to content
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

Extension Block Symbols: Fix inheritsFrom Relationship #61951

Conversation

theMomax
Copy link
Contributor

@theMomax theMomax commented Nov 6, 2022

This PR fixes a bug in the extension block format for Symbol Graphs. When extending an external swift.class symbol that has a superclass, the respective inheritsFrom relationship between the extended swift.class symbol and its superclass symbol was emitted not only in the symbol graph file that includes the external class' symbol, but also in every symbol graph file that contains a swift.extension symbol extending the same swift.class symbol.

E.g. in the following snippet both External.symbols.json as well as Main@External.symbols.json included the inheritsFrom relationship between C and Superclass.

// "External" Target
public class Superclass { }
public class C: Superclass { }

// "Main" Target
public extension C {
    func foo() { }
}

This bug has no associated issue or radar.

…eritsFrom relationships of extended symbols to be emitted in extension graphs
@jaedon6
Copy link

jaedon6 commented Nov 6, 2022

waiting for checks to complete

Copy link
Contributor

@QuietMisdreavus QuietMisdreavus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, thanks!

@QuietMisdreavus
Copy link
Contributor

@swift-ci Please smoke test

@theMomax
Copy link
Contributor Author

@QuietMisdreavus thanks! This can be merged right away independently of the other PRs.

@QuietMisdreavus QuietMisdreavus merged commit ddf5cf9 into swiftlang:main Nov 15, 2022
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.

None yet

3 participants