Skip to content

Commit 164ccfc

Browse files
authored
Merge pull request #50 from couchbaselabs/net10upgrade
NCBC-4085: Upgrade from net8 to net10
2 parents f0e2a6a + 42fc7fb commit 164ccfc

19 files changed

Lines changed: 544 additions & 435 deletions

Couchbase.Analytics.sln

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Couchbase.Analytics.Perform
2222
EndProject
2323
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fit", "fit", "{A58FEC0E-429F-460F-AF40-52DC21C93576}"
2424
EndProject
25-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Couchbase.Analytics.Performer.UnitTests", "fit\Couchbase.Analytics.Performer.UnitTests\Couchbase.Analytics.Performer.UnitTests.csproj", "{65B53BDA-D674-4CD8-A5DC-763A8F816F0B}"
26-
EndProject
2725
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Couchbase.Core", "src\Couchbase.Core\Couchbase.Core.csproj", "{0B9D51A9-E71B-4151-A177-73BE3BE34FCD}"
2826
EndProject
2927
Global
@@ -39,7 +37,6 @@ Global
3937
{3E0EE6AE-0579-4AFE-B4A1-14C6C72DF5F5} = {98962587-231C-4D1F-AC3D-4C21302C331B}
4038
{890378AD-7F74-4C86-923B-24DB7539574F} = {98962587-231C-4D1F-AC3D-4C21302C331B}
4139
{04159D2F-74A8-4200-818F-B279DBCBBC5A} = {A58FEC0E-429F-460F-AF40-52DC21C93576}
42-
{65B53BDA-D674-4CD8-A5DC-763A8F816F0B} = {A58FEC0E-429F-460F-AF40-52DC21C93576}
4340
{0B9D51A9-E71B-4151-A177-73BE3BE34FCD} = {50354FD0-1B81-4AAE-990A-80549EA6C4CF}
4441
EndGlobalSection
4542
GlobalSection(ProjectConfigurationPlatforms) = postSolution
@@ -59,10 +56,6 @@ Global
5956
{04159D2F-74A8-4200-818F-B279DBCBBC5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
6057
{04159D2F-74A8-4200-818F-B279DBCBBC5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
6158
{04159D2F-74A8-4200-818F-B279DBCBBC5A}.Release|Any CPU.Build.0 = Release|Any CPU
62-
{65B53BDA-D674-4CD8-A5DC-763A8F816F0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
63-
{65B53BDA-D674-4CD8-A5DC-763A8F816F0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
64-
{65B53BDA-D674-4CD8-A5DC-763A8F816F0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
65-
{65B53BDA-D674-4CD8-A5DC-763A8F816F0B}.Release|Any CPU.Build.0 = Release|Any CPU
6659
{0B9D51A9-E71B-4151-A177-73BE3BE34FCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6760
{0B9D51A9-E71B-4151-A177-73BE3BE34FCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
6861
{0B9D51A9-E71B-4151-A177-73BE3BE34FCD}.Release|Any CPU.ActiveCfg = Release|Any CPU

Directory.Packages.props

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,42 @@
77
<ItemGroup>
88
<PackageVersion Include="Contrib.Grpc.Core.M1" Version="2.46.7" />
99
<PackageVersion Include="Grpc.Core" Version="2.46.6" />
10-
<PackageVersion Include="Google.Protobuf" Version="3.31.1" />
10+
<PackageVersion Include="Google.Protobuf" Version="3.33.1" />
1111
<PackageVersion Include="Grpc.AspNetCore" Version="2.71.0" />
1212
<PackageVersion Include="Grpc.Net.Client" Version="2.71.0" />
13-
<PackageVersion Include="Grpc.Tools" Version="2.72.0" />
14-
<PackageVersion Include="Serilog" Version="3.1.1" />
15-
<PackageVersion Include="Serilog.Extensions.Logging" Version="8.0.0" />
16-
<PackageVersion Include="Serilog.Sinks.Console" Version="5.0.1" />
17-
<PackageVersion Include="Serilog.Sinks.File" Version="5.0.0" />
13+
<PackageVersion Include="Grpc.Tools" Version="2.76.0" />
14+
<PackageVersion Include="Serilog" Version="4.3.0" />
15+
<PackageVersion Include="Serilog.Extensions.Logging" Version="10.0.0" />
16+
<PackageVersion Include="Serilog.Sinks.Console" Version="6.1.1" />
17+
<PackageVersion Include="Serilog.Sinks.File" Version="7.0.0" />
1818
</ItemGroup>
1919
<!-- Performer -->
2020
<ItemGroup>
2121
<PackageVersion Include="DnsClient" Version="1.8.0" />
22-
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="9.0.5" />
23-
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.5" />
24-
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.5" />
25-
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.5" />
26-
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.5" />
27-
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
28-
<PackageVersion Include="System.Net.Http.Json" Version="9.0.6" />
22+
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="10.0.0" />
23+
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.0" />
24+
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="10.0.0" />
25+
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.0" />
26+
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.0" />
27+
<PackageVersion Include="System.Linq.AsyncEnumerable" Version="10.0.0" />
28+
<PackageVersion Include="System.Net.Http.Json" Version="10.0.0" />
2929
</ItemGroup>
3030
<ItemGroup>
31-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
31+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
3232
<PackageVersion Include="Moq" Version="4.20.72" />
3333
<PackageVersion Include="xunit" Version="2.9.3" />
3434
<PackageVersion Include="xunit.abstractions" Version="2.0.3" />
35-
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
35+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
3636
<PackageVersion Include="xunit.core" Version="2.9.3" />
3737
<PackageVersion Include="xunit.assert" Version="2.9.3" />
3838
<PackageVersion Include="xunit.extensibility.core" Version="2.9.3" />
3939
</ItemGroup>
40-
41-
<PropertyGroup>
42-
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
43-
</PropertyGroup>
44-
45-
<Target DependsOnTargets="ResolveReferences" Name="CopyProjectReferencesToPackage">
46-
<ItemGroup>
47-
<BuildOutputInPackage Include="@(ReferenceCopyLocalPaths->WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))"/>
48-
</ItemGroup>
49-
</Target>
40+
<PropertyGroup>
41+
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
42+
</PropertyGroup>
43+
<Target DependsOnTargets="ResolveReferences" Name="CopyProjectReferencesToPackage">
44+
<ItemGroup>
45+
<BuildOutputInPackage Include="@(ReferenceCopyLocalPaths-&gt;WithMetadataValue('ReferenceSourceTarget', 'ProjectReference'))" />
46+
</ItemGroup>
47+
</Target>
5048
</Project>

fit/Couchbase.Analytics.Performer.UnitTests/Couchbase.Analytics.Performer.UnitTests.csproj

Lines changed: 0 additions & 10 deletions
This file was deleted.

fit/Couchbase.Analytics.Performer.UnitTests/Program.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

fit/Couchbase.Analytics.Performer/Couchbase.Analytics.Performer.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net10.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<RootNamespace>Couchbase.Analytics.Performer</RootNamespace>

src/Couchbase.Analytics/Couchbase.Analytics.csproj

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<RootNamespace>Couchbase.AnalyticsClient</RootNamespace>
@@ -27,7 +27,7 @@
2727
<PackageReference Include="DnsClient" />
2828
<PackageReference Include="Microsoft.Extensions.Logging" />
2929
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
30-
<PackageReference Include="System.Linq.Async" />
30+
<PackageReference Include="System.Linq.AsyncEnumerable" />
3131
<PackageReference Include="System.Net.Http.Json" />
3232
</ItemGroup>
3333

@@ -41,15 +41,6 @@
4141
<IncludeAssets>Couchbase.Core.dll</IncludeAssets>
4242
</ProjectReference>
4343
</ItemGroup>
44-
45-
<ItemGroup>
46-
<Folder Include="Internal\Certificates\" />
47-
<Folder Include="Internal\Exceptions\" />
48-
<Folder Include="Internal\Options\" />
49-
<Folder Include="Internal\Query\" />
50-
<Folder Include="Public\" />
51-
<Folder Include="Retry\" />
52-
</ItemGroup>
5344

5445
<ItemGroup>
5546
<None Include="..\..\README.md" Pack="true" PackagePath="" />

src/Couchbase.Analytics/Internal/HTTP/CouchbaseHttpClientFactory.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,7 @@ private void ConfigureDnsResolverCallback(SocketsHttpHandler handler)
124124
var connector = new DnsEndpointConnector(
125125
new CountBasedDnsRefreshStrategy(1), // Refresh DNS entries on every request
126126
_timeoutOptions.ConnectTimeout,
127-
EndpointSelectionMode.RandomFromUnusedEndpoints
128-
);
127+
EndpointSelectionMode.RandomFromUnusedEndpoints);
129128

130129
handler.ConnectCallback = async (context, cancellation) =>
131130
{
@@ -142,5 +141,4 @@ public HttpClient Create()
142141
}
143142

144143
public HttpCompletionOption DefaultCompletionOption { get; set; } = HttpCompletionOption.ResponseHeadersRead;
145-
146144
}

src/Couchbase.Core/Couchbase.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
</PropertyGroup>
Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
using Couchbase.AnalyticsClient.FunctionalTests.Fixtures;
2-
using Xunit;
3-
using Xunit.Abstractions;
4-
5-
namespace Couchbase.AnalyticsClient.FunctionalTests;
6-
7-
[Collection(TestCollection.Name)]
8-
public class ClusterTests
9-
{
10-
private readonly ITestOutputHelper _output;
11-
private readonly Analytics2Fixture _fixture;
12-
13-
public ClusterTests(ITestOutputHelper output, Analytics2Fixture fixture)
14-
{
15-
_output = output;
16-
_fixture = fixture;
17-
}
18-
19-
[Fact]
20-
public async Task Test_QueryAsync()
21-
{
22-
var cluster = _fixture.Cluster;
23-
24-
using var response = await cluster.ExecuteQueryAsync("SELECT 1;", options => options.WithAsStreaming(true));
25-
26-
Assert.NotNull(response);
27-
}
1+
using Couchbase.AnalyticsClient.FunctionalTests.Fixtures;
2+
using Xunit;
3+
using Xunit.Abstractions;
4+
5+
namespace Couchbase.AnalyticsClient.FunctionalTests;
6+
7+
[Collection(SimpleCollection.Name)]
8+
public class ClusterTests
9+
{
10+
private readonly ITestOutputHelper _output;
11+
private readonly SimpleFixture _fixture;
12+
13+
public ClusterTests(ITestOutputHelper output, SimpleFixture fixture)
14+
{
15+
_output = output;
16+
_fixture = fixture;
17+
}
18+
19+
[Fact]
20+
public async Task Test_QueryAsync()
21+
{
22+
var cluster = _fixture.Cluster;
23+
24+
using var response = await cluster.ExecuteQueryAsync("SELECT 1;", options => options.WithAsStreaming(true));
25+
26+
Assert.NotNull(response);
27+
}
2828
}

tests/Couchbase.Analytics.FunctionalTests/Couchbase.Analytics.FunctionalTests.csproj

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<AssemblyName>Couchbase.AnalyticsClient.FunctionalTests</AssemblyName>
@@ -14,6 +14,13 @@
1414
<ProjectReference Include="..\..\src\Couchbase.Analytics\Couchbase.Analytics.csproj" />
1515
</ItemGroup>
1616

17+
<!--This disables parallism in the test suite and bugs that occur when too much is written to the console -->
18+
<ItemGroup>
19+
<None Update="xunit.runner.json">
20+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
21+
</None>
22+
</ItemGroup>
23+
1724
<ItemGroup>
1825
<PackageReference Include="Microsoft.Extensions.Configuration" />
1926
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" />
@@ -22,7 +29,10 @@
2229
<PackageReference Include="Moq" />
2330
<PackageReference Include="xunit" />
2431
<PackageReference Include="xunit.abstractions" />
25-
<PackageReference Include="xunit.runner.visualstudio" />
32+
<PackageReference Include="xunit.runner.visualstudio">
33+
<PrivateAssets>all</PrivateAssets>
34+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
35+
</PackageReference>
2636
</ItemGroup>
2737

2838
<ItemGroup>

0 commit comments

Comments
 (0)