Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .build/Build.Publish.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// IEnumerable<string> ChangelogSectionNotes => ExtractChangelogSectionNotes(ChangelogFile);
[Parameter("NuGet Source for Packages")] readonly string NuGetSource = "https://api.nuget.org/v3/index.json";
[Parameter("NuGet Api Key")] readonly string NuGetApiKey;
[Parameter("NuGet Source for Packages")] readonly string MyGetSource = "https://www.myget.org/F/hotchocolate/api/v3/index.json";

Check warning on line 17 in .build/Build.Publish.cs

View workflow job for this annotation

GitHub Actions / Generate Test Matrix

The field 'Build.MyGetSource' is assigned but its value is never used
[Parameter("MyGet Api Key")] readonly string MyGetApiKey;

Target PublishAot => _ => _
Expand All @@ -26,7 +26,7 @@
.SetProject("src/Nitro/CommandLine/src/CommandLine")
.SetOutput(PublishDirectory)
.SetRuntime(RuntimeIdentifier)
.SetFramework("net10.0")
.SetFramework("net11.0")
.SetConfiguration(Configuration)
.SetSelfContained(true)
.SetInformationalVersion(SemVersion)
Expand All @@ -37,7 +37,7 @@
.SetProperty("NitroIdentityClientId", NitroIdentityClientId)
.SetProperty("NitroIdentityScopes", NitroIdentityScopes)
.SetProperty("PublishAot", true)
.SetProperty("TargetFrameworks", "net10.0")
.SetProperty("TargetFrameworks", "net11.0")
.SetProperty("RuntimeIdentifiers", RuntimeIdentifier));
});

Expand Down
2 changes: 1 addition & 1 deletion .build/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static IReadOnlyCollection<Output> DotNetBuildSonarSolution(

var projectsArg = string.Join(" ", projects.Select(t => $"\"{t}\""));

list.AddRange(DotNetTasks.DotNet($"sln \"{solutionFile}\" add {projectsArg}", workingDirectory));
list.AddRange(DotNetTasks.DotNet($"sln \"{solutionFile}\" add {projectsArg} --include-references false", workingDirectory));
Comment thread
glen-84 marked this conversation as resolved.

return list;
}
Expand Down
5 changes: 2 additions & 3 deletions .devcontainer/backend/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ EXPOSE 22
# Start SSH service
CMD ["/usr/sbin/sshd", "-D"]

# Install .NET SDKs (6, 7, 8, 9, and 10)
# Install .NET SDKs (8, 9, 10, and 11)
RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --channel 6.0 --install-dir /usr/share/dotnet \
&& ./dotnet-install.sh --channel 7.0 --install-dir /usr/share/dotnet \
&& ./dotnet-install.sh --channel 8.0 --install-dir /usr/share/dotnet \
&& ./dotnet-install.sh --channel 9.0 --install-dir /usr/share/dotnet \
&& ./dotnet-install.sh --channel 10.0 --install-dir /usr/share/dotnet \
&& ./dotnet-install.sh --channel 11.0 --install-dir /usr/share/dotnet \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet

# Install Node.js LTS
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jobs:
echo "Installing .NET..."
curl -sSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh
chmod +x dotnet-install.sh
./dotnet-install.sh --channel 10.0 --install-dir $HOME/.dotnet
./dotnet-install.sh --channel 11.0 --install-dir $HOME/.dotnet
rm dotnet-install.sh
echo "$HOME/.dotnet" >> $GITHUB_PATH
export PATH="$HOME/.dotnet:$PATH"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.x
dotnet-version: 11.x
Comment thread
glen-84 marked this conversation as resolved.

- name: Generate Test Matrix
run: dotnet run --project ./.build -- GenerateMatrix
Expand Down Expand Up @@ -199,10 +199,11 @@ jobs:
8.x
9.x
10.x
11.x

- name: Run Build
id: run-build
run: dotnet build ${{ matrix.path }} --framework net10.0 --verbosity q
run: dotnet build ${{ matrix.path }} --framework net11.0 --verbosity q
Comment thread
glen-84 marked this conversation as resolved.
timeout-minutes: 5

- name: Log in to Docker Hub
Expand All @@ -223,7 +224,7 @@ jobs:
run: >
dotnet test ${{ matrix.path }}
--collect:"XPlat Code Coverage;Format=opencover"
--framework net10.0
--framework net11.0
Comment thread
glen-84 marked this conversation as resolved.
--logger trx
--no-build
--
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
8.x
9.x
10.x
11.x

- name: Generate Test Matrix
run: dotnet run --project ./.build -- GenerateMatrix
Expand Down Expand Up @@ -68,10 +69,11 @@ jobs:
8.x
9.x
10.x
11.x

