Skip to content

Revert NSwag back to v14.4.0#734

Merged
christianhelle merged 1 commit into
mainfrom
revert-722-renovate/nswag-monorepo
Aug 27, 2025
Merged

Revert NSwag back to v14.4.0#734
christianhelle merged 1 commit into
mainfrom
revert-722-renovate/nswag-monorepo

Conversation

@christianhelle

@christianhelle christianhelle commented Aug 27, 2025

Copy link
Copy Markdown
Owner

Reverts #722

Summary by CodeRabbit

  • Chores
    • Adjusted third-party dependencies to earlier stable versions to improve overall stability and compatibility across environments.
    • Aligned core and code-generation components on a consistent dependency set to reduce unexpected variability.
    • No functional or user-facing behavior changes; existing workflows continue to operate as before.
    • No configuration or API updates required; projects will build and run without modifications.

Copilot AI review requested due to automatic review settings August 27, 2025 19:00
@coderabbitai

coderabbitai Bot commented Aug 27, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Downgraded NSwag dependency versions from 14.5.0 to 14.4.0 in two project files: Refitter.Core.csproj and Refitter.SourceGenerator.csproj. No other project configuration or API surface changes.

Changes

Cohort / File(s) Summary
Project dependency downgrades
src/Refitter.Core/Refitter.Core.csproj, src/Refitter.SourceGenerator/Refitter.SourceGenerator.csproj
Downgraded NSwag.CodeGeneration.CSharp and NSwag.Core.Yaml from 14.5.0 to 14.4.0; no other edits.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

I thump the ground—versions hop and flow,
From 14.5 to 14.4 we go.
Carrots counted, deps aligned just right,
A tidy warren prepped for night.
Soft whisker-twitch: “Ship it, so!” 🥕✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-722-renovate/nswag-monorepo

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@christianhelle christianhelle changed the title Revert "NSwag v14.5.0" Revert NSwag back to v14.4.0 Aug 27, 2025

Copilot AI 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.

Pull Request Overview

This PR reverts the upgrade of NSwag packages from version 14.5.0 back to 14.4.0, effectively undoing a previous dependency update.

Key Changes

  • Downgrade NSwag.CodeGeneration.CSharp from v14.5.0 to v14.4.0
  • Downgrade NSwag.Core.Yaml from v14.5.0 to v14.4.0
  • Changes applied to both Refitter.Core and Refitter.SourceGenerator projects

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Refitter.Core/Refitter.Core.csproj Downgrades NSwag packages to v14.4.0 in the core library
src/Refitter.SourceGenerator/Refitter.SourceGenerator.csproj Downgrades NSwag packages to v14.4.0 in the source generator
Comments suppressed due to low confidence (1)

src/Refitter.SourceGenerator/Refitter.SourceGenerator.csproj:1

  • The NSwag version 14.5.0 being reverted from may not exist. The latest known stable version of NSwag is 14.1.0 as of January 2025. Please verify that version 14.5.0 actually exists before reverting from it, and ensure that 14.4.0 is a valid version.
<Project Sdk="Microsoft.NET.Sdk">

@christianhelle christianhelle added enhancement New feature, bug fix, or request dependencies Pull requests that update a dependency file .NET Pull requests that contain changes to .NET code labels Aug 27, 2025
@sonarqubecloud

Copy link
Copy Markdown

@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: 0

🧹 Nitpick comments (2)
src/Refitter.Core/Refitter.Core.csproj (1)

15-16: Consider marking NSwag as build-time only to avoid leaking transitive dependencies.

If consumers of Refitter.Core don’t need NSwag at runtime, add PrivateAssets="all".

Apply within this range:

-    <PackageReference Include="NSwag.CodeGeneration.CSharp" Version="14.4.0" />
-    <PackageReference Include="NSwag.Core.Yaml" Version="14.4.0" />
+    <PackageReference Include="NSwag.CodeGeneration.CSharp" Version="14.4.0" PrivateAssets="all" />
+    <PackageReference Include="NSwag.Core.Yaml" Version="14.4.0" PrivateAssets="all" />
src/Refitter.SourceGenerator/Refitter.SourceGenerator.csproj (1)

17-23: Optional: Centralize NSwag version to prevent future drift.

Using central package management (Directory.Packages.props) would let you revert/advance once for all projects and help Renovate manage rules per package.

If desired, I can draft a Directory.Packages.props and a Renovate rule to hold NSwag at 14.4.x until the upstream issue is resolved. Do you want that?

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ac2181d and 308ca56.

📒 Files selected for processing (2)
  • src/Refitter.Core/Refitter.Core.csproj (1 hunks)
  • src/Refitter.SourceGenerator/Refitter.SourceGenerator.csproj (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-13T18:27:12.292Z
Learnt from: CR
PR: christianhelle/refitter#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-08-13T18:27:12.292Z
Learning: Applies to src/{Refitter,Refitter.Core,Refitter.SourceGenerator,Refitter.MSBuild}/**/*.cs : Include XML documentation for public APIs

Applied to files:

  • src/Refitter.SourceGenerator/Refitter.SourceGenerator.csproj
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Analyze (csharp)
  • GitHub Check: script
  • GitHub Check: 👌 Verify build
  • GitHub Check: 👌 Verify build
  • GitHub Check: 👌 Verify build
🔇 Additional comments (3)
src/Refitter.Core/Refitter.Core.csproj (2)

15-16: Revert to 14.4.0 looks correct and consistent.

Both NSwag packages are aligned to 14.4.0 here, matching the revert intent.


15-18: Please verify OasReader compatibility with NSwag 14.4.0

Before merging, ensure that upgrading to NSwag.CodeGeneration.CSharp and NSwag.Core.Yaml at 14.4.0 alongside OasReader 1.6.16.16 does not break any existing API calls that may have relied on NSwag 14.5.0.

Key checks:

  • Run dotnet restore and then for each project execute dotnet list package to confirm that no NSwag packages resolve to 14.5.0 or later.
  • Grep the codebase for NSwag namespaces (e.g. NSwag.) to locate all call sites, and cross-verify those APIs still exist in NSwag 14.4.0.
  • If you maintain a global.json or binding redirects, ensure they’re aligned to 14.4.0.

[src/Refitter.Core/Refitter.Core.csproj lines 15–18]

    <PackageReference Include="NSwag.CodeGeneration.CSharp" Version="14.4.0" />
    <PackageReference Include="NSwag.Core.Yaml"          Version="14.4.0" />
    <PackageReference Include="OasReader"                Version="1.6.16.16" />
src/Refitter.SourceGenerator/Refitter.SourceGenerator.csproj (1)

19-20: LGTM: Downgrade mirrors Core and remains PrivateAssets="all".

Source generator continues to keep NSwag internal to the package; no transitive exposure.

@codecov

codecov Bot commented Aug 27, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.43%. Comparing base (46fb6dd) to head (308ca56).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #734      +/-   ##
==========================================
- Coverage   95.47%   86.43%   -9.04%     
==========================================
  Files          60       60              
  Lines        2982     3391     +409     
==========================================
+ Hits         2847     2931      +84     
- Misses        102      421     +319     
- Partials       33       39       +6     
Flag Coverage Δ
unittests 86.43% <ø> (-9.04%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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 merged commit dfaee15 into main Aug 27, 2025
11 of 12 checks passed
@christianhelle
christianhelle deleted the revert-722-renovate/nswag-monorepo branch August 27, 2025 20:12
@coderabbitai coderabbitai Bot mentioned this pull request Oct 21, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement New feature, bug fix, or request .NET Pull requests that contain changes to .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants