Skip to content

Conversation

@bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Oct 21, 2025

The core change here is the update to generate-doc-index, which now groups all diagnostic groups together rather than separating them into "descriptions" and "groups". That allows for some extra handling:

  1. Error when diagnostic files and their definition in DiagnosticGroups.def don't match up
  2. Error when a title is missing its group name
  3. List of all groups with warnings

The rest is small cleanups to the old notes files - adding their group name in and adding See Also sections where that makes sense. Also updated some of the links to the new TSPL links rather than the old (which takes a little while to redirect and not always to the correct location).

Moves all the "diagnostic descriptions" into "diagnostic groups". This
then allows some additional handling for:
1. Error when diagnostic files and their definition in
   `DiagnosticGroups.def` don't match up
2. Error when a title is missing its group name
3. List of all groups with warnings
Also adds a parent `RegionIsolation` group to link both
`SendingRisksDataRace` and the newly added
`SendingClosureRisksDataRace`.
This is mostly just cleanup:
1. Removes `diagnostic-descriptions.md` since it isn't used any more
2. Adds the group name to all the old notes files
3. Removes trailing whitespace
4. Adds "See Also" sections for notes that have links
func generateIndex() throws {
let notesHandle = try createIndex(name: notesDocFileName, header: notesHeader)
defer { try? notesHandle.close() }
let groupsWithWarnings = try groupNamesWithWarnings()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interested in opinions as to whether this is actually worth doing or not. We could potentially include the parent hierarchy in here as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Copy link
Member

Choose a reason for hiding this comment

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

I like this. I would also like the parent hierarchy, because I expect it will help us as we get more diagnostic groups in place.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah makes sense, I can look at that next 🙇

@bnbarham
Copy link
Contributor Author

@swift-ci please smoke test

@bnbarham
Copy link
Contributor Author

@swift-ci please clean smoke test macOS platform

func generateIndex() throws {
let notesHandle = try createIndex(name: notesDocFileName, header: notesHeader)
defer { try? notesHandle.close() }
let groupsWithWarnings = try groupNamesWithWarnings()
Copy link
Member

Choose a reason for hiding this comment

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

I like this. I would also like the parent hierarchy, because I expect it will help us as we get more diagnostic groups in place.

@bnbarham bnbarham merged commit ba04e5d into swiftlang:main Oct 23, 2025
3 checks passed
@bnbarham bnbarham deleted the user-doc-cleanup branch October 23, 2025 21:05
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