Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
9 changes: 9 additions & 0 deletions eng/targets/Imports.targets
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,15 @@
</ItemGroup>
</Target>

<!-- TODO: Remove once we consume an SDK with the fix from https://github.com/dotnet/wpf/pull/6799 -->
Copy link
Member

Choose a reason for hiding this comment

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

Nit: can you match the general format for a work around comment as used in the rest of the file

Suggested change
<!-- TODO: Remove once we consume an SDK with the fix from https://github.com/dotnet/wpf/pull/6799 -->
<!-- Workaround for https://github.com/dotnet/wpf/pull/6799 -->

<Target Name="RemoveDuplicateAnalyzers" BeforeTargets="CoreCompile" Condition="'$(UseWpf)' == 'true'">
<ItemGroup>
<FilteredAnalyzer Include="@(Analyzer->Distinct())" />
<Analyzer Remove="@(Analyzer)" />
<Analyzer Include="@(FilteredAnalyzer)" />
</ItemGroup>
</Target>

<Import Project="DoNotDeployToSymStore_Workaround.targets" Condition="'$(UsingToolPdbConverter)' == 'false'" />
<Import Project="DoNotGenerateSatelliteAssemblies_Workaround.targets" Condition="'$(GenerateSatelliteAssemblies)' == 'false'" />
</Project>
15 changes: 6 additions & 9 deletions src/Compilers/CSharp/Portable/CSharpResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -6781,63 +6781,54 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<data name="ERR_RefFieldInNonRefStruct" xml:space="preserve">
<value>A ref field can only be declared in a ref struct.</value>
</data>

<data name="WRN_UseDefViolationPropertySupportedVersion" xml:space="preserve">
<value>Auto-implemented property '{0}' is read before being explicitly assigned, causing a preceding implicit assignment of 'default'.</value>
</data>
<data name="WRN_UseDefViolationPropertySupportedVersion_Title" xml:space="preserve">
<value>Auto-implemented property is read before being explicitly assigned, causing a preceding implicit assignment of 'default'.</value>
</data>

<data name="WRN_UseDefViolationFieldSupportedVersion" xml:space="preserve">
<value>Field '{0}' is read before being explicitly assigned, causing a preceding implicit assignment of 'default'.</value>
</data>
<data name="WRN_UseDefViolationFieldSupportedVersion_Title" xml:space="preserve">
<value>Field is read before being explicitly assigned, causing a preceding implicit assignment of 'default'.</value>
</data>

<data name="WRN_UseDefViolationThisSupportedVersion" xml:space="preserve">
<value>The 'this' object is read before all of its fields have been assigned, causing preceding implicit assignments of 'default' to non-explicitly assigned fields.</value>
</data>
<data name="WRN_UseDefViolationThisSupportedVersion_Title" xml:space="preserve">
<value>The 'this' object is read before all of its fields have been assigned, causing preceding implicit assignments of 'default' to non-explicitly assigned fields.</value>
</data>

<data name="WRN_UnassignedThisAutoPropertySupportedVersion" xml:space="preserve">
<value>Control is returned to caller before auto-implemented property '{0}' is explicitly assigned, causing a preceding implicit assignment of 'default'.</value>
</data>
<data name="WRN_UnassignedThisAutoPropertySupportedVersion_Title" xml:space="preserve">
<value>Control is returned to caller before auto-implemented property is explicitly assigned, causing a preceding implicit assignment of 'default'.</value>
</data>

<data name="WRN_UnassignedThisSupportedVersion" xml:space="preserve">
<value>Control is returned to caller before field '{0}' is explicitly assigned, causing a preceding implicit assignment of 'default'.</value>
</data>
<data name="WRN_UnassignedThisSupportedVersion_Title" xml:space="preserve">
<value>Control is returned to caller before field is explicitly assigned, causing a preceding implicit assignment of 'default'.</value>
</data>

<data name="ERR_UseDefViolationFieldUnsupportedVersion" xml:space="preserve">
<value>Use of possibly unassigned field '{0}'. Consider updating to language version '{1}' to auto-default the field.</value>
</data>
<data name="ERR_UseDefViolationPropertyUnsupportedVersion" xml:space="preserve">
<value>Use of possibly unassigned auto-implemented property '{0}'. Consider updating to language version '{1}' to auto-default the property.</value>
</data>

