Skip to content

build(deps): bump Roslyn.Utilities 2.0.7 → 2.2.0, self-ref 1.27.6 → 1.29.0 - #86

Merged
ANcpLua merged 2 commits into
mainfrom
bump-roslyn-utilities-2.2.0
Apr 30, 2026
Merged

build(deps): bump Roslyn.Utilities 2.0.7 → 2.2.0, self-ref 1.27.6 → 1.29.0#86
ANcpLua merged 2 commits into
mainfrom
bump-roslyn-utilities-2.2.0

Conversation

@ANcpLua

@ANcpLua ANcpLua commented Apr 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bump all ANcpLua.Roslyn.Utilities.* packages from 2.0.7 → 2.2.0
  • Bump self-referenced ANcpLua.Analyzers from 1.27.6 → 1.29.0 (AL0038 removed)
  • Replace GetOrNullTryGetValue pattern (GetValueOrDefault unavailable on netstandard2.0)
  • Fix CA1859: use concrete Dictionary<string, string> for private fields

Test plan

  • 1107 tests pass
  • Build succeeds with 0 errors on both TFMs

🤖 Generated with Claude Code

…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>
Copilot AI review requested due to automatic review settings April 30, 2026 21:10
@coderabbitai

coderabbitai Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6a0076e2-06a8-4a0f-8f9f-7a06ea68e0b7

📥 Commits

Reviewing files that changed from the base of the PR and between 7e2fa90 and a58c361.

📒 Files selected for processing (3)
  • Version.props
  • src/ANcpLua.Analyzers/Analyzers/AL0127OutdatedMafPackageVersionAnalyzer.cs
  • src/ANcpLua.Analyzers/MappingRegistry.cs
📜 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)
  • GitHub Check: Agent
  • GitHub Check: build
🧰 Additional context used
📓 Path-based instructions (2)
src/**/*.cs

⚙️ CodeRabbit configuration file

src/**/*.cs: C# 14 / .NET 10 codebase. Review for: idiomatic modern C#, proper async/await (no sync-over-async, no fire-and-forget without justification), correct IDisposable/IAsyncDisposable, null safety (NRTs enabled), and adherence to existing patterns. Flag new public API surface that lacks XML doc comments. Check DI lifetime correctness (scoped vs singleton vs transient).
ARCHITECTURAL INVARIANTS — flag violations as blocking: 1. Every new injectable service must register OpenTelemetry instrumentation
(ActivitySource or Meter).
2. Every new DuckDB write path must handle backpressure (bounded channel or semaphore). 3. No hardcoded connection strings, paths, or magic strings — use IOptions or
IConfiguration.
4. No new dependencies on Sentry-specific types in core/ — Sentry is a comparison
target, not an identity.
5. CancellationToken must be threaded through all async public methods. 6. No sync-over-async (.Result, .GetAwaiter().GetResult()) outside of
well-documented infrastructure code.

Files:

  • src/ANcpLua.Analyzers/Analyzers/AL0127OutdatedMafPackageVersionAnalyzer.cs
  • src/ANcpLua.Analyzers/MappingRegistry.cs
**/*.props

⚙️ CodeRabbit configuration file

MSBuild property files (Directory.Build.props, Directory.Packages.props, Version.props). Review for: Central Package Management correctness, version consistency, and that new packages are added with explicit version pins. Flag transitive dependency promotions that aren't justified. Verify TFM targeting is correct (.NET 10).

Files:

  • Version.props
🔇 Additional comments (3)
src/ANcpLua.Analyzers/MappingRegistry.cs (1)

16-17: Lookup refactor preserves analyzer behavior.
Line 80 and Line 100 still return null on misses, which remains compatible with current callers using null-pattern guards.

Also applies to: 62-63, 80-81, 100-101

src/ANcpLua.Analyzers/Analyzers/AL0127OutdatedMafPackageVersionAnalyzer.cs (1)

216-216: Version-variable resolution change is safe.
Line 216 keeps the same unresolved-variable behavior (null) while removing helper dependency.

Version.props (1)

25-25: Version bump block is internally consistent.
The Roslyn.Utilities package family is pinned uniformly to 2.2.0, and the analyzer self-reference remains explicitly pinned.

Also applies to: 32-32, 39-39, 46-46, 61-61


Summary by CodeRabbit

  • Chores
    • Updated internal dependencies to latest stable versions for improved compatibility and performance.

Walkthrough

Dependency 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 GetOrNull helper pattern with explicit TryGetValue lookups in analyzer code; MappingRegistry converted from IReadOnlyDictionary to mutable Dictionary fields.

Changes

Cohort / File(s) Summary
Dependency Version Updates
Version.props
Pinned package versions updated: four ANcpLua.Roslyn.Utilities variants (2.0.7→2.2.0) and ANcpLua.Analyzers (1.27.6→1.29.0).
Helper Method Refactoring
src/ANcpLua.Analyzers/Analyzers/AL0127OutdatedMafPackageVersionAnalyzer.cs, src/ANcpLua.Analyzers/MappingRegistry.cs
Replaced GetOrNull helper with explicit TryGetValue pattern. MappingRegistry additionally converted from IReadOnlyDictionary to mutable Dictionary fields for variable and suffix mappings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

area:infra


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Title check ❌ Error Title exceeds 72 character limit at 74 characters and uses conventional commit format correctly with 'build(deps)' prefix, but violates the length requirement. Trim to ≤72 characters. Consider: 'build(deps): bump Roslyn.Utilities 2.0.7→2.2.0 and self-ref 1.27.6→1.29.0' or similar concise variant.
✅ Passed checks (7 passed)
Check name Status Explanation
Description check ✅ Passed Description directly addresses the changeset with specific version bumps, refactoring rationale, and test results.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Otel Instrumentation Required ✅ Passed PR modifies only three existing files with dependency version updates and internal refactoring; no new injectable services or class definitions introduced.
No Unbounded Mcp Responses ✅ Passed PR modifies only .NET analyzer internals with no MCP tool definition changes.
Duckdb Backpressure On Write Paths ✅ Passed PR modifies Roslyn analyzer with version bumps and internal refactoring; no DuckDB write paths introduced.
Cancellationtoken Threading ✅ Passed PR adds only synchronous public methods to MappingRegistry.cs; no new public async methods detected.

Review rate limit: 2/5 reviews remaining, refill in 24 minutes and 41 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 from 2.0.72.2.0 and ANcpLua.Analyzers from 1.27.61.29.0.
  • Replace GetOrNull lookups with TryGetValue(...)? ... : null to 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.

@ANcpLua
ANcpLua merged commit 23fb2c0 into main Apr 30, 2026
5 checks passed
@ANcpLua
ANcpLua deleted the bump-roslyn-utilities-2.2.0 branch April 30, 2026 21:13

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread Version.props
═══════════════════════════════════════════════════════════════════════ -->
<PropertyGroup Label="Analyzers">
<ANcpLuaAnalyzersVersion>1.27.6</ANcpLuaAnalyzersVersion>
<ANcpLuaAnalyzersVersion>1.29.0</ANcpLuaAnalyzersVersion>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The file is missing a newline at the end. While minor, it is a standard practice in C# projects to ensure all source files end with a single newline for consistency and compatibility with various tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants