Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/prompts/error-consolidation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ Overall steps:

We're going to work through a series of files consolidating errors and warnings.

- For the duration of this chat, all references to "destination file" refer to `async-await-errors.md.
- For the duration of this chat, all references to "the target theme" refer to errors and warnings related to `async` function declarations and `await` expressions.
- For the duration of this chat, all references to "destination file" refer to `attribute-usage-errors.md`.
- For the duration of this chat, all references to "the target theme" refer to errors and warnings related to declaring and using *attributes*.

The destination file already contains a skeleton for the final output.

For each source file I specify in this chat, you'll do the following tasks:

- Add the contents of the source file to the destination.md file.
- Include the source error code in the YML header for f1_keywords and helpviewer_keywords.
- Add an entry with an anchor for the error error code and its corresponding error message.
- Add an entry with an anchor for the error error code and its corresponding error message. The error message should be the verbatim compiler error message.
- Add the contents of the source file as a new H2 in the destination file.
- Add a redirection for the source file in the file .openpublishing.redirection.csharp.json. Make the destination point to destination file. Place the new entry in sorted order based on 'source_path_from_root'.
- Update the TOC file:
Expand All @@ -31,7 +31,7 @@ For each source file I specify in this chat, you'll do the following tasks:

## Search for other related articles that may be missed.

Search all files in the docs/csharp/language-reference/compiler-messages and the docs/csharp/misc folder for any other errors and warnings that involve the target theme. Give me a list to review for possible additional consolidation. Don't make any edits until the originating user approves.
First, let's find candidate source files. Search all files in the docs/csharp/language-reference/compiler-messages and the docs/csharp/misc folder for any other errors and warnings that involve the target theme. Give me a list to review for possible additional consolidation. Don't make any edits until the originating user approves.

## Final search in roslyn source

Expand All @@ -46,7 +46,7 @@ To make sure you've found all related errors, we'll check the source. Look in `
I'll give you error codes one by one. For each, I want you to do the following:

- Add the new error code to the front matter of the destination file, for both the `f1_keywords` and `helpview_keywords` table.
- Add the new error code and error message to the table at the top of the destination file.
- Add the new error code and error message to the table at the top of the destination file. The error message should be the verbatim text from the compiler
- Add the new error code to the list of `displayName` elements in the TOC file entry for the destination file.
- Remove the new error code from the front matter in the file `csharp/misc/sorry-we-don-t-have-specifics-on-this-csharp-errors.md` file.

Expand All @@ -61,3 +61,8 @@ To do that, make a new H2 section for the theme. Remove all the H2s for the indi
The list of errors at the top of the file should remain in numerical order, so it's easy for readers to scan. Each impacted error code should now have a link to the anchor tag for the new section. Repeat the list in the new section, but without the anchors, as shown in the highlighted text.

Understand these instructions, then suggest a list of themes and the included error codes. I'll approve each theme before you begin editing.

## Move from description to resolution

Rework the highlighted section so the focus is on how to correct each error. This article doesn't need to explain the associated language feature. Instead, in each section, provide links to language reference or language specification material that explains the rules violated when these diagnostics appear. Add explanatory context after each correction (in parentheses with the error code). Provided brief reasons why each correction is needed. Use detailed, sentence-style explanations rather than brief imperative statements. For each recommendation put the affectived error codes in parentheses, and in **bold** style. Remove extensive examples.

76 changes: 76 additions & 0 deletions .openpublishing.redirection.csharp.json
Original file line number Diff line number Diff line change
Expand Up @@ -1717,6 +1717,10 @@
"source_path_from_root": "/docs/csharp/misc/cs0242.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/unsafe-code-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0243.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0244.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/unsafe-code-errors"
Expand Down Expand Up @@ -1793,6 +1797,22 @@
"source_path_from_root": "/docs/csharp/misc/cs0400.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/assembly-references"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0404.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0415.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0416.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0447.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0431.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/using-directive-errors"
Expand Down Expand Up @@ -1929,6 +1949,26 @@
"source_path_from_root": "/docs/csharp/misc/cs0576.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/using-directive-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0577.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0578.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0582.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0609.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0629.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0591.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/parameter-argument-mismatch"
Expand All @@ -1949,6 +1989,10 @@
"source_path_from_root": "/docs/csharp/misc/cs0623.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/array-declaration-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0625.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0631.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/ref-modifiers-errors"
Expand All @@ -1957,10 +2001,38 @@
"source_path_from_root": "/docs/csharp/misc/cs0633.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/parameter-argument-mismatch"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0636.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0637.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0641.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0646.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0643.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/parameter-argument-mismatch"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0653.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0657.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0658.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0655.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/parameter-argument-mismatch"
Expand All @@ -1973,6 +2045,10 @@
"source_path_from_root": "/docs/csharp/misc/cs0674.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/params-arrays"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0685.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/attribute-usage-errors"
},
{
"source_path_from_root": "/docs/csharp/misc/cs0687.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/using-directive-errors"
Expand Down
Loading