Bump Refit from 10.1.6 to 11.0.0#31
Conversation
--- updated-dependencies: - dependency-name: Refit dependency-version: 11.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
|
Superseded by #32. |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull Request Overview
While this PR initiates the upgrade to Refit 11.0.0, it is currently incomplete and will likely cause build or runtime failures. The primary issue is a version mismatch: the core Refit library was updated to v11, but the Refit.HttpClientFactory package remains on v10. These packages are tightly coupled and must be updated together to avoid assembly binding issues.
Furthermore, Refit 11 introduces breaking changes to the ApiResponse model, including changing the Error property type to ApiExceptionBase and making StatusCode nullable. Since this PR only modifies Directory.Packages.props, any application code consuming these properties will require manual updates to remain compatible. It is recommended to address the companion package version and the resulting code breakages before merging.
About this PR
- This major version bump introduces breaking changes to the Refit error model and status code handling. As the current diff only includes the package version update in
Directory.Packages.props, the application code likely needs adjustments to handleApiExceptionBaseand nullableHttpStatusCodevalues to avoid compilation or logic errors.
Test suggestions
- Verify application compilation against Refit 11.0.0 breaking changes
- Test ApiResponse error handling with the new ApiExceptionBase type
- Test logic involving ApiResponse.StatusCode to ensure it handles null (transport failures)
- Verify dependency compatibility between Refit 11.0.0 and Refit.HttpClientFactory 11.0.0
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify application compilation against Refit 11.0.0 breaking changes
2. Test ApiResponse error handling with the new ApiExceptionBase type
3. Test logic involving ApiResponse.StatusCode to ensure it handles null (transport failures)
4. Verify dependency compatibility between Refit 11.0.0 and Refit.HttpClientFactory 11.0.0
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
| <PackageVersion Include="Refit" Version="11.0.0" /> | ||
| <PackageVersion Include="Refit.HttpClientFactory" Version="10.1.6" /> |
There was a problem hiding this comment.
🔴 HIGH RISK
The Refit.HttpClientFactory package version (10.1.6) is now out of sync with the core Refit package (11.0.0). These libraries are tightly coupled and versioned together; mixing major versions typically leads to runtime assembly binding errors or NuGet dependency resolution failures. Update Refit.HttpClientFactory to 11.0.0.
| <PackageVersion Include="Refit" Version="11.0.0" /> | |
| <PackageVersion Include="Refit.HttpClientFactory" Version="10.1.6" /> | |
| <PackageVersion Include="Refit.HttpClientFactory" Version="11.0.0" /> |
Updated Refit from 10.1.6 to 11.0.0.
Release notes
Sourced from Refit's releases.
11.0.0
11.0.0 reworks Refit's error/exception model and tightens interface validation. Most apps will compile, but code that inspects
ApiResponse.Error, readsStatusCode, or catches transport exceptions around Refit calls will need changes. These are the same breaking changes that briefly shipped in the now‑delisted10.1.7and were reported by the community in #2114.💥 What changed & how to migrate
1.
ApiResponse<T>.Erroris nowApiExceptionBase?(wasApiException?) (#2052)A new abstract base
ApiExceptionBasenow sits under bothApiExceptionand the newApiRequestException.ApiExceptionBasedoes not exposeContent/HasContent— those still live onApiException.2. New
ApiRequestExceptionwraps transport/connection failures (#2052)Exceptions thrown by
HttpClient.SendAsyncbefore a response arrives —HttpRequestException(DNS/host unreachable),TaskCanceledException(timeouts), etc. — are now wrapped inApiRequestException : ApiExceptionBase, carrying the full request context. ForApiResponse<T>return types these are now surfaced via.Errorinstead of only being thrown, so you no longer need a separatetry/catchandIsSuccessfulcheck.3.
ApiResponse<T>.StatusCodeis now nullable (HttpStatusCode?) (#2052)When the request never reached the server there is no status code. Code that assumed a non‑null value must handle
null:4. Stricter interface validation + enum name handling (#2068)
Synchronous return types are now only permitted for generated/non‑public interface members (
RestMethodInfoenforces the rule), and the System.Text.Json enum converter now maps serialized names both ways (includingJsonStringEnumMemberNameon .NET 9+). Interfaces that previously relied on unsupported sync members may now fail generation.🗞️ What's Changed
✨ Features & Enhancements
ApiRequestExceptionfor wrappingSendAsyncexceptions (new error model) by @PressXtoChris in #2052AddRefitClientoverloads and tests by @ChrisPulman in #2084... (truncated)
10.2.0
NOTE
This is a re-release of v10.1.6 which had a certificate revoked.
🗞️ What's Changed
🐛 Fixes
🧹 General Changes
📦 Dependencies
📌 Other
🔗 Full Changelog: reactiveui/refit@10.0.1...10.1.6
🙌 Contributions
💖 Thanks to all the contributors: @ChrisPulman
🤖 Automated services that contributed: @renovate[bot]
Commits viewable in compare view.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)