Skip to content

Conversation

@BillWagner
Copy link
Member

@BillWagner BillWagner commented Oct 7, 2025

Fixes #46451

  • Add new file for preprocessor related compiler errors and warnings.
  • Consolidate all existing errors and warnings related to preprocessor tokens into this file.

I made extensive use of Copilot for this PR. I used agent mode in VS Code. The new file in prompts is the first pass at creating the file. It can probably be improved for the set of prompts. On the next PR for errors and warnings, I'll iterate and improve the prompts.


Internal previews

📄 File 🔗 Preview link
.github/prompts/error-consolidation.md Copilot prompts to consolidate error codes.
docs/csharp/language-reference/compiler-messages/nullable-warnings.md Resolve nullable warnings
docs/csharp/language-reference/compiler-messages/preprocessor-errors.md Errors and warnings generated by the C# preprocessor
docs/csharp/language-reference/preprocessor-directives.md C# preprocessor directives
docs/csharp/language-reference/toc.yml docs/csharp/language-reference/toc
docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md C# 14 errors begin here

Consolidate existing errors and warnings related to preprocessor directives into this one file.
I had copilot search for additional files that I had missed earlier in the appropriate folders. These are the ones it found.
In step 3, use the source from roslyn to find any additional errors and warnings that haven't been covered.
Create combined sections for related errors and warnings. Provide links to relevant language-reference articles.
@BillWagner BillWagner marked this pull request as ready for review October 7, 2025 21:14
@BillWagner BillWagner requested a review from a team as a code owner October 7, 2025 21:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR consolidates all preprocessor-related compiler errors and warnings into a single new document to improve organization and discoverability. It addresses issue #46451 by creating a centralized location for all preprocessor error documentation.

  • Creates a new comprehensive preprocessor-errors.md file that consolidates all preprocessor-related error documentation
  • Removes individual error files from the misc folder that are now covered by the new consolidated file
  • Updates navigation and redirection configuration to point to the new consolidated documentation

Reviewed Changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/prompts/error-consolidation.md Adds guidance prompts for consolidating error codes
.openpublishing.redirection.csharp.json Adds redirects from individual error pages to the new consolidated file
docs/csharp/language-reference/compiler-messages/cs1029.md Removes individual error file (now consolidated)
docs/csharp/language-reference/compiler-messages/cs1691.md Removes individual error file (now consolidated)
docs/csharp/language-reference/compiler-messages/nullable-warnings.md Adds CS8668 to nullable warnings documentation
docs/csharp/language-reference/compiler-messages/preprocessor-errors.md Creates new consolidated preprocessor errors documentation
docs/csharp/language-reference/preprocessor-directives.md Updates links to point to new consolidated error documentation
docs/csharp/language-reference/toc.yml Adds navigation entry for the new preprocessor errors page
docs/csharp/misc/cs*.md (multiple files) Removes individual error files that are now consolidated
docs/csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-error.md Updates error code lists to reflect consolidation

@IEvangelist IEvangelist merged commit 200895f into dotnet:main Oct 8, 2025
8 checks passed
@BillWagner BillWagner deleted the preprocess-errors branch October 8, 2025 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C# 14-Errors and warnings]: New Feature - projectless compile

2 participants