Add infra to specify custom repo nowarns to eliminate patches (#14923)
This commit is contained in:
parent
0576e20e69
commit
24b8e5cb83
5 changed files with 12 additions and 53 deletions
|
@ -85,11 +85,11 @@
|
||||||
NewText="/p:RepoRoot="$repo_root/"" />
|
NewText="/p:RepoRoot="$repo_root/"" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="AddCommonNoWarns"
|
<Target Name="AddNoWarns"
|
||||||
BeforeTargets="Build"
|
BeforeTargets="Build"
|
||||||
Condition=" EXISTS('$(ProjectDirectory)Directory.Build.props') OR EXISTS('$(ProjectDirectory)src/Directory.Build.props') "
|
Condition=" EXISTS('$(ProjectDirectory)Directory.Build.props') OR EXISTS('$(ProjectDirectory)src/Directory.Build.props') "
|
||||||
Inputs="$(MSBuildProjectFullPath)"
|
Inputs="$(MSBuildProjectFullPath)"
|
||||||
Outputs="$(RepoCompletedSemaphorePath)AddCommonNoWarns.complete" >
|
Outputs="$(RepoCompletedSemaphorePath)AddNoWarns.complete" >
|
||||||
|
|
||||||
<!-- Don't warn on warnings that can be generated in source-build
|
<!-- Don't warn on warnings that can be generated in source-build
|
||||||
but not necessarily in repo builds.
|
but not necessarily in repo builds.
|
||||||
|
@ -104,7 +104,7 @@
|
||||||
<OldText><![CDATA[</Project>]]></OldText>
|
<OldText><![CDATA[</Project>]]></OldText>
|
||||||
<NewText>
|
<NewText>
|
||||||
<![CDATA[ <PropertyGroup>
|
<![CDATA[ <PropertyGroup>
|
||||||
<NoWarn>%24(NoWarn);NU5104;NU1603</NoWarn>
|
<NoWarn>%24(NoWarn);NU5104;NU1603;$(RepoNoWarns)</NoWarn>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>]]>
|
</Project>]]>
|
||||||
</NewText>
|
</NewText>
|
||||||
|
|
|
@ -21,6 +21,11 @@
|
||||||
|
|
||||||
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
|
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
|
||||||
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
|
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
|
||||||
|
|
||||||
|
<!-- CS0618 - Caused from deprecated IOperation.Children in
|
||||||
|
Microsoft.CodeAnalysis 4.3.0, but aspnetcore references version 4.2.0.
|
||||||
|
Requires https://github.com/dotnet/source-build/issues/2482 -->
|
||||||
|
<RepoNoWarns>CS0618</RepoNoWarns>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
|
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
|
||||||
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
|
<NuGetConfigFile>$(ProjectDirectory)NuGet.config</NuGetConfigFile>
|
||||||
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
|
<OutputPlacementRepoApiImplemented>false</OutputPlacementRepoApiImplemented>
|
||||||
|
|
||||||
|
<!-- NU1507 - https://github.com/dotnet/razor-compiler/issues/242
|
||||||
|
Occurs when using NuGet central package management without defining any Package Source Mappings. -->
|
||||||
|
<RepoNoWarns>NU1507</RepoNoWarns>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Logan Bussell <loganbussell@microsoft.com>
|
|
||||||
Date: Thu, 12 May 2022 14:32:59 -0700
|
|
||||||
Subject: [PATCH] Disable warning CS0618
|
|
||||||
|
|
||||||
This is needed because IOperation.Children is deprecated in
|
|
||||||
Microsoft.CodeAnalysis 4.3.0, but aspnetcore references version 4.2.0.
|
|
||||||
|
|
||||||
Requires https://github.com/dotnet/source-build/issues/2482 in order to eliminate this patch
|
|
||||||
---
|
|
||||||
.../src/Microsoft.AspNetCore.Mvc.Api.Analyzers.csproj | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.csproj b/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.csproj
|
|
||||||
index 0b94ad2a8f..1b5cb9d907 100644
|
|
||||||
--- a/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.csproj
|
|
||||||
+++ b/src/Mvc/Mvc.Api.Analyzers/src/Microsoft.AspNetCore.Mvc.Api.Analyzers.csproj
|
|
||||||
@@ -9,6 +9,7 @@
|
|
||||||
<IncludeBuildOutput>false</IncludeBuildOutput>
|
|
||||||
<GenerateDocumentationFile>false</GenerateDocumentationFile>
|
|
||||||
<NuspecFile>$(MSBuildProjectName).nuspec</NuspecFile>
|
|
||||||
+ <NoWarn>$(NoWarn);CS0618</NoWarn>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
|
@ -1,25 +0,0 @@
|
||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Logan Bussell <loganbussell@microsoft.com>
|
|
||||||
Date: Fri, 13 May 2022 16:14:14 -0700
|
|
||||||
Subject: [PATCH] Add NoWarn for NU1507
|
|
||||||
|
|
||||||
This warning occurs when using NuGet central package management without defining
|
|
||||||
any Package Source Mappings.
|
|
||||||
|
|
||||||
Workaround for: https://github.com/dotnet/razor-compiler/issues/242
|
|
||||||
---
|
|
||||||
Directory.Build.props | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/Directory.Build.props b/Directory.Build.props
|
|
||||||
index a57125f5..019ac376 100644
|
|
||||||
--- a/Directory.Build.props
|
|
||||||
+++ b/Directory.Build.props
|
|
||||||
@@ -55,6 +55,7 @@
|
|
||||||
<!-- Ensure API docs are available. -->
|
|
||||||
<NoWarn>$(NoWarn.Replace('1591', ''))</NoWarn>
|
|
||||||
<NoWarn Condition=" '$(BuildingInsideVisualStudio)' == 'true' ">$(NoWarn);0105</NoWarn>
|
|
||||||
+ <NoWarn>$(NoWarn);NU1507</NoWarn>
|
|
||||||
|
|
||||||
<!-- For local builds, don't make missing XML docs a fatal build error, but still surface so we have visibility into undocumented APIs. -->
|
|
||||||
<WarningsNotAsErrors Condition=" '$(ContinuousIntegrationBuild)' != 'true' ">$(WarningsNotAsErrors);CS1591</WarningsNotAsErrors>
|
|
Loading…
Add table
Add a link
Reference in a new issue