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

use default branches for unknown symbol kinds #132

Merged
merged 2 commits into from
Apr 12, 2022

Conversation

QuietMisdreavus
Copy link
Contributor

Summary

This PR tweaks how swift-docc uses KindIdentifier instances from SymbolKit. Instead of matching on an explicit .unknown case (and using an exhaustive match), it instead changes them to default branches, to catch any new cases as they're added. This allows us to add new symbol kinds to SymbolKit (e.g. swiftlang/swift-docc-symbolkit#21) without creating a source-breaking change.

Dependencies

N/A

Testing

Existing functionality should remain unchanged.

Checklist

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

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

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test

@QuietMisdreavus
Copy link
Contributor Author

I confirmed in a local build that this change still works with swiftlang/swift-docc-symbolkit#7 applied, which would have otherwise been a breaking change.

@QuietMisdreavus
Copy link
Contributor Author

@swift-ci Please test

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.

2 participants