Repository navigation
feat: C# 14 extension members with versioned Roslyn analyzers - #57
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review Please review the latest feature head for correctness, symbol capture, receiver conversions, generated API collisions and Roslyn host compatibility. The documented AM0021 exclusions are intentional. MERGE ONLY AFTER OWNER APPROVAL; this PR must remain open targeting dev_v0_8_0. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 713c68d1f5
ℹ️ 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".
|
Validation update for HEAD 713c68d: GitHub CI is green, including restore, Release build, tests, NuGet pack and package-consumer smoke. Run: https://github.com/Raffinert/AlephMapper/actions/runs/41689329495 . Local full suite: 186 passed, 0 failed/skipped; Debug build and fresh CSharp14/net10 plus classic CSharp12/net8 packaged consumer execution also passed. Existing nullable warnings remain visible. Independent local review findings were fixed across three bounded cycles. Remote Codex review is still running. main remains 3fcc1a7, integration remains d154572. PR must remain OPEN and unmerged pending explicit owner approval. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a11b37295e
ℹ️ 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".
|
@codex review Final bounded remote review cycle3/3 for HEAD9aac79a. Addressed inferred anonymous member naming; preserved root nameof constants and recorded that nameof(extensionProperty) is itself CSharp14-invalid (CS9316). Both previous threads answered/resolved. Full191 tests, Release/Debug builds, pack and fresh net10/net8 consumers pass. Do not merge; owner approval is required. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review Owner-requested compatibility follow-up in5090695/811f9d0: one NuGet now ships shared-source Roslyn4.8 and5.0 analyzer bands. Actual csc4.8/4.14/5.0 plus SDK5.9 package-selection/runtime checks and full191 tests pass. Please focus this review on the new multiversion packaging/shim/CI changes since9aac79a. Clean Release build plus pack --no-build is covered. This PR must remain unmerged pending owner approval. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
* fix: preserve switch and inlining semantics in generated expressions (#56) * fix: lower switch type and relational patterns without changing semantics * fix: preserve method symbols during inlining and report unsupported rewrites * test: cover switch semantics, symbol substitution and safe inlining * test: use observably side-effectful argument in AM0020 regression * fix: initialize shared nested diagnostic collections once * docs: align usage samples with generated APIs * docs: align usage samples with generated APIs * fix: do not classify null-forgiving operator as a side effect * fix: avoid redundant parentheses for already-grouped arguments * test: align switch-safe inlining golden output formatting * fix: address method-group receiver substitution and update-only switch review * fix: preserve binding in conditional indexers and switch pattern locals * fix: avoid redeclaring pattern designation local * test: keep Ignore indexed access case separate from nullable coalescing * test: make Ignore-mode non-null precondition explicit * fix: group lower-precedence switch governing expressions after helper inlining * test: prevent switch helper inlining from changing && comparison precedence * fix: preserve switch guard precedence after helper inlining * fix: visit LINQ method-group receiver outside callee call stack * fix: reject effectful switch inputs duplicated by expression lowering * test: repeated method-group helper in LINQ chain is not circular * test: detect repeated switch inputs without rejecting single evaluation * fix: bind declaration pattern locals within nested pattern wrappers * test: nested parenthesized pattern local resolves without capturing caller name * fix: preserve helper-body precedence at direct-call inline site * test: direct inline and switch arm preserve arithmetic precedence * fix: preserve inlining precedence without unnecessary grouping in snapshots * fix: allow repeated switch input evaluation like ExpressiveSharp * test: allow repeated governing calls and ToLower switch expression * fix: parenthesize cast operands and right-associative coalescing inliners * fix: preserve helper declared return conversions when inlining * fix: guard relational narrowing and correct NaN/null pattern semantics * fix: retain safe-repeatability for synthesized null-conditional ternaries * fix: make AM0020 path-sensitive and detect reordered effectful arguments * test: cast, coalescing, numeric conversion, null-pattern and nullable inlining regressions * test: relational/NaN diagnostics and AM0020 path and argument-order safety * docs: explain ExpressiveSharp-compatible switch input re-evaluation policy * docs: align AM0020 message with reordered or omitted argument protections * refactor: remove AM0020 evaluation guard from helper inlining * refactor: drop AM0020 blocking from projection generation * refactor: remove AM0020 checks from update generation * refactor: remove AM0020 checks from adaptation generation * refactor: remove obsolete AM0020 diagnostic descriptor * test: verify unguarded effectful helper inlining * docs: explain unguarded helper argument substitution policy * docs: remove obsolete AM0020 reference from README * refactor: carry symbol bindings in switch pattern lowering results * feat: lower type var and recursive property switch patterns * feat: lower verified array and list patterns with noncapturing slices * feat: verify record components and preserve nested switch conversions * fix: preserve pattern narrowing and helper parameter conversions * fix: group converted lambda arguments during helper inlining * docs: record switch parity coverage and final verification * update packages, reference System.Security.Cryptography.Pkcs" Version="10.0.14 directly until Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing fixed to refer good version of Pkcs * style: remove extra blank lines in semantic regression tests * feat: C# 14 extension members with versioned Roslyn analyzers (#57) Add source-generated C# 14 extension methods/properties and symbol-aware composition. Ship shared-source Roslyn 4.8 and 5.0 analyzer bands with automatic compatible selection. Validated: 191 tests; actual compiler 4.8/4.14/5.0/5.9 package matrix on Windows and Linux; Release/Debug builds; clean no-build packing; final Codex review without findings. Squash merge into dev_v0_8_0 explicitly approved by owner. * fix: centralize mapper validation and symbol-based member reservations * refactor: share inlining context, binding and reference handling * fix: handle unnamed tuple signatures and document switch comparison * chore: bump AlephMapper to 0.8.0 * docs: credit ExpressiveSharp inspiration * fix: preserve expressions when nullable visitor returns null
C#14 instance extension methods and expression properties now generate static expression factories and inline transitively. The package ships separate Roslyn4.8 and Roslyn5.0 analyzer assets, preserving older compiler-host support.
MERGE ONLY AFTER OWNER APPROVAL. Target: dev_v0_8_0; keep this PR open/unmerged. No auto-merge, release, tag or NuGet publication.
Generated API:
Compiler compatibility:
Validation:
Extension scope: primitive/interface/struct/nullable/reference receivers, named arguments and overloads, classic/CSharp14 composition, nested LINQ and switches, null strategies, symbol-safe lambda/anonymous-member binding, deterministic partial discovery.
AM0021 exclusions: generic extension blocks/methods, static extension members, block/accessor bodies, query syntax, bound extension method groups, optional/params/ref arguments, ref-like receivers/ref returns, factory signature conflicts and inaccessible expanded dependencies. Direct Updatable/Adapt extension requests are diagnosed. Existing classic Update/Adapt remain supported; no AM0020 or purity gate was restored. SQL translation remains provider dependent; SQLite scalar DTO projection is tested.
Baseline: #56 squash-merged on 2026-11-03 into dev_v0_8_0 at d154572. main remains3fcc1a76b1bec0f4f6eacda49add93c8879e0350.
Multiversion plan/evidence | extension matrix | execution log | unpublished release draft.
The extension-members PR has NOT been merged. Awaiting owner approval to merge into dev_v0_8_0.
Final compatibility verification: HEAD811f9d0f2c1182a5bdff845bfda350d62bcba6da. CI on Linux passed, including the new real-compiler matrix and no-build packaging: https://github.com/Raffinert/AlephMapper/actions/runs/41699486158 . Local Windows matrix also passed. Full191 tests pass. Codex compatibility review completed on this exact HEAD with no findings and no unresolved findings. Worktree clean; main/integration unchanged; PR remains OPEN and unmerged.