As part of the specification for better obsoletion, @jaredpar and @agocke underlined my concern around conflicting diagnostic IDs which I have discussed with @jinujoseph as well. The analyzer team is already maintaining a table of used ranges that 1st parties should use to avoid conflicts.
However, we don't really have any guidance how third parties should choose their prefix to avoid conflicts. It seems to me that a prefix should be owned by a single party that can then control the IDs.
A few things:
-
Should Roslyn enforce that certain prefixes are only used by 1st parties? This would certainly include CS and BC, but should probably also include CA and IDE.
-
Should we give guidance to use longer prefixes? My understanding is that the prefix can be of any length, not just 2-3 characters. One option to avoid conflicts would be to use a qualified name, such as the NuGet package name.
-
Should we give guidance to use longer IDs? My understanding is that there is no requirement to use numbers. We could just tell people to spell out string like CA_Do_Not_Use_Async_Suffixes. In this cases, prefixes are almost irrelevant as two parties are fairly unlikely to use define the same rule (and if they do, it probably doesn't matter because suppressing both simultaneously is probably desired anyways).
As part of the specification for better obsoletion, @jaredpar and @agocke underlined my concern around conflicting diagnostic IDs which I have discussed with @jinujoseph as well. The analyzer team is already maintaining a table of used ranges that 1st parties should use to avoid conflicts.
However, we don't really have any guidance how third parties should choose their prefix to avoid conflicts. It seems to me that a prefix should be owned by a single party that can then control the IDs.
A few things:
Should Roslyn enforce that certain prefixes are only used by 1st parties? This would certainly include
CSandBC, but should probably also includeCAandIDE.Should we give guidance to use longer prefixes? My understanding is that the prefix can be of any length, not just 2-3 characters. One option to avoid conflicts would be to use a qualified name, such as the NuGet package name.
Should we give guidance to use longer IDs? My understanding is that there is no requirement to use numbers. We could just tell people to spell out string like
CA_Do_Not_Use_Async_Suffixes. In this cases, prefixes are almost irrelevant as two parties are fairly unlikely to use define the same rule (and if they do, it probably doesn't matter because suppressing both simultaneously is probably desired anyways).