Skip to content

Prepare diagnostics docs for docc generation #80504

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
Apr 4, 2025

Conversation

daveyc123
Copy link
Contributor

Update the diagostic docs so that they can be built with docc:
* Add technologyroot (diagnostics.md) to aggregate all markdown files
* Fixed warnings in a few diagnostics docs

This allows the creation of docc documentation with a single invocation of docc. It will generate the landing page from diagnostics.md and include all of the diagnostics as subarticles.

The subarticles are accessible via the name of the markdown file, which is being used as the ID for these diagnostics. E.g. existential-any.

The docc docs for these documents can be generated locally with the following command:

docc preview --allow-arbitrary-catalog-directories userdocs/diagnostics

Update the diagostic docs so that they can be built with docc:
    * Add technologyroot (diagnostics.md) to aggregate all markdown files
    * Fixed warnings in a few diagnostics docs

This allows the creation of docc documentation with a single
invocation of docc. It will generate the landing page from
diagnostics.md and include all of the diagnostics as subarticles.

The subarticles are accessible via the name of the markdown file,
which is being used as the ID for these diagnostics.
E.g. existential-any.

The docc docs for these documents can be generated locally with the
following command:
>docc preview --allow-arbitrary-catalog-directories userdocs/diagnostics
Copy link
Contributor

@owenv owenv left a comment

Choose a reason for hiding this comment

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

Should we rename the directory to diagnostics.docc as well?

@daveyc123
Copy link
Contributor Author

I've been building it with --allow-arbitrary-catalog-directories to that we didn't have to. I'm of two minds:

  • Rename it to .docc so that folks clearly see that it's expected to be fed into docc
  • Keep it as is since there might be links out there pointing to these markdown files already

@DougGregor
Copy link
Member

I would prefer not to rename the directory to diagnostics.docc. The use of DocC is somewhat incidental here, and these are otherwise normal markdown files

Copy link
Member

@DougGregor DougGregor 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!

@DougGregor
Copy link
Member

@swift-ci please smoke test

@daveyc123 daveyc123 merged commit 7836aff into swiftlang:main Apr 4, 2025
3 checks passed
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