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

Adapt Symbol Graph Format to Changes Introduced in apple/swift#59047 #45

Merged

Conversation

theMomax
Copy link
Contributor

@theMomax theMomax commented Jul 7, 2022

Related to: swiftlang/swift#59047, apple/swift-docc#210

Summary

This PR introduces the new swift.extension Symbol Kind and the extensionTo Relationship Kind. In addition, it adds an optional typeKind field to the Swift.Extension Mixin.

These adaptions are necessary so that the -emit-extension-block-symbols format introduced in swiftlang/swift#59047 can be parsed properly.

Warning Since this PR adds the extension case to SymbolGraph.Symbol.KindIdentifier, this RP can break existing code.

Dependencies

swiftlang/swift#59047

Testing

There is a new unit test for decoding Swift.Extension's optional typeKind property.

The following files were produced with the -emit-extension-block-symbols mode from swiftlang/swift#59047. Those and the old format should be decoded and re-encoded without errors or warnings.

Symbol Graph Files.zip

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran the ./bin/test script and it succeeded
  • Updated documentation if necessary

@theMomax theMomax force-pushed the extension-block-symbols-compatibility branch from 825f08f to 77674b7 Compare July 7, 2022 12:56
@theMomax theMomax force-pushed the extension-block-symbols-compatibility branch from 77674b7 to b1563be Compare July 7, 2022 14:28
@theMomax theMomax mentioned this pull request Jul 7, 2022
4 tasks
Tests/SymbolKitTests/SymbolGraph/SymbolTests.swift Outdated Show resolved Hide resolved
Tests/SymbolKitTests/SymbolGraph/SymbolTests.swift Outdated Show resolved Hide resolved
Tests/SymbolKitTests/SymbolGraph/SymbolTests.swift Outdated Show resolved Hide resolved
Tests/SymbolKitTests/SymbolGraph/SymbolTests.swift Outdated Show resolved Hide resolved
Tests/SymbolKitTests/SymbolGraph/SymbolTests.swift Outdated Show resolved Hide resolved
Copy link
Member

@franklinsch franklinsch left a comment

Choose a reason for hiding this comment

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

Looks great to me, thanks! @QuietMisdreavus anything from your end?

Tests/SymbolKitTests/SymbolGraph/SymbolTests.swift Outdated Show resolved Hide resolved
@franklinsch
Copy link
Member

@swift-ci please test

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 all looks good, thanks!

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