Skip to content

Verify compatibility with Refit v13.1.0#1181

Merged
christianhelle merged 6 commits into
mainfrom
refit-v13
Jul 3, 2026
Merged

Verify compatibility with Refit v13.1.0#1181
christianhelle merged 6 commits into
mainfrom
refit-v13

Conversation

@christianhelle

@christianhelle christianhelle commented Jul 2, 2026

Copy link
Copy Markdown
Owner

This pull request updates all usages of the Refit and Refit.HttpClientFactory NuGet packages across the codebase from version 11.0.1 to 13.1.0. This ensures that all projects and test scenarios are aligned with the latest features and bug fixes provided by Refit.

Dependency version upgrades:

  • Updated Refit.HttpClientFactory package reference from 11.0.1 to 13.1.0 in the following files:

    • src/Refitter.SourceGenerator.Tests/Build/ProjectFileContents.cs [1] [2]
    • src/Refitter.SourceGenerator.Tests/Refitter.SourceGenerator.Tests.csproj
    • src/Refitter.Tests/Build/ProjectFileContents.cs [1] [2] [3] [4]
    • src/Refitter.Tests/Scenarios/GenerateJsonSerializerContextPolymorphismTests.cs
    • test/MSBuild/Refitter.MSBuild.Tests.csproj
    • test/MinimalApi/MinimalApi.csproj
    • test/MultipleFiles/Client/Client.csproj
    • test/ConsoleApp/Directory.Build.props
  • Updated Refit package reference from 11.0.1 to 13.1.0 in the following files:

    • test/ConsoleApp/Directory.Build.props
    • test/HelloWorld/HelloWorld/HelloWorld.csproj
    • test/MultipleFiles/Client/Client.csproj
    • test/SourceGenerator/Directory.Build.props

Summary by CodeRabbit

  • Chores
    • Updated NuGet package versions across test projects, sample apps, and build/test fixtures: Refit/Refit.HttpClientFactory to 13.1.0 (from 11.0.1), plus aligned Microsoft.Extensions.* packages to 10.0.9 (and Microsoft.Extensions.Http.Resilience to 10.1.0 where applicable).
    • Bumped System.Text.Json to 10.0.9 in applicable projects.
    • Kept behavior unchanged; updated project-template formatting where needed.

@christianhelle christianhelle self-assigned this Jul 2, 2026
@christianhelle christianhelle added enhancement New feature, bug fix, or request dependencies Pull requests that update a dependency file CI/CD Build workflow labels Jul 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Project and embedded test template package references are updated to newer Refit, Refit.HttpClientFactory, Microsoft.Extensions, and System.Text.Json versions.

Changes

Refit package version bump

