Skip to content

Commit c41f7e0

Browse files
feat!: update target frameworks, merge IAsyncParseNodeFactory, and remove obsolete APIs (#708)
Update target frameworks to net8.0 and net10.0 (drop net5.0 and net6.0), merge IAsyncParseNodeFactory into IParseNodeFactory, remove synchronous deserialization methods from KiotaSerializer, migrate to central package management, and add a v1.x to v2.x upgrade guide. feat!: update target frameworks to net8.0 and net10.0, drop net5.0 and net6.0 BREAKING-CHANGE: net5.0 and net6.0 TFMs dropped; net8.0 and net10.0 added. Source-Link: cc3ca4b fix: resolve trim analysis warnings and pin PublicApiAnalyzers to net8.0 Source-Link: c017c65 chore: migrate to central package management via Directory.Packages.props Source-Link: a0651aa ci: update ESRP signing SDK install to .NET 8 and add .NET 10 Source-Link: 6ab1ad2 fix(build): update package version lower bounds from 6.0 to 8.0 Source-Link: 61a76e6 refactor(abstractions)!: merge IAsyncParseNodeFactory into IParseNodeFactory BREAKING-CHANGE: IAsyncParseNodeFactory removed; implement IParseNodeFactory.GetRootParseNodeAsync directly. Source-Link: 1836a32 refactor(abstractions)!: remove synchronous Deserialize and DeserializeCollection from KiotaSerializer BREAKING-CHANGE: Use DeserializeAsync/DeserializeCollectionAsync instead. Source-Link: 1836a32 refactor(serialization): update JsonParseNodeFactory, FormParseNodeFactory, and TextParseNodeFactory for unified IParseNodeFactory Source-Link: 1836a32 refactor(abstractions)!: remove deprecated single-param MultipartBody.GetPartValue and RemovePart overloads BREAKING-CHANGE: GetPartValue<T>(string) and RemovePart(string) removed; use the overloads that accept (partName, contentType). Source-Link: 1836a32 fix(ci): use glob pattern for timestamped coverlet coverage report paths Source-Link: 1836a32 build(http): bump System.Net.Http.WinHttpHandler lower bound to [10.0,) for net462 Source-Link: c126a66 docs: add v1.x to v2.x upgrade guide Source-Link: 713273d docs: enhance upgrade guide with agent-friendly metadata and compiler error mappings Source-Link: bd8cafc
1 parent 5eba0cd commit c41f7e0

53 files changed

Lines changed: 981 additions & 942 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.azure-pipelines/ci-build.yml

Lines changed: 247 additions & 239 deletions
Large diffs are not rendered by default.

.github/copilot-instructions.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Copilot Instructions
22

3+
## Upgrade Guide
4+
5+
When working on code that consumes the Kiota .NET libraries, or when encountering build errors after a version update, refer to [`docs/upgrade-guide-v1-to-v2.md`](../docs/upgrade-guide-v1-to-v2.md) for breaking changes, migration steps, and compiler error mappings between v1.x and v2.x.
6+
37
## Commit Message Format
48

59
Always use conventional commits format when creating commits. Follow this structure:

.github/workflows/build-and-test.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Build and Test
33
on:
44
workflow_dispatch:
55
push:
6-
branches: ["main", "dev", "feature/*"]
6+
branches: [ "main", "dev", "feature/*" ]
77
pull_request:
8-
branches: ["main", "dev"]
8+
branches: [ "main", "dev" ]
99

1010
permissions:
1111
contents: read #those permissions are required to run the codeql analysis
@@ -19,10 +19,13 @@ jobs:
1919
solutionName: Microsoft.Kiota.slnx
2020
steps:
2121
- uses: actions/checkout@v6
22-
- name: Setup .NET
22+
23+
- name: Setup .NET 8 and 10
2324
uses: actions/setup-dotnet@v5
2425
with:
25-
dotnet-version: 10.x
26+
dotnet-version: |
27+
8.x
28+
10.x
2629
- name: Initialize CodeQL
2730
uses: github/codeql-action/init@v4
2831
with:
@@ -32,10 +35,14 @@ jobs:
3235
- name: Check formatting
3336
run: dotnet format ${{ env.solutionName }} --verify-no-changes
3437
- name: Build
35-
run: dotnet build ${{ env.solutionName }} --no-restore /p:UseSharedCompilation=false
38+
run: dotnet build ${{ env.solutionName }} --no-restore
39+
/p:UseSharedCompilation=false
3640
- name: Test for net472
37-
run: dotnet test --solution ${{ env.solutionName }} --no-build --verbosity normal --framework net472
41+
run: dotnet test --solution ${{ env.solutionName }} --no-build --verbosity
42+
normal --framework net472
3843
- name: Test for net10.0 and collect coverage
39-
run: dotnet test --solution ${{ env.solutionName }} --no-build --verbosity normal --framework net10.0 -- --coverlet --coverlet-output-format opencover
44+
run: dotnet test --solution ${{ env.solutionName }} --no-build --verbosity
45+
normal --framework net10.0 -- --coverlet --coverlet-output-format
46+
opencover
4047
- name: Perform CodeQL Analysis
4148
uses: github/codeql-action/analyze@v4

.github/workflows/sonarcloud.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
6262
shell: pwsh
6363
run: |
64-
dotnet tool run dotnet-sonarscanner begin /k:"microsoft_kiota-abstractions-dotnet" /o:"microsoft" /d:sonar.token="$env:SONAR_TOKEN" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="tests/abstractions/bin/Debug/net10.0/TestResults/coverage.opencover.xml,tests/authentication/azure/bin/Debug/net10.0/TestResults/coverage.opencover.xml,tests/http/httpClient/bin/Debug/net10.0/TestResults/coverage.opencover.xml,tests/serialization/json/bin/Debug/net10.0/TestResults/coverage.opencover.xml,tests/serialization/text/bin/Debug/net10.0/TestResults/coverage.opencover.xml,tests/serialization/form/bin/Debug/net10.0/TestResults/coverage.opencover.xml,tests/serialization/multipart/bin/Debug/net10.0/TestResults/coverage.opencover.xml,tests/bundle/bin/Debug/net10.0/TestResults/coverage.opencover.xml"
64+
dotnet tool run dotnet-sonarscanner begin /k:"microsoft_kiota-abstractions-dotnet" /o:"microsoft" /d:sonar.token="$env:SONAR_TOKEN" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="tests/**/TestResults/coverage.opencover.*.xml"
6565
dotnet workload restore
6666
dotnet build
6767
dotnet test --solution Microsoft.Kiota.slnx --no-build --verbosity normal --framework net10.0 -- --coverlet --coverlet-output-format opencover

Directory.Packages.props

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<!-- Source packages -->
7+
<PackageVersion Include="Azure.Core" Version="1.50.0" />
8+
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="5.3.0" />
9+
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="5.3.0" />
10+
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="4.14.0" />
11+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[8.0,)" />
12+
<PackageVersion Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
13+
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15" />
14+
<PackageVersion Include="Std.UriTemplate" Version="2.0.8" />
15+
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="[8.0.1,)" />
16+
<PackageVersion Include="System.Net.Http.WinHttpHandler" Version="[10.0,)" />
17+
<PackageVersion Include="System.Text.Json" Version="[8.0,)" />
18+
<!-- Test packages -->
19+
<PackageVersion Include="coverlet.MTP" Version="10.0.0" />
20+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.7" />
21+
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.7" />
22+
<PackageVersion Include="Microsoft.Testing.Platform" Version="2.2.2" />
23+
<PackageVersion Include="Moq" Version="4.20.72" />
24+
<PackageVersion Include="xunit.v3.mtp-v2" Version="3.2.2" />
25+
</ItemGroup>
26+
</Project>

0 commit comments

Comments
 (0)