Skip to content

Conversation

@d-ronnqvist
Copy link
Contributor

@d-ronnqvist d-ronnqvist commented Mar 14, 2024

Bug/issue #, if applicable: rdar://124527905

Summary

This builds on #854 to emit language specific topic sections in the markdown representation of automatic curation from docc process-catalog emit-generated-curation

Dependencies

None

Testing

Run docc process-catalog emit-generated-curation on a project with language refinements (for example " Tests/SwiftDocCTests/Test Bundles/GeometricalShapes.docc"

Symbols that appear in different places in different languages should be listed in language specific topic sections.

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

@d-ronnqvist d-ronnqvist force-pushed the generate-language-specific-curation-markdown branch from 73dfe05 to 7564600 Compare March 15, 2024 16:45
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.

Looks good, thanks! I have a comment, but it's more of a "future refactor" kind of thing.

Comment on lines 186 to 193
// Sort Swift before other languages
if lhs == .swift {
return true
} else if rhs == .swift {
return false
}
// Otherwise, sort by ID for a stable order
return lhs.id < rhs.id
Copy link
Contributor

Choose a reason for hiding this comment

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

This sort comparator rings a bell for the code i've been sifting through recently, and i wonder if we should implement Comparable or some other kind of broadly-available comparator so we don't have to duplicate this code.

@QuietMisdreavus
Copy link
Contributor

@swift-ci Please test

@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist d-ronnqvist merged commit 50a487f into swiftlang:main Apr 2, 2024
@d-ronnqvist d-ronnqvist deleted the generate-language-specific-curation-markdown branch April 2, 2024 12:56
d-ronnqvist added a commit to d-ronnqvist/swift-docc that referenced this pull request May 23, 2024
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