-
Notifications
You must be signed in to change notification settings - Fork 0
[API 破坏性变更] 解决 InternalsVisibleTo 间接造成的大量不同命名空间日志类的情况 #36
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
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.
Pull Request Overview
This PR introduces breaking API changes by unifying namespaces from dotnetCampus to DotNetCampus, removing legacy configuration properties, and updating documentation accordingly.
- Removes support for the $(DCUseGeneratedLogger) property and solely relies on ExcludeAssets.
- Unifies generated class namespaces and standardizes the DotNetCampus naming convention.
- Updates samples and documentation to reflect the new API and namespace changes.
Reviewed Changes
Copilot reviewed 74 out of 84 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/DotNetCampus.Logger.Analyzer/Diagnostics.cs | Updated namespace and diagnostic identifiers to use DotNetCampus. |
| src/DotNetCampus.Logger.Analyzer/DiagnosticAnalyzers/PartialProgramAnalyzer.cs | Adjusted namespace for analyzer consistency. |
| src/DotNetCampus.Logger.Analyzer/CodeFixeProviders/PartialProgramCodeFixProvider.cs | Updated namespace and static import for localized resources. |
| src/DotNetCampus.Logger.Analyzer/Assets/Templates/AggregateLoggerBridgeLinker.g.cs | Revised namespace usages for logger bridge linker. |
| samples/* | Updated usings and namespaces in sample projects and documentation. |
Files not reviewed (10)
- Directory.Build.props: Language not supported
- Directory.Build.targets: Language not supported
- DotNetCampus.Logger.sln: Language not supported
- build/Version.props: Language not supported
- samples/LoggerSample.InternalsVisibleToProject/LoggerSample.InternalsVisibleToProject.csproj: Language not supported
- samples/LoggerSample.LoggerDependentLibrary/LoggerSample.LoggerDependentLibrary.csproj: Language not supported
- samples/LoggerSample.LoggerIndependentLibrary/LoggerSample.LoggerIndependentLibrary.csproj: Language not supported
- samples/LoggerSample.LoggerIndependentProject/LoggerSample.LoggerIndependentProject.csproj: Language not supported
- samples/LoggerSample.MainApp/LoggerSample.MainApp.csproj: Language not supported
- src/DotNetCampus.Logger.Analyzer/DotNetCampus.Logger.Analyzer.csproj: Language not supported
Comments suppressed due to low confidence (2)
src/DotNetCampus.Logger.Analyzer/CodeFixeProviders/PartialProgramCodeFixProvider.cs:12
- [nitpick] The identifier 'CodeFixeProviders' in the namespace may be a typographical error; consider renaming it to 'CodeFixProviders' for clarity and consistency.
namespace DotNetCampus.Logger.CodeFixeProviders;
src/DotNetCampus.Logger.Analyzer/Diagnostics.cs:74
- [nitpick] Confirm that using 'Localizations.ResourceManager' instead of a previously defined ResourceManager is intentional, ensuring that resource resolution works as expected.
private static LocalizableString Localize(string key) => new LocalizableResourceString(key, Localizations.ResourceManager, typeof(Localizations));
$(DCUseGeneratedLogger)属性设置,因为会与ExcludeAssets冲突且无法解决此冲突;改为完全由ExcludeAssets设置ILoggerBridge外)的命名空间不再跟随项目,而是完全统一;这样做能在使用引用和使用源之间切换时无需修改代码。