Skip to content

Add groupings for the various diagnostics #82002

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
Jun 6, 2025

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Jun 4, 2025

Also make the titles and one line summaries a little more consistent (at least for diagnostic groups and upcoming language features, haven't gone through the educational notes).

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.

Ohhh thank you!

Comment on lines 52 to 71
- <doc:conformance-isolation>
- <doc:dynamic-callable-requirements>
- <doc:error-in-future-swift-version>
- <doc:existential-member-access-limitations>
- <doc:isolated-conformances>
- <doc:member-import-visibility>
- <doc:multiple-inheritance>
- <doc:mutable-global-variable>
- <doc:nominal-types>
- <doc:opaque-type-inference>
- <doc:property-wrapper-requirements>
- <doc:protocol-type-non-conformance>
- <doc:result-builder-methods>
- <doc:sendable-closure-captures>
- <doc:sending-closure-risks-data-race>
- <doc:sending-risks-data-race>
- <doc:string-interpolation-conformance>
- <doc:temporary-pointers>
- <doc:trailing-closure-matching>
Copy link
Member

Choose a reason for hiding this comment

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

Should we either generate this via a script or add a regression test to verify that all of the markdown files end up somewhere in this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The former would be nice, though given we are grouping them we'd have to add something so that could happen automatically. But I can do the latter for now if that works for you.

## Diagnostics

Swift diagnostics are classified into errors and warnings. Warnings can only be silenced within
Copy link
Collaborator

Choose a reason for hiding this comment

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

Assuming the omission of notes and remarks is intentional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Remarks partially since they have to be explicitly enabled. Notes I had in originally and am fine to add back, I removed them because you could see them as being just extra information. As above, happy to completely change this if you come up with something better.


This diagnostic group includes errors and warnings pertaining to the `any` type
syntax.
`any` existential type syntax.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would so much prefer the book to just call them existential. The "boxed" in "boxed protocol type" is overloaded and uncatchy, and the "protocol" is just not accurate.

@bnbarham bnbarham force-pushed the update-feature-docs branch from e01d720 to 00ab365 Compare June 5, 2025 03:03
@bnbarham
Copy link
Contributor Author

bnbarham commented Jun 5, 2025

I imagine you'll all also be interested in swiftlang/swift-migration-guide#154 (which was my motivation for doing this in the first place - I wanted a link for upcoming features)

Copy link
Collaborator

@AnthonyLatsis AnthonyLatsis left a comment

Choose a reason for hiding this comment

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

Not sure what that last commit is about.

Also make the titles and one line summaries a little more consistent (at
least for diagnsotic groups and upcoming language features, haven't gone
through the educational notes).
@bnbarham bnbarham force-pushed the update-feature-docs branch from 614e434 to 32ec5a6 Compare June 5, 2025 22:49
@bnbarham
Copy link
Contributor Author

bnbarham commented Jun 5, 2025

@swift-ci please smoke test

1 similar comment
@bnbarham
Copy link
Contributor Author

bnbarham commented Jun 5, 2025

@swift-ci please smoke test

@bnbarham
Copy link
Contributor Author

bnbarham commented Jun 5, 2025

I've updated to:

  1. Remove backticks
  2. Split the groupings into separate pages (I initially thought this changed URLs, but it does not)

@bnbarham
Copy link
Contributor Author

bnbarham commented Jun 6, 2025

@swift-ci please smoke test Linux platform

@tshortli
Copy link
Contributor

tshortli commented Jun 6, 2025

This is not a request for this PR, but I think we should have a README.md for this documentation directory that spells out some of the guidelines for writing this documentation (sentence case for the titles, what information to include for language features vs. just plain diagnostic groups, etc.

@bnbarham bnbarham merged commit 5dadb5d into swiftlang:main Jun 6, 2025
3 checks passed
@bnbarham bnbarham deleted the update-feature-docs branch June 6, 2025 17:23
bnbarham added a commit to bnbarham/swift that referenced this pull request Jun 7, 2025
These were meant to be part of swiftlang#82002, but forgot to add them.
bnbarham added a commit to bnbarham/swift that referenced this pull request Jun 7, 2025
These were meant to be part of swiftlang#82002, but forgot to add them.
bnbarham added a commit to bnbarham/swift that referenced this pull request Jun 7, 2025
These were meant to be part of swiftlang#82002, but forgot to add them.
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.

4 participants