-
Notifications
You must be signed in to change notification settings - Fork 6k
Add build-only diagnostic note to CS0169 documentation #47309
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: BillWagner <[email protected]>
This looks great @copilot Can you make the same change in all the error message files referenced in this comment: #26708 (comment) Because there are a large number of them, you should move the note to an include file. |
Co-authored-by: BillWagner <[email protected]>
I've updated all the build-only diagnostic error documentation files as requested. Created a shared include file at |
@copilot Your latest change updates 9 articles. The highlighted range https://github.com/dotnet/roslyn/blob/e263437db49b0650dbc72fca3331df654e05987c/src/Compilers/CSharp/Portable/Errors/ErrorFacts.cs#L531-L573 shows 33 different articles. Why the discrepancy? |
Co-authored-by: BillWagner <[email protected]>
You're right - I had only updated 9 error documentation files but the Roslyn ErrorFacts.cs file shows 33+ build-only diagnostics. I've now analyzed the complete list and updated all 18 CS error files that have documentation and are marked as build-only diagnostics in the Roslyn source. I also removed the note from CS0279 which was incorrectly included as it's not actually a build-only diagnostic. The discrepancy was due to: 1) Some build-only diagnostics don't have documentation files yet, and 2) I had missed 10 files in my initial implementation. All documented build-only diagnostics now include the shared note. Commit: 03c4b1e |
Adds a note to the CS0169 compiler warning documentation explaining that it's a "build-only" diagnostic that behaves differently from most compiler warnings.
Changes Made
docs/csharp/misc/cs0169.md
explaining that CS0169 is only reported during explicit Build or Rebuild operationsWhy This Matters
This behavior differs from the majority of compiler warnings/errors, which automatically refresh while typing. The inconsistency leads to user confusion when warnings persist after the underlying issue is resolved, as reported in multiple feedback tickets.
The note uses the same format as other documentation files (following the pattern in CS0219.md) and passed markdown linting validation.
Fixes #26708.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.
Internal previews
Toggle expand/collapse