Skip to content

Generate the SwiftSyntax docc index using CodeGeneration #1394

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
merged 1 commit into from
Mar 10, 2023

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 9, 2023

It turns out we need this index because docc generates the left sidebar that contains from it.

@ahoppen ahoppen requested review from CodaFi and kimdv March 9, 2023 01:06
@ahoppen
Copy link
Member Author

ahoppen commented Mar 9, 2023

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Mar 9, 2023

@swift-ci Please test

}
GeneratedFileSpec([swiftSyntaxDir, "generated", "syntaxNodes", baseKind.value], syntaxNode(emitKind: baseKind.key))
} + [
GeneratedFileSpec([swiftSyntaxDir, "Documentation.docc", "generated", "SwiftSyntax.md"], swiftSyntaxDoccIndex)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit pick and don't need to be part of this PR, personally I would have a private let generatedPath: String = "generated" next to swiftSyntaxDir, swiftSyntaxBuilderDir and to so on.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good suggestion. I updated it.

@kimdv
Copy link
Contributor

kimdv commented Mar 9, 2023

And does DocC not support this kind of thing out of the box?

It turns out we need this index because docc generates the left sidebar that contains from it.
@ahoppen
Copy link
Member Author

ahoppen commented Mar 9, 2023

And does DocC not support this kind of thing out of the box?

I’m not sure but in either case it’s good if we can sort the types into groups ourselves rather than listing them all together, which is, what I suspect docc would do by default.

@ahoppen
Copy link
Member Author

ahoppen commented Mar 9, 2023

@swift-ci Please test

@kimdv
Copy link
Contributor

kimdv commented Mar 10, 2023

@swift-ci please test macOS

@ahoppen
Copy link
Member Author

ahoppen commented Mar 10, 2023

@swift-ci Please test macOS

@ahoppen ahoppen merged commit fa78409 into swiftlang:main Mar 10, 2023
@ahoppen ahoppen deleted the ahoppen/index branch March 10, 2023 21:56
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.

3 participants