build(deps): bump Roslyn.Utilities 2.0.7 → 2.2.0, self-ref 1.27.6 → 1.29.0 - #86
Conversation
…lyzers 1.27.6 → 1.29.0 GetOrNull was removed in Roslyn.Utilities 2.2.0 — replace with TryGetValue pattern (GetValueOrDefault is not available on netstandard2.0). Fix CA1859 by using concrete Dictionary types for private fields. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📜 Recent review details⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🧰 Additional context used📓 Path-based instructions (2)src/**/*.cs⚙️ CodeRabbit configuration file
Files:
**/*.props⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (3)
Summary by CodeRabbit
WalkthroughDependency versions bumped in Version.props for ANcpLua.Roslyn.Utilities packages (2.0.7→2.2.0) and ANcpLua.Analyzers (1.27.6→1.29.0). Internal refactoring replaces Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (7 passed)
Review rate limit: 2/5 reviews remaining, refill in 24 minutes and 41 seconds. Comment |
There was a problem hiding this comment.
Pull request overview
Updates internal dependency versions and aligns analyzer code with updated Roslyn.Utilities APIs/perf guidance, primarily by removing GetOrNull usage and using concrete dictionary types for private static lookup tables.
Changes:
- Bump
ANcpLua.Roslyn.Utilities.*packages from2.0.7→2.2.0andANcpLua.Analyzersfrom1.27.6→1.29.0. - Replace
GetOrNulllookups withTryGetValue(...)? ... : nullto keep netstandard2.0 compatibility. - Address CA1859 by using concrete
Dictionary<string, string>for private lookup fields.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/ANcpLua.Analyzers/MappingRegistry.cs | Switches internal mapping tables to concrete dictionaries and replaces GetOrNull with TryGetValue for lookups. |
| src/ANcpLua.Analyzers/Analyzers/AL0127OutdatedMafPackageVersionAnalyzer.cs | Replaces GetOrNull with TryGetValue when resolving MSBuild property references. |
| Version.props | Bumps Roslyn.Utilities and self-referenced analyzer package versions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a58c361f21
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ═══════════════════════════════════════════════════════════════════════ --> | ||
| <PropertyGroup Label="Analyzers"> | ||
| <ANcpLuaAnalyzersVersion>1.27.6</ANcpLuaAnalyzersVersion> | ||
| <ANcpLuaAnalyzersVersion>1.29.0</ANcpLuaAnalyzersVersion> |
There was a problem hiding this comment.
Keep self-reference pinned to last published analyzer
Updating ANcpLuaAnalyzersVersion to 1.29.0 here can break restore for all SDK-based builds until that exact package is available on NuGet, because Directory.Packages.props uses PackageVersion Update="ANcpLua.Analyzers" to override the SDK-injected analyzer package version. In that pre-publish window, dotnet restore fails with NU1102, which blocks local builds and CI for this repo and downstream consumers.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Code Review
This pull request updates the versions of Roslyn.Utilities and Analyzers in Version.props. It also refactors dictionary lookups in AL0127OutdatedMafPackageVersionAnalyzer.cs and MappingRegistry.cs, replacing GetOrNull calls with TryGetValue. In MappingRegistry.cs, internal fields were changed from IReadOnlyDictionary to Dictionary. Feedback was provided regarding a missing newline at the end of MappingRegistry.cs.
| return StringComparisonSuffixes.GetOrNull(comparisonValue); | ||
| return StringComparisonSuffixes.TryGetValue(comparisonValue, out var suffix) ? suffix : null; | ||
| } | ||
| } No newline at end of file |
Summary
GetOrNull→TryGetValuepattern (GetValueOrDefaultunavailable on netstandard2.0)Dictionary<string, string>for private fieldsTest plan
🤖 Generated with Claude Code