Layer / File(s) Summary
Template version bumps
src/Refitter.SourceGenerator.Tests/Build/ProjectFileContents.cs, src/Refitter.Tests/Build/ProjectFileContents.cs
Embedded Net80, Net90, and Net100 project XML templates update Refit.HttpClientFactory and several Microsoft.Extensions.* package versions, including the warnings-as-errors variants.
Project dependency bumps
src/Refitter.SourceGenerator.Tests/Refitter.SourceGenerator.Tests.csproj, src/Refitter/Refitter.csproj, src/Refitter.Tests/Scenarios/GenerateJsonSerializerContextPolymorphismTests.cs, test/Apizr/Sample.csproj, test/ConsoleApp/Directory.Build.props, test/HelloWorld/HelloWorld/HelloWorld.csproj, test/MinimalApi/MinimalApi.csproj, test/MSBuild/Refitter.MSBuild.Tests.csproj, test/MultipleFiles/Client/Client.csproj, test/SourceGenerator/Directory.Build.props
Test and product project files update Refit, Refit.HttpClientFactory, and System.Text.Json package references.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: .NET

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the main change: upgrading Refit to v13.1.0 to verify compatibility.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refit-v13

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/Refitter.Tests/Build/ProjectFileContents.cs`:
- Line 13: The warnings-as-errors test templates are still pinned to an older
Refit.HttpClientFactory version, so update the Net80AppWithWarningsAsErrors and
Net90AppWithWarningsAsErrors entries in ProjectFileContents so they match the
13.0.0 version used by the other templates. Use the existing template names in
ProjectFileContents and ensure BuildHelper.BuildCSharp’s warningsAsErrors path
for net8.0/net9.0 exercises the same Refit version as the rest of the build
matrix.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f0c7f2bc-96c4-4baa-bafa-ed10f54e120e

📥 Commits

Reviewing files that changed from the base of the PR and between 6e35a03 and 6bde19e.

📒 Files selected for processing (10)
  • src/Refitter.SourceGenerator.Tests/Build/ProjectFileContents.cs
  • src/Refitter.SourceGenerator.Tests/Refitter.SourceGenerator.Tests.csproj
  • src/Refitter.Tests/Build/ProjectFileContents.cs
  • src/Refitter.Tests/Scenarios/GenerateJsonSerializerContextPolymorphismTests.cs
  • test/ConsoleApp/Directory.Build.props
  • test/HelloWorld/HelloWorld/HelloWorld.csproj
  • test/MSBuild/Refitter.MSBuild.Tests.csproj
  • test/MinimalApi/MinimalApi.csproj
  • test/MultipleFiles/Client/Client.csproj
  • test/SourceGenerator/Directory.Build.props

Comment thread src/Refitter.Tests/Build/ProjectFileContents.cs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
src/Refitter.Tests/Build/ProjectFileContents.cs (1)

34-62: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Warnings-as-errors net8.0/net9.0 templates still pinned to Refit 8.0.0.

Net80AppWithWarningsAsErrors (line 44) and Net90AppWithWarningsAsErrors (line 103) still reference Refit.HttpClientFactory Version="8.0.0", while every other template in this PR was bumped to 13.0.0. Since BuildHelper.BuildCSharp routes warningsAsErrors: true builds for net8.0/net9.0 to these exact templates, those integration tests never exercise Refit 13.0.0 — undermining the PR's stated goal of verifying compatibility with the new major version.

Additionally, Net90AppWithWarningsAsErrors now has its Microsoft.Extensions.* packages bumped to 10.0.9/10.1.0 (lines 107-110) while Refit.HttpClientFactory remains at 8.0.0 — this mismatched pairing wasn't validated together and may introduce its own binary-compatibility issues, whereas Net80AppWithWarningsAsErrors was left entirely untouched (both Refit and Microsoft.Extensions.* still on old versions).

🔧 Proposed fix
     public const string Net80AppWithWarningsAsErrors =
         @"
 ...
   <ItemGroup>
-    <PackageReference Include=""Refit.HttpClientFactory"" Version=""8.0.0"" />
+    <PackageReference Include=""Refit.HttpClientFactory"" Version=""13.0.0"" />
     public const string Net90AppWithWarningsAsErrors =
         @"
 ...
   <ItemGroup>
-    <PackageReference Include=""Refit.HttpClientFactory"" Version=""8.0.0"" />
+    <PackageReference Include=""Refit.HttpClientFactory"" Version=""13.0.0"" />

Also applies to: 93-121

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/Refitter.Tests/Build/ProjectFileContents.cs` around lines 34 - 62, Update
the warnings-as-errors test templates so they use the same Refit major version
as the rest of the PR. In ProjectFileContents, adjust
Net80AppWithWarningsAsErrors and Net90AppWithWarningsAsErrors to reference
Refit.HttpClientFactory 13.0.0 instead of 8.0.0, and keep the
Microsoft.Extensions package versions in Net90AppWithWarningsAsErrors aligned
with the intended compatibility set. This ensures BuildHelper.BuildCSharp
warningsAsErrors paths actually exercise the new Refit version in both net8.0
and net9.0.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@src/Refitter.Tests/Build/ProjectFileContents.cs`:
- Around line 34-62: Update the warnings-as-errors test templates so they use
the same Refit major version as the rest of the PR. In ProjectFileContents,
adjust Net80AppWithWarningsAsErrors and Net90AppWithWarningsAsErrors to
reference Refit.HttpClientFactory 13.0.0 instead of 8.0.0, and keep the
Microsoft.Extensions package versions in Net90AppWithWarningsAsErrors aligned
with the intended compatibility set. This ensures BuildHelper.BuildCSharp
warningsAsErrors paths actually exercise the new Refit version in both net8.0
and net9.0.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3a520338-5ed2-4826-b168-3296f71790e3

📥 Commits

Reviewing files that changed from the base of the PR and between 44f3b9e and f504019.

⛔ Files ignored due to path filters (3)
  • src/Refitter.SourceGenerator.Tests/AdditionalFiles/Generated/SwaggerPetstoreMultipleInterfaces.g.cs is excluded by !**/generated/**
  • src/Refitter.SourceGenerator.Tests/AdditionalFiles/Generated/SwaggerPetstoreSingleInterfaceWithHttpResilience.g.cs is excluded by !**/generated/**
  • src/Refitter.SourceGenerator.Tests/AdditionalFiles/Generated/SwaggerPetstoreSingleInterfaceWithPolly.g.cs is excluded by !**/generated/**
📒 Files selected for processing (2)
  • src/Refitter.SourceGenerator.Tests/Build/ProjectFileContents.cs
  • src/Refitter.Tests/Build/ProjectFileContents.cs

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.83%. Comparing base (93d8b89) to head (16d9e52).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1181   +/-   ##
=======================================
  Coverage   94.83%   94.83%           
=======================================
  Files          81       81           
  Lines        3585     3585           
=======================================
  Hits         3400     3400           
  Misses         76       76           
  Partials      109      109           
Flag Coverage Δ
unittests 94.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christianhelle christianhelle changed the title Verify compatibility with Refit v13.0.0 Verify compatibility with Refit v13.1.0 Jul 3, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@christianhelle
christianhelle merged commit db6b06c into main Jul 3, 2026
14 checks passed
@christianhelle
christianhelle deleted the refit-v13 branch July 3, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD Build workflow dependencies Pull requests that update a dependency file enhancement New feature, bug fix, or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant