-
Notifications
You must be signed in to change notification settings - Fork 1
V9.0.0/net9rc1 alembic #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe recent update to the Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (10)
- .nuget/Codebelt.Extensions.Xunit.Hosting/PackageReleaseNotes.txt (1 hunks)
- CHANGELOG.md (1 hunks)
- Directory.Build.props (1 hunks)
- src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/Codebelt.Extensions.Xunit.Hosting.AspNetCore.csproj (1 hunks)
- src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj (1 hunks)
- src/Codebelt.Extensions.Xunit.Hosting/LoggerExtensions.cs (1 hunks)
- src/Codebelt.Extensions.Xunit.Hosting/ServiceCollectionExtensions.cs (2 hunks)
- src/Codebelt.Extensions.Xunit/Codebelt.Extensions.Xunit.csproj (1 hunks)
- test/Codebelt.Extensions.Xunit.Hosting.AspNetCore.Tests/AspNetCoreHostTestTest.cs (1 hunks)
- test/Codebelt.Extensions.Xunit.Hosting.AspNetCore.Tests/MvcAspNetCoreHostTestTest.cs (1 hunks)
Files skipped from review due to trivial changes (3)
- src/Codebelt.Extensions.Xunit.Hosting.AspNetCore/Codebelt.Extensions.Xunit.Hosting.AspNetCore.csproj
- src/Codebelt.Extensions.Xunit.Hosting/LoggerExtensions.cs
- src/Codebelt.Extensions.Xunit/Codebelt.Extensions.Xunit.csproj
Additional comments not posted (10)
test/Codebelt.Extensions.Xunit.Hosting.AspNetCore.Tests/MvcAspNetCoreHostTestTest.cs (1)
49-49: LGTM! The change simplifies the logging setup.The modification to directly pass the
TestOutputvariable to theAddXunitTestLoggingmethod aligns with the updates made to theAddXunitTestLoggingmethod in theServiceCollectionExtensions.csfile. This change improves clarity and reduces overhead in the logging configuration process by removing an unnecessary layer of abstraction.src/Codebelt.Extensions.Xunit.Hosting/Codebelt.Extensions.Xunit.Hosting.csproj (1)
38-38: LGTM!The addition of the
Cuemon.Corepackage with version9.0.0-preview.5seems appropriate. This package may provide useful features or utilities that can enhance the functionality of the project.It's good to see that the package is marked with
PrivateAssets="all", which ensures that it is not exposed to projects that reference this project. This helps to avoid unnecessary dependencies and keeps the public API of the project clean.However, it's important to note that the specific impact of this package on the project's logic or functionality is not detailed in the diff. It would be beneficial to document how this package is being utilized within the project and what benefits it provides.
test/Codebelt.Extensions.Xunit.Hosting.AspNetCore.Tests/AspNetCoreHostTestTest.cs (1)
81-81: LGTM!The change simplifies the logging setup by directly passing the
TestOutputobject to theAddXunitTestLoggingmethod, which aligns with the updates made to theAddXunitTestLoggingmethod in theServiceCollectionExtensions.csfile. This improves clarity and potentially reduces overhead in the logging configuration..nuget/Codebelt.Extensions.Xunit.Hosting/PackageReleaseNotes.txt (2)
8-10: Breaking change: Removal ofAddXunitTestLoggingmethod overload.The removal of the
AddXunitTestLoggingmethod overload that accepted anITestOutputHelperAccessorargument is a breaking change. This change affects theServiceCollectionExtensionsclass in theCodebelt.Extensions.Xunit.Hostingnamespace.Users of the library who rely on this specific overload will need to update their code to use the remaining
AddXunitTestLoggingmethod. Ensure that the documentation and migration guides clearly communicate this change and provide guidance on how to adapt to the new API.
11-13: Improvement: EnhancedAddXunitTestLoggingmethod.The change in the
AddXunitTestLoggingmethod to utilize anILoggerProviderthat can work with either anITestOutputHelperinstance or a previously providedITestOutputHelperAccessorservice is a notable improvement. This change affects theServiceCollectionExtensionsclass in theCodebelt.Extensions.Xunit.Hostingnamespace.This enhancement provides more flexibility in the logging setup and consolidates the logging mechanism. It allows users to choose between using an
ITestOutputHelperinstance directly or leveraging a previously providedITestOutputHelperAccessorservice, depending on their specific testing scenario and requirements.Ensure that the documentation and release notes clearly highlight this improvement and provide examples of how to utilize the updated
AddXunitTestLoggingmethod effectively.src/Codebelt.Extensions.Xunit.Hosting/ServiceCollectionExtensions.cs (3)
25-51: Breaking change:AddXunitTestLoggingmethod has been consolidated.The changes to the
AddXunitTestLoggingmethod introduce a breaking change by removing the overload that acceptedITestOutputHelperAccessor. Users of the library will need to update their code to use the new consolidated method.The consolidated method simplifies the API by reducing redundancy and enhancing flexibility in logging configuration. The conditional logic ensures that the appropriate logging provider is used based on the presence of
ITestOutputHelperAccessorin the service collection.If
ITestOutputHelperAccessoris registered, the method configures logging to use an instance ofXunitTestLoggerProviderinitialized with theITestOutputHelperAccessor, setting itsTestOutputproperty to the providedITestOutputHelper. IfITestOutputHelperAccessoris not present, it falls back to using theITestOutputHelperdirectly.These changes provide a more streamlined and flexible approach to configuring logging in xUnit tests.
2-2: LGTM!The
using System.Linq;statement has been added to support the usage of theAnymethod in the conditional logic at line 31. This change is necessary and consistent with the modifications made to theAddXunitTestLoggingmethod.
26-26: Documentation update looks good!The
<remarks>XML documentation comment has been updated to accurately reflect the changes made to theAddXunitTestLoggingmethod. The comment now mentions that the method will add a xUnit logger provider based on eitherITestOutputHelperorITestOutputHelperAccessor, depending on the presence ofITestOutputHelperAccessorin the service collection.Updating the XML documentation comment is crucial to provide clarity and guidance to users of the library regarding the method's behavior and the factors that determine the appropriate logging provider to use.
Directory.Build.props (1)
87-87: Looks good! Consider the implications of using a preview version.The addition of the
Cuemon.Corepackage reference with version9.0.0-preview.5for test projects is a positive change that enhances the functionality of the test suite. Marking it as private assets ensures that the dependency is properly scoped to the test context.However, please ensure that the test projects are thoroughly tested with this new dependency, especially considering that a preview version is being used. While preview versions can provide access to the latest features and improvements, they may also have a higher risk of containing bugs or introducing breaking changes.
Consider monitoring the
Cuemon.Corepackage for any updates or release notes that may impact the stability or compatibility of the test projects.CHANGELOG.md (1)
25-28: Approve the changes to theAddXunitTestLoggingmethod.The changes to the
AddXunitTestLoggingmethod provide more flexibility in logging by allowing developers to choose between using anITestOutputHelperinstance or anITestOutputHelperAccessorservice. This is a positive change that gives developers more control over how they output logs during tests without breaking existing functionality.
| ### Removed | ||
|
|
||
| - AddXunitTestLogging method (the overload that took an ITestOutputHelperAccessor argument) from the ServiceCollectionExtensions class in the Codebelt.Extensions.Xunit.Hosting namespace | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Breaking change: Overload of AddXunitTestLogging method removed.
The removal of the AddXunitTestLogging overload that accepted an ITestOutputHelperAccessor argument is a breaking change. Users who were using this specific overload will need to update their code.
To migrate, use the updated AddXunitTestLogging method that now uses an ILoggerProvider capable of working with an ITestOutputHelperAccessor service. This change, while breaking, simplifies the API and reduces complexity for users by consolidating the logging setup.
Please update the documentation to clearly communicate this breaking change and provide guidance on how to migrate to the new approach.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7 +/- ##
==========================================
+ Coverage 73.81% 73.87% +0.06%
==========================================
Files 26 26
Lines 508 513 +5
Branches 43 45 +2
==========================================
+ Hits 375 379 +4
- Misses 129 130 +1
Partials 4 4 ☔ View full report in Codecov by Sentry. |
|



PR Classification
API change and dependency update.
PR Summary
This PR introduces a breaking change by modifying the
AddXunitTestLoggingmethod and updates dependencies.ServiceCollectionExtensions.cs: RemovedAddXunitTestLoggingmethod withITestOutputHelperAccessorand modified the remaining method,LoggerExtensions.cs: Updated to reflect changes inAddXunitTestLoggingmethod,PackageReleaseNotes.txtandCHANGELOG.md: Updated to document changes and dependency updates,Codebelt.Extensions.Xunit.csprojand related project files: Updated to includeCuemon.*version9.0.0-preview.5as a private asset.Summary by CodeRabbit
Release Notes
New Features
Breaking Changes
AddXunitTestLoggingthat acceptedITestOutputHelperAccessor.Improvements
ILoggerProviderfor more flexible logging options.Chores
Cuemon.Corepackage reference to enhance test project functionality while keeping dependencies private.