- name: Run Build
id: run-build
run: dotnet build ${{ matrix.path }} --framework net10.0 --verbosity q
run: dotnet build ${{ matrix.path }} --framework net11.0 --verbosity q
timeout-minutes: 5

- name: Log in to Docker Hub
Expand All @@ -87,7 +89,7 @@ jobs:
run: >
dotnet test ${{ matrix.path }}
--collect:"XPlat Code Coverage;Format=opencover"
--framework net10.0
--framework net11.0
--logger trx
--no-build
--verbosity q
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
8.x
9.x
10.x
11.x

- name: 🏷 Get the version from tag
run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
Expand Down Expand Up @@ -127,7 +128,7 @@ jobs:
- name: 🛠 Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.x
dotnet-version: 11.x

- name: 🏷 Get the version from tag (Windows)
if: runner.os == 'Windows'
Expand Down
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ else
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "8.0.416" --no-path
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "9.0.308" --no-path
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "10.0.102" --no-path
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "11.0.100-preview.2.26159.112" --no-path

# If global.json exists, load expected version
if [[ -f "$DOTNET_GLOBAL_FILE" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "10.0.102",
"version": "11.0.100-preview.2.26159.112",
Comment thread
glen-84 marked this conversation as resolved.
"rollForward": "latestMinor"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<ItemGroup>
<!-- Package the generator in the analyzer directory of the nuget package -->
<None Include="$(OutputPath)\net10.0\CookieCrumble.Analyzers.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
<None Include="$(OutputPath)\net11.0\CookieCrumble.Analyzers.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
Comment thread
glen-84 marked this conversation as resolved.
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<ItemGroup>
<!-- Package the generator in the analyzer directory of the nuget package -->
<None Include="$(OutputPath)\net10.0\CookieCrumble.Analyzers.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
<None Include="$(OutputPath)\net11.0\CookieCrumble.Analyzers.dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>

</Project>
47 changes: 44 additions & 3 deletions src/CookieCrumble/src/CookieCrumble/Utilities/TestEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,64 @@ namespace CookieCrumble;
/// </summary>
public static class TestEnvironment
{
// ReSharper disable InconsistentNaming
public const string NET8_0 = "NET8_0";
public const string NET9_0 = "NET9_0";
public const string NET10_0 = "NET10_0";
public const string NET11_0 = "NET11_0";
// ReSharper restore InconsistentNaming

#if NET8_0
/// <summary>
/// The target framework identifier.
/// </summary>
public const string TargetFramework = "NET8_0";
public const string TargetFramework = NET8_0;
#elif NET9_0
/// <summary>
/// The target framework identifier.
/// </summary>
public const string TargetFramework = "NET9_0";
public const string TargetFramework = NET9_0;
#elif NET10_0
/// <summary>
/// The target framework identifier.
/// </summary>
public const string TargetFramework = "NET10_0";
public const string TargetFramework = NET10_0;
#elif NET11_0
/// <summary>
/// The target framework identifier.
/// </summary>
public const string TargetFramework = NET11_0;
#endif

/// <summary>
/// Returns a postfix for the snapshot name based on the target framework.
/// </summary>
/// <example>
/// <c>Postfix(["NET8_0", "NET9_0"], ["NET10_0"])</c> will return <c>"NET8_0_NET9_0"</c> if the target framework is
/// <c>NET8_0</c> or <c>NET9_0</c>, <c>"NET10_0"</c> if the target framework is <c>NET10_0</c>, or <c>null</c> if
/// the target framework is <c>NET11_0</c>.
/// </example>
/// <param name="targetFrameworkGroups">
/// A list of target framework groups. Each group is a list of target frameworks that should share the same snapshot
/// postfix.
/// </param>
/// <returns>
/// A postfix for the snapshot name based on the target framework, or null if the target framework does not match
/// any group.
/// </returns>
public static string? Postfix(params string[][] targetFrameworkGroups)
{
foreach (var group in targetFrameworkGroups)
{
if (group.Contains(TargetFramework))
{
return string.Join("_", group);
}
}

return null;
}

public static bool IsLocalEnvironment()
{
return !IsCIEnvironment();
Expand Down
11 changes: 8 additions & 3 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
<NeutralLanguage>en</NeutralLanguage>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net11.0'">
<EnablePreviewFeatures>true</EnablePreviewFeatures>
<Features>$(Features);runtime-async=on</Features>
</PropertyGroup>

<PropertyGroup Condition="'$(TreatWarningsAsErrors)' == ''">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsNotAsErrors>NU1901;NU1902;NU1903;NU1904;ASPDEPR004;ASPDEPR008</WarningsNotAsErrors>
Expand Down Expand Up @@ -44,9 +49,9 @@
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>net10.0; net9.0; net8.0</TargetFrameworks>
<ExtendedTargetFrameworks>net10.0; net9.0; net8.0; netstandard2.0</ExtendedTargetFrameworks>
<OpenApiTargetFrameworks>net10.0; net9.0</OpenApiTargetFrameworks>
<TargetFrameworks>net11.0; net10.0; net9.0; net8.0</TargetFrameworks>
<ExtendedTargetFrameworks>net11.0; net10.0; net9.0; net8.0; netstandard2.0</ExtendedTargetFrameworks>
<OpenApiTargetFrameworks>net11.0; net10.0; net9.0</OpenApiTargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down
37 changes: 34 additions & 3 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
<PackageVersion Include="Aspire.Hosting.PostgreSQL" Version="13.1.2" />
<PackageVersion Include="Aspire.Hosting" Version="13.1.2" />
<PackageVersion Include="Azure.Storage.Blobs" Version="12.23.0" />
<PackageVersion Include="Basic.Reference.Assemblies.Net100" Version="1.8.3" />
<PackageVersion Include="Basic.Reference.Assemblies.Net80" Version="1.8.3" />
<PackageVersion Include="Basic.Reference.Assemblies.Net90" Version="1.8.3" />
<PackageVersion Include="Basic.Reference.Assemblies.Net110" Version="1.8.5" />
<PackageVersion Include="Basic.Reference.Assemblies.Net100" Version="1.8.5" />
<PackageVersion Include="Basic.Reference.Assemblies.Net80" Version="1.8.5" />
<PackageVersion Include="Basic.Reference.Assemblies.Net90" Version="1.8.5" />
<PackageVersion Include="BenchmarkDotNet" Version="0.15.4" />
<PackageVersion Include="CaseConverter" Version="2.0.1" />
<PackageVersion Include="ChilliCream.ModelContextProtocol.AspNetCore" Version="1.2.0" />
Expand Down Expand Up @@ -82,6 +83,36 @@
<PackageVersion Include="xunit.v3" Version="3.2.2" />
<PackageVersion Include="xunit" Version="2.9.3" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net11.0'">
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.AspNetCore.TestHost" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.AspNetCore.WebUtilities" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.Data.Sqlite.Core" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.Extensions.ObjectPool" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.Net.Http.Headers" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Microsoft.AspNetCore.HeaderPropagation" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="11.0.0-preview.2" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite" Version="11.0.0-preview.2" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL.NodaTime" Version="11.0.0-preview.2" />
<PackageVersion Include="System.IO.Hashing" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="System.IO.Packaging" Version="11.0.0-preview.2.26159.112" />
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="11.0.0-preview.2.26159.112" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.1" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public async Task Paging_Nullable_Descending_Cursor_Value_NonNull()

// Assert
var snapshot = new Snapshot(
postFix: TestEnvironment.TargetFramework == "NET10_0"
postFix: TestEnvironment.TargetFramework == "NET10_0" || TestEnvironment.TargetFramework == "NET11_0"
? TestEnvironment.TargetFramework
: null);
snapshot.Add(page1);
Expand Down Expand Up @@ -135,7 +135,7 @@ public async Task Paging_Nullable_Descending_Cursor_Value_Null()

// Assert
var snapshot = new Snapshot(
postFix: TestEnvironment.TargetFramework == "NET10_0"
postFix: TestEnvironment.TargetFramework == "NET10_0" || TestEnvironment.TargetFramework == "NET11_0"
? TestEnvironment.TargetFramework
: null);
snapshot.Add(page1);
Expand Down Expand Up @@ -202,7 +202,7 @@ public async Task Paging_NullableReference_Descending_Cursor_Value_NonNull()

// Assert
var snapshot = new Snapshot(
postFix: TestEnvironment.TargetFramework == "NET10_0"
postFix: TestEnvironment.TargetFramework == "NET10_0" || TestEnvironment.TargetFramework == "NET11_0"
? TestEnvironment.TargetFramework
: null);
snapshot.Add(page1);
Expand Down Expand Up @@ -269,7 +269,7 @@ public async Task Paging_NullableReference_Descending_Cursor_Value_Null()

// Assert
var snapshot = new Snapshot(
postFix: TestEnvironment.TargetFramework == "NET10_0"
postFix: TestEnvironment.TargetFramework == "NET10_0" || TestEnvironment.TargetFramework == "NET11_0"
? TestEnvironment.TargetFramework
: null);
snapshot.Add(page1);
Expand Down
Loading
Loading