This is an automated email from the ASF dual-hosted git repository.
curth pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git
The following commit(s) were added to refs/heads/main by this push:
new 73b8bda20 feat(csharp): Move more options to be set centrally and
enable TreatWarningsAsErrors (#1852)
73b8bda20 is described below
commit 73b8bda2050f7dc9f90dccff6204cfa413a50467
Author: Curt Hagenlocher <[email protected]>
AuthorDate: Mon May 13 09:56:34 2024 -0700
feat(csharp): Move more options to be set centrally and enable
TreatWarningsAsErrors (#1852)
Closes #1851
---
csharp/Directory.Build.props | 4 ++++
csharp/src/Apache.Arrow.Adbc/Apache.Arrow.Adbc.csproj | 1 -
csharp/src/Client/Apache.Arrow.Adbc.Client.csproj | 1 -
csharp/src/Drivers/Apache/Apache.Arrow.Adbc.Drivers.Apache.csproj | 1 -
.../src/Drivers/BigQuery/Apache.Arrow.Adbc.Drivers.BigQuery.csproj | 1 -
.../src/Drivers/FlightSql/Apache.Arrow.Adbc.Drivers.FlightSql.csproj | 5 ++---
.../Snowflake/Apache.Arrow.Adbc.Drivers.Interop.Snowflake.csproj | 1 -
csharp/test/Apache.Arrow.Adbc.Tests/Apache.Arrow.Adbc.Tests.csproj | 4 ----
.../Drivers/Apache/Apache.Arrow.Adbc.Tests.Drivers.Apache.csproj | 2 --
.../Drivers/BigQuery/Apache.Arrow.Adbc.Tests.Drivers.BigQuery.csproj | 2 --
.../FlightSql/Apache.Arrow.Adbc.Tests.Drivers.FlightSql.csproj | 3 ---
.../Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake.csproj | 2 --
.../Apache.Arrow.Adbc.SmokeTests/Apache.Arrow.Adbc.SmokeTests.csproj | 4 ----
.../BigQuery/Apache.Arrow.Adbc.SmokeTests.Drivers.BigQuery.csproj | 2 --
.../FlightSql/Apache.Arrow.Adbc.SmokeTests.Drivers.FlightSql.csproj | 3 ---
.../Apache.Arrow.Adbc.SmokeTests.Drivers.Interop.Snowflake.csproj | 2 --
16 files changed, 6 insertions(+), 32 deletions(-)
diff --git a/csharp/Directory.Build.props b/csharp/Directory.Build.props
index 85af5403c..187d6eb13 100644
--- a/csharp/Directory.Build.props
+++ b/csharp/Directory.Build.props
@@ -37,6 +37,10 @@
<LangVersion>latest</LangVersion>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(CSharpDir)ApacheArrow.snk</AssemblyOriginatorKeyFile>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ <Nullable>enable</Nullable>
+ <ImplicitUsings>disable</ImplicitUsings>
+ <IsWindows
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
== 'true'">true</IsWindows>
</PropertyGroup>
<!-- NuGet properties -->
diff --git a/csharp/src/Apache.Arrow.Adbc/Apache.Arrow.Adbc.csproj
b/csharp/src/Apache.Arrow.Adbc/Apache.Arrow.Adbc.csproj
index 48c2d78e9..1dc9c72f7 100644
--- a/csharp/src/Apache.Arrow.Adbc/Apache.Arrow.Adbc.csproj
+++ b/csharp/src/Apache.Arrow.Adbc/Apache.Arrow.Adbc.csproj
@@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <Nullable>enable</Nullable>
<PackageReadmeFile>readme.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
diff --git a/csharp/src/Client/Apache.Arrow.Adbc.Client.csproj
b/csharp/src/Client/Apache.Arrow.Adbc.Client.csproj
index 273fea83e..ced800c66 100644
--- a/csharp/src/Client/Apache.Arrow.Adbc.Client.csproj
+++ b/csharp/src/Client/Apache.Arrow.Adbc.Client.csproj
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
- <Nullable>enable</Nullable>
<PackageReadmeFile>readme.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
diff --git a/csharp/src/Drivers/Apache/Apache.Arrow.Adbc.Drivers.Apache.csproj
b/csharp/src/Drivers/Apache/Apache.Arrow.Adbc.Drivers.Apache.csproj
index ab50092e5..3c72dfb66 100644
--- a/csharp/src/Drivers/Apache/Apache.Arrow.Adbc.Drivers.Apache.csproj
+++ b/csharp/src/Drivers/Apache/Apache.Arrow.Adbc.Drivers.Apache.csproj
@@ -2,7 +2,6 @@
<PropertyGroup>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
- <Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git
a/csharp/src/Drivers/BigQuery/Apache.Arrow.Adbc.Drivers.BigQuery.csproj
b/csharp/src/Drivers/BigQuery/Apache.Arrow.Adbc.Drivers.BigQuery.csproj
index a03bdcdc2..28259e374 100644
--- a/csharp/src/Drivers/BigQuery/Apache.Arrow.Adbc.Drivers.BigQuery.csproj
+++ b/csharp/src/Drivers/BigQuery/Apache.Arrow.Adbc.Drivers.BigQuery.csproj
@@ -2,7 +2,6 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<PackageReadmeFile>readme.md</PackageReadmeFile>
- <Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="7.0.0"
Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'" />
diff --git
a/csharp/src/Drivers/FlightSql/Apache.Arrow.Adbc.Drivers.FlightSql.csproj
b/csharp/src/Drivers/FlightSql/Apache.Arrow.Adbc.Drivers.FlightSql.csproj
index 52012a85b..f4b68fe6a 100644
--- a/csharp/src/Drivers/FlightSql/Apache.Arrow.Adbc.Drivers.FlightSql.csproj
+++ b/csharp/src/Drivers/FlightSql/Apache.Arrow.Adbc.Drivers.FlightSql.csproj
@@ -1,13 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
- <Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Net.Http.WinHttpHandler" Version="7.0.0"
Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard'" />
<PackageReference Include="Apache.Arrow.Flight" Version="15.0.2" />
-</ItemGroup>
+ </ItemGroup>
<ItemGroup>
<ProjectReference
Include="..\..\Apache.Arrow.Adbc\Apache.Arrow.Adbc.csproj" />
-</ItemGroup>
+ </ItemGroup>
</Project>
diff --git
a/csharp/src/Drivers/Interop/Snowflake/Apache.Arrow.Adbc.Drivers.Interop.Snowflake.csproj
b/csharp/src/Drivers/Interop/Snowflake/Apache.Arrow.Adbc.Drivers.Interop.Snowflake.csproj
index 6232857f0..cb810a99b 100644
---
a/csharp/src/Drivers/Interop/Snowflake/Apache.Arrow.Adbc.Drivers.Interop.Snowflake.csproj
+++
b/csharp/src/Drivers/Interop/Snowflake/Apache.Arrow.Adbc.Drivers.Interop.Snowflake.csproj
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net472;net6.0</TargetFrameworks>
- <Nullable>enable</Nullable>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<IsPackagingPipeline Condition="'$(IsPackagingPipeline)' == ''">
false
diff --git a/csharp/test/Apache.Arrow.Adbc.Tests/Apache.Arrow.Adbc.Tests.csproj
b/csharp/test/Apache.Arrow.Adbc.Tests/Apache.Arrow.Adbc.Tests.csproj
index 0d0b80423..12bfa4f5a 100644
--- a/csharp/test/Apache.Arrow.Adbc.Tests/Apache.Arrow.Adbc.Tests.csproj
+++ b/csharp/test/Apache.Arrow.Adbc.Tests/Apache.Arrow.Adbc.Tests.csproj
@@ -1,14 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <IsWindows
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
== 'true'">true</IsWindows>
<TargetFrameworks
Condition="'$(IsWindows)'=='true'">net8.0;net472</TargetFrameworks>
<TargetFrameworks
Condition="'$(TargetFrameworks)'==''">net8.0</TargetFrameworks>
- <ImplicitUsings>disable</ImplicitUsings>
- <Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
- <SignAssembly>True</SignAssembly>
<ProcessArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</ProcessArchitecture>
</PropertyGroup>
diff --git
a/csharp/test/Drivers/Apache/Apache.Arrow.Adbc.Tests.Drivers.Apache.csproj
b/csharp/test/Drivers/Apache/Apache.Arrow.Adbc.Tests.Drivers.Apache.csproj
index 06d430d1c..2af63689f 100644
--- a/csharp/test/Drivers/Apache/Apache.Arrow.Adbc.Tests.Drivers.Apache.csproj
+++ b/csharp/test/Drivers/Apache/Apache.Arrow.Adbc.Tests.Drivers.Apache.csproj
@@ -1,10 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <IsWindows
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
== 'true'">true</IsWindows>
<TargetFrameworks
Condition="'$(IsWindows)'=='true'">net8.0;net472</TargetFrameworks>
<TargetFrameworks
Condition="'$(TargetFrameworks)'==''">net8.0</TargetFrameworks>
- <Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
diff --git
a/csharp/test/Drivers/BigQuery/Apache.Arrow.Adbc.Tests.Drivers.BigQuery.csproj
b/csharp/test/Drivers/BigQuery/Apache.Arrow.Adbc.Tests.Drivers.BigQuery.csproj
index 194ff2334..a6f7f1a8e 100644
---
a/csharp/test/Drivers/BigQuery/Apache.Arrow.Adbc.Tests.Drivers.BigQuery.csproj
+++
b/csharp/test/Drivers/BigQuery/Apache.Arrow.Adbc.Tests.Drivers.BigQuery.csproj
@@ -1,9 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <IsWindows
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
== 'true'">true</IsWindows>
<TargetFrameworks
Condition="'$(IsWindows)'=='true'">net8.0;net472</TargetFrameworks>
<TargetFrameworks
Condition="'$(TargetFrameworks)'==''">net8.0</TargetFrameworks>
- <Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
diff --git
a/csharp/test/Drivers/FlightSql/Apache.Arrow.Adbc.Tests.Drivers.FlightSql.csproj
b/csharp/test/Drivers/FlightSql/Apache.Arrow.Adbc.Tests.Drivers.FlightSql.csproj
index 1f8306137..e63c9dbdc 100644
---
a/csharp/test/Drivers/FlightSql/Apache.Arrow.Adbc.Tests.Drivers.FlightSql.csproj
+++
b/csharp/test/Drivers/FlightSql/Apache.Arrow.Adbc.Tests.Drivers.FlightSql.csproj
@@ -1,10 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <IsWindows
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
== 'true'">true</IsWindows>
<TargetFrameworks
Condition="'$(IsWindows)'=='true'">net8.0;net472</TargetFrameworks>
<TargetFrameworks
Condition="'$(TargetFrameworks)'==''">net8.0</TargetFrameworks>
- <ImplicitUsings>disable</ImplicitUsings>
- <Nullable>enable</Nullable>
<SignAssembly>False</SignAssembly>
</PropertyGroup>
<ItemGroup>
diff --git
a/csharp/test/Drivers/Interop/Snowflake/Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake.csproj
b/csharp/test/Drivers/Interop/Snowflake/Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake.csproj
index d00af50ba..6a03c6499 100644
---
a/csharp/test/Drivers/Interop/Snowflake/Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake.csproj
+++
b/csharp/test/Drivers/Interop/Snowflake/Apache.Arrow.Adbc.Tests.Drivers.Interop.Snowflake.csproj
@@ -1,9 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <IsWindows
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
== 'true'">true</IsWindows>
<TargetFrameworks
Condition="'$(IsWindows)'=='true'">net8.0;net472</TargetFrameworks>
<TargetFrameworks
Condition="'$(TargetFrameworks)'==''">net8.0</TargetFrameworks>
- <Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<None Remove="Resources\SnowflakeConstraints.sql" />
diff --git
a/csharp/test/SmokeTests/Apache.Arrow.Adbc.SmokeTests/Apache.Arrow.Adbc.SmokeTests.csproj
b/csharp/test/SmokeTests/Apache.Arrow.Adbc.SmokeTests/Apache.Arrow.Adbc.SmokeTests.csproj
index 2c4145286..f5c5ef8ba 100644
---
a/csharp/test/SmokeTests/Apache.Arrow.Adbc.SmokeTests/Apache.Arrow.Adbc.SmokeTests.csproj
+++
b/csharp/test/SmokeTests/Apache.Arrow.Adbc.SmokeTests/Apache.Arrow.Adbc.SmokeTests.csproj
@@ -2,14 +2,10 @@
<Import Project="..\Build.props" />
<PropertyGroup>
- <IsWindows
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
== 'true'">true</IsWindows>
<TargetFrameworks
Condition="'$(IsWindows)'=='true'">net8.0;net472</TargetFrameworks>
<TargetFrameworks
Condition="'$(TargetFrameworks)'==''">net8.0</TargetFrameworks>
- <Nullable>enable</Nullable>
- <ImplicitUsings>disable</ImplicitUsings>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
- <SignAssembly>True</SignAssembly>
</PropertyGroup>
<ItemGroup>
diff --git
a/csharp/test/SmokeTests/BigQuery/Apache.Arrow.Adbc.SmokeTests.Drivers.BigQuery.csproj
b/csharp/test/SmokeTests/BigQuery/Apache.Arrow.Adbc.SmokeTests.Drivers.BigQuery.csproj
index 7e335da5b..94ff226bd 100644
---
a/csharp/test/SmokeTests/BigQuery/Apache.Arrow.Adbc.SmokeTests.Drivers.BigQuery.csproj
+++
b/csharp/test/SmokeTests/BigQuery/Apache.Arrow.Adbc.SmokeTests.Drivers.BigQuery.csproj
@@ -1,10 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\Build.props" />
<PropertyGroup>
- <IsWindows
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
== 'true'">true</IsWindows>
<TargetFrameworks
Condition="'$(IsWindows)'=='true'">net8.0;net472</TargetFrameworks>
<TargetFrameworks
Condition="'$(TargetFrameworks)'==''">net8.0</TargetFrameworks>
- <Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\Drivers\BigQuery\BigQueryData.cs"
Link="BigQueryData.cs" />
diff --git
a/csharp/test/SmokeTests/FlightSql/Apache.Arrow.Adbc.SmokeTests.Drivers.FlightSql.csproj
b/csharp/test/SmokeTests/FlightSql/Apache.Arrow.Adbc.SmokeTests.Drivers.FlightSql.csproj
index 2e5c1bdbf..4dd855bac 100644
---
a/csharp/test/SmokeTests/FlightSql/Apache.Arrow.Adbc.SmokeTests.Drivers.FlightSql.csproj
+++
b/csharp/test/SmokeTests/FlightSql/Apache.Arrow.Adbc.SmokeTests.Drivers.FlightSql.csproj
@@ -1,10 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <IsWindows
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
== 'true'">true</IsWindows>
<TargetFrameworks
Condition="'$(IsWindows)'=='true'">net8.0;net472</TargetFrameworks>
<TargetFrameworks
Condition="'$(TargetFrameworks)'==''">net8.0</TargetFrameworks>
- <Nullable>enable</Nullable>
- <ImplicitUsings>disable</ImplicitUsings>
<SignAssembly>False</SignAssembly>
</PropertyGroup>
<ItemGroup>
diff --git
a/csharp/test/SmokeTests/Interop/Snowflake/Apache.Arrow.Adbc.SmokeTests.Drivers.Interop.Snowflake.csproj
b/csharp/test/SmokeTests/Interop/Snowflake/Apache.Arrow.Adbc.SmokeTests.Drivers.Interop.Snowflake.csproj
index 16de024ab..66b4bcdd0 100644
---
a/csharp/test/SmokeTests/Interop/Snowflake/Apache.Arrow.Adbc.SmokeTests.Drivers.Interop.Snowflake.csproj
+++
b/csharp/test/SmokeTests/Interop/Snowflake/Apache.Arrow.Adbc.SmokeTests.Drivers.Interop.Snowflake.csproj
@@ -1,10 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Build.props" />
<PropertyGroup>
- <IsWindows
Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))'
== 'true'">true</IsWindows>
<TargetFrameworks
Condition="'$(IsWindows)'=='true'">net8.0;net472</TargetFrameworks>
<TargetFrameworks
Condition="'$(TargetFrameworks)'==''">net8.0</TargetFrameworks>
- <Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\..\..\Drivers\Interop\Snowflake\ClientTests.cs"
Link="ClientTests.cs" />