Verify compatibility with Refit v13.1.0#1181
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughProject and embedded test template package references are updated to newer Refit, Refit.HttpClientFactory, Microsoft.Extensions, and System.Text.Json versions. ChangesRefit package version bump
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (10)
src/Refitter.SourceGenerator.Tests/Build/ProjectFileContents.cssrc/Refitter.SourceGenerator.Tests/Refitter.SourceGenerator.Tests.csprojsrc/Refitter.Tests/Build/ProjectFileContents.cssrc/Refitter.Tests/Scenarios/GenerateJsonSerializerContextPolymorphismTests.cstest/ConsoleApp/Directory.Build.propstest/HelloWorld/HelloWorld/HelloWorld.csprojtest/MSBuild/Refitter.MSBuild.Tests.csprojtest/MinimalApi/MinimalApi.csprojtest/MultipleFiles/Client/Client.csprojtest/SourceGenerator/Directory.Build.props
There was a problem hiding this comment.
♻️ Duplicate comments (1)
src/Refitter.Tests/Build/ProjectFileContents.cs (1)
34-62: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winWarnings-as-errors net8.0/net9.0 templates still pinned to Refit 8.0.0.
Net80AppWithWarningsAsErrors(line 44) andNet90AppWithWarningsAsErrors(line 103) still referenceRefit.HttpClientFactory Version="8.0.0", while every other template in this PR was bumped to13.0.0. SinceBuildHelper.BuildCSharprouteswarningsAsErrors: truebuilds 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,
Net90AppWithWarningsAsErrorsnow has itsMicrosoft.Extensions.*packages bumped to10.0.9/10.1.0(lines 107-110) whileRefit.HttpClientFactoryremains at8.0.0— this mismatched pairing wasn't validated together and may introduce its own binary-compatibility issues, whereasNet80AppWithWarningsAsErrorswas 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
⛔ Files ignored due to path filters (3)
src/Refitter.SourceGenerator.Tests/AdditionalFiles/Generated/SwaggerPetstoreMultipleInterfaces.g.csis excluded by!**/generated/**src/Refitter.SourceGenerator.Tests/AdditionalFiles/Generated/SwaggerPetstoreSingleInterfaceWithHttpResilience.g.csis excluded by!**/generated/**src/Refitter.SourceGenerator.Tests/AdditionalFiles/Generated/SwaggerPetstoreSingleInterfaceWithPolly.g.csis excluded by!**/generated/**
📒 Files selected for processing (2)
src/Refitter.SourceGenerator.Tests/Build/ProjectFileContents.cssrc/Refitter.Tests/Build/ProjectFileContents.cs
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|



This pull request updates all usages of the
RefitandRefit.HttpClientFactoryNuGet packages across the codebase from version11.0.1to13.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.HttpClientFactorypackage reference from11.0.1to13.1.0in the following files:src/Refitter.SourceGenerator.Tests/Build/ProjectFileContents.cs[1] [2]src/Refitter.SourceGenerator.Tests/Refitter.SourceGenerator.Tests.csprojsrc/Refitter.Tests/Build/ProjectFileContents.cs[1] [2] [3] [4]src/Refitter.Tests/Scenarios/GenerateJsonSerializerContextPolymorphismTests.cstest/MSBuild/Refitter.MSBuild.Tests.csprojtest/MinimalApi/MinimalApi.csprojtest/MultipleFiles/Client/Client.csprojtest/ConsoleApp/Directory.Build.propsUpdated
Refitpackage reference from11.0.1to13.1.0in the following files:test/ConsoleApp/Directory.Build.propstest/HelloWorld/HelloWorld/HelloWorld.csprojtest/MultipleFiles/Client/Client.csprojtest/SourceGenerator/Directory.Build.propsSummary by CodeRabbit
Refit/Refit.HttpClientFactoryto13.1.0(from11.0.1), plus alignedMicrosoft.Extensions.*packages to10.0.9(andMicrosoft.Extensions.Http.Resilienceto10.1.0where applicable).System.Text.Jsonto10.0.9in applicable projects.