<data name="WRN_UseDefViolationFieldUnsupportedVersion" xml:space="preserve">
<value>Use of possibly unassigned field '{0}'. Consider updating to language version '{1}' to auto-default the field.</value>
</data>
<data name="WRN_UseDefViolationFieldUnsupportedVersion_Title" xml:space="preserve">
<value>Use of possibly unassigned field. Consider updating the language version to auto-default the field.</value>
</data>

<data name="WRN_UseDefViolationPropertyUnsupportedVersion" xml:space="preserve">
<value>Use of possibly unassigned auto-implemented property '{0}'. Consider updating to language version '{1}' to auto-default the property.</value>
</data>
<data name="WRN_UseDefViolationPropertyUnsupportedVersion_Title" xml:space="preserve">
<value>Use of possibly unassigned auto-implemented property. Consider updating the language version to auto-default the property.</value>
</data>

<data name="ERR_UnsupportedTypeForSlicePattern" xml:space="preserve">
<value>Slice patterns may not be used for a value of type '{0}'.</value>
</data>
Expand Down Expand Up @@ -7214,4 +7205,10 @@ To remove the warning, you can use /reference instead (set the Embed Interop Typ
<data name="ERR_ExplicitScopedRef" xml:space="preserve">
<value>Do not use 'System.Runtime.CompilerServices.ScopedRefAttribute'. Use the 'scoped' keyword instead.</value>
</data>
<data name="WRN_DuplicateAnalyzerReference" xml:space="preserve">
<value>Analyzer reference '{0}' specified multiple times</value>
</data>
<data name="WRN_DuplicateAnalyzerReference_Title" xml:space="preserve">
<value>Analyzer reference specified multiple times</value>
</data>
</root>
1 change: 1 addition & 0 deletions src/Compilers/CSharp/Portable/Errors/ErrorCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2114,6 +2114,7 @@ internal enum ErrorCode
ERR_UnscopedRefAttributeUnsupportedTarget = 9063,
ERR_RuntimeDoesNotSupportRefFields = 9064,
ERR_ExplicitScopedRef = 9065,
WRN_DuplicateAnalyzerReference = 9066,

#endregion

Expand Down
2 changes: 2 additions & 0 deletions src/Compilers/CSharp/Portable/Errors/ErrorFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ internal static int GetWarningLevel(ErrorCode code)
case ErrorCode.WRN_UnassignedThisSupportedVersion:
case ErrorCode.WRN_ObsoleteMembersShouldNotBeRequired:
case ErrorCode.WRN_AnalyzerReferencesNewerCompiler:
case ErrorCode.WRN_DuplicateAnalyzerReference:
return 1;
default:
return 0;
Expand Down Expand Up @@ -2215,6 +2216,7 @@ internal static bool IsBuildOnlyDiagnostic(ErrorCode code)
case ErrorCode.ERR_UnscopedRefAttributeUnsupportedTarget:
case ErrorCode.ERR_RuntimeDoesNotSupportRefFields:
case ErrorCode.ERR_ExplicitScopedRef:
case ErrorCode.WRN_DuplicateAnalyzerReference:
return false;
default:
// NOTE: All error codes must be explicitly handled in this switch statement
Expand Down
1 change: 1 addition & 0 deletions src/Compilers/CSharp/Portable/Errors/MessageProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ internal override bool ShouldAssertExpectedMessageArgumentsLength(int errorCode)
public override int WRN_UnableToLoadAnalyzer => (int)ErrorCode.WRN_UnableToLoadAnalyzer;
public override int WRN_AnalyzerReferencesFramework => (int)ErrorCode.WRN_AnalyzerReferencesFramework;
public override int WRN_AnalyzerReferencesNewerCompiler => (int)ErrorCode.WRN_AnalyzerReferencesNewerCompiler;
public override int WRN_DuplicateAnalyzerReference => (int)ErrorCode.WRN_DuplicateAnalyzerReference;
public override int INF_UnableToLoadSomeTypesInAnalyzer => (int)ErrorCode.INF_UnableToLoadSomeTypesInAnalyzer;
public override int ERR_CantReadRulesetFile => (int)ErrorCode.ERR_CantReadRulesetFile;
public override int ERR_CompileCancelled => (int)ErrorCode.ERR_CompileCancelled;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.cs.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.de.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.es.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.fr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.it.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.ja.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.ko.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.pl.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.pt-BR.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.ru.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Compilers/CSharp/Portable/xlf/CSharpResources.tr.xlf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading