You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Check that we have documented recent compiler messages #5410
Yes, here is the list for C#. It is largely chronological.
To get details, the easiest it to load the project, and find references. That will find tests that report a given error.
@BillWagner I just tried to compare the pages under dotnet/docs/tree/master/docs/csharp/language-reference/compiler-messages with list for C# and it seems as though are missing most of the compiler messages (we have 136 entries in docs vs. approx. 1500 values in the ErrorCode. So I think it makes sense to "chop up" this issue into a lot of smaller tasks (both make both the work and the review work manageable).
Click to expand the full table (more than 1500 rows)
Topic exists
Values in enum
Void = InternalErrorCode.Void,
Unknown = InternalErrorCode.Unknown,
#region diagnostics introduced in C# 4 and earlier
X
//FTL_InternalError = 1,
//FTL_FailedToLoadResource = 2,
//FTL_NoMemory = 3,
//ERR_WarningAsError = 4,
//ERR_MissingOptionArg = 5,
X
ERR_NoMetadataFile = 6,
X
//FTL_ComPlusInit = 7,
//FTL_MetadataImportFailure = 8, no longer used in Roslyn.
FTL_MetadataCantOpenFile = 9,
//ERR_FatalError = 10,
//ERR_CantImportBase = 11,
ERR_NoTypeDef = 12,
//FTL_MetadataEmitFailure = 13, Roslyn does not catch stream writing exceptions. Those are propagated to the caller.
//FTL_RequiredFileNotFound = 14,
X
//ERR_ClassNameTooLong = 15, Deprecated in favor of ERR_MetadataNameTooLong.
// WRN_MissingTypeNested = 1682, // unused in Roslyn.
// In Roslyn, we generate errors ERR_MissingTypeInSource and ERR_MissingTypeInAssembly instead of warnings WRN_MissingTypeInSource and WRN_MissingTypeInAssembly respectively.
X
// WRN_MissingTypeInSource = 1683,
// WRN_MissingTypeInAssembly = 1684,
X
WRN_MultiplePredefTypes = 1685,
ERR_LocalCantBeFixedAndHoisted = 1686,
WRN_TooManyLinesForDebugger = 1687,
ERR_CantConvAnonMethNoParams = 1688,
ERR_ConditionalOnNonAttributeClass = 1689,
X
WRN_CallOnNonAgileField = 1690,
X
// WRN_BadWarningNumber = 1691, // we no longer generate this warning for an unrecognized warning ID specified as an argument to /nowarn or /warnaserror.
WRN_InvalidNumber = 1692,
// WRN_FileNameTooLong = 1694, //unused.
WRN_IllegalPPChecksum = 1695,
WRN_EndOfPPLineExpected = 1696,
WRN_ConflictingChecksum = 1697,
// WRN_AssumedMatchThis = 1698, // This error code is unused.
X
// WRN_UseSwitchInsteadOfAttribute = 1699, // This error code is unused.
X
WRN_InvalidAssemblyName = 1700,
X
WRN_UnifyReferenceMajMin = 1701,
WRN_UnifyReferenceBldRev = 1702,
X
ERR_DuplicateImport = 1703,
X
ERR_DuplicateImportSimple = 1704,
X
ERR_AssemblyMatchBadVersion = 1705,
//ERR_AnonMethNotAllowed = 1706, Unused in Roslyn. Previously given when a lambda was supplied as an attribute argument.
// WRN_DelegateNewMethBind = 1707, // This error code is unused.
X
ERR_FixedNeedsLvalue = 1708,
// WRN_EmptyFileName = 1709, // This error code is unused.
WRN_DuplicateTypeParamTag = 1710,
WRN_UnmatchedTypeParamTag = 1711,
WRN_MissingTypeParamTag = 1712,
//FTL_TypeNameBuilderError = 1713,
//ERR_ImportBadBase = 1714, // This error code is unused and replaced with ERR_NoTypeDef
ERR_CantChangeTypeOnOverride = 1715,
X
ERR_DoNotUseFixedBufferAttr = 1716,
WRN_AssignmentToSelf = 1717,
WRN_ComparisonToSelf = 1718,
ERR_CantOpenWin32Res = 1719,
WRN_DotOnDefault = 1720,
X
ERR_NoMultipleInheritance = 1721,
ERR_BaseClassMustBeFirst = 1722,
WRN_BadXMLRefTypeVar = 1723,
//ERR_InvalidDefaultCharSetValue = 1724, Not used in Roslyn.
ERR_FriendAssemblyBadArgs = 1725,
X
ERR_FriendAssemblySNReq = 1726,
//ERR_WatsonSendNotOptedIn = 1727, We're not doing any custom Watson processing in Roslyn. In modern OSs, Watson behavior is configured with machine policy settings.
ERR_DelegateOnNullable = 1728,
X
ERR_BadCtorArgCount = 1729,
ERR_GlobalAttributesNotFirst = 1730,
//ERR_CantConvAnonMethReturnsNoDelegate = 1731, Not used in Roslyn. When there is no delegate, we reuse the message that contains a substitution string for the delegate type.
//ERR_ParameterExpected = 1732, Not used in Roslyn.
@mikkelbu have you considered pages under dotnet/docs/tree/master/docs/csharp/misc? There are about 800 compiler messages, probably mostly compiler errors, in that folder.
(There is the issue to combine those two locations: #1491)
@pkulikov No, I forgot about that issue (eventhough I looked at it this week). Then it seems that this it is a smaller task, but still a large task IMHO.
As I understand, the first priority is to document error messages. That can be a smaller task, while documenting all the compiler warnings might be an epic :)
There's also #2363, which treats storing C# and VB error messages/warnings in a unified directory per language. Moving files from a misc directory to the directory in language-reference is fairly trivial. Since we'd be moving everything, we can just do a global redirect of all requests for docs.microsoft.com/dotnet/csharp/misc to docs.microsoft.com/dotnet/csharp/language-reference/compiler-messages. But you're right, @pkulikov, that documenting all the compiler warnings might be epic. Providing genuinely useful content with examples is even more epic.
This looks good, @BillWagner. I think that we can link to the project to track tasks from the community contributor's project. In the project to track tasks, we should also include #1491 on it. I think that that should be the first item of work.
Activity
jcouv commentedon May 16, 2018
Yes, here is the list for C#. It is largely chronological.
To get details, the easiest it to load the project, and find references. That will find tests that report a given error.
mikkelbu commentedon May 17, 2018
@BillWagner I just tried to compare the pages under
dotnet/docs/tree/master/docs/csharp/language-reference/compiler-messageswith list for C# and it seems as though are missing most of the compiler messages (we have 136 entries in docs vs. approx. 1500 values in theErrorCode. So I think it makes sense to "chop up" this issue into a lot of smaller tasks (both make both the work and the review work manageable).Click to expand the full table (more than 1500 rows)
ref readonly,ref ternaryandref-likefeatures in C# 7.2ref readonly,ref ternaryandref-likefeatures in C# 7.2BillWagner commentedon May 17, 2018
@mikkelbu That's the plan @rpetrusha are working on putting together. We'll also have a similar project for VB. Stay tuned. We'd love your help.
pkulikov commentedon May 18, 2018
@mikkelbu have you considered pages under
dotnet/docs/tree/master/docs/csharp/misc? There are about 800 compiler messages, probably mostly compiler errors, in that folder.(There is the issue to combine those two locations: #1491)
mikkelbu commentedon May 18, 2018
@pkulikov No, I forgot about that issue (eventhough I looked at it this week). Then it seems that this it is a smaller task, but still a large task IMHO.
pkulikov commentedon May 18, 2018
As I understand, the first priority is to document error messages. That can be a smaller task, while documenting all the compiler warnings might be an epic :)
rpetrusha commentedon May 18, 2018
There's also #2363, which treats storing C# and VB error messages/warnings in a unified directory per language. Moving files from a
miscdirectory to the directory in language-reference is fairly trivial. Since we'd be moving everything, we can just do a global redirect of all requests for docs.microsoft.com/dotnet/csharp/misc to docs.microsoft.com/dotnet/csharp/language-reference/compiler-messages. But you're right, @pkulikov, that documenting all the compiler warnings might be epic. Providing genuinely useful content with examples is even more epic.BillWagner commentedon May 31, 2018
I've assigned this to the current milestone, with the goal of having the following actions completed during this sprint:
@rpetrusha Comment on this plan, or add new tasks that you think are reasonable.
rpetrusha commentedon May 31, 2018
This looks good, @BillWagner. I think that we can link to the project to track tasks from the community contributor's project. In the project to track tasks, we should also include #1491 on it. I think that that should be the first item of work.
13 remaining items
Youssef1313 commentedon Jan 25, 2021
@BillWagner You'll probably want to re-open this.
BillWagner commentedon Dec 8, 2021
Related to #24002
BillWagner commentedon Mar 2, 2026
Closing as this has been continually chipped away. There are still holes, but we continue make progress.