Skip to content

Fix nullable intermediate enum source paths - #50

Draft
AGiorgetti wants to merge 2 commits into
developfrom
fix/48-nullable-enum-path
Draft

AGiorgetti wants to merge 2 commits into
developfrom
fix/48-nullable-enum-path

Conversation

@AGiorgetti

@AGiorgetti AGiorgetti commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Preserve effective source-path nullability when lowering built-in enum mappings, separately from the leaf enum symbol's type.
  • Reuse the nullable enum wrapper for required-member initialization when a patch update constructs a missing destination, without reselecting converters.
  • Add runtime regressions, a shared source/package consumer example, and update the documented limitation. Public API and specification semantics are unchanged.

Fixes #48.

Test-first evidence

  • On unchanged production: 28 failures and 42 passing controls in the final 70-case enum fixture; the normally compiled Basic sample also reproduced the missing-path failure.

  • Four additional required nullable enum initializer cases failed the first candidate, while the explicit nullable-input converter control passed.

  • Final focused validation: 184 passed, zero failures or skips. Cases cover create/constructor/update/patch, by-name/by-value, known/unknown/null values, nullable leaves, reference paths followed by value/tuple fields, changing getters, stable exception metadata, numeric policy, converter precedence, and sequential update effects.

  • Initial CI exposed five Windows-only fixture failures caused by an LF-only insertion anchor. The follow-up uses the unique mapping attribute instead; all 75 enum cases pass with CRLF and the full 989-case generator suite passes after restoring LF. No assertions or production logic changed.

Local validation

  • Release solution build: zero warnings or errors.
  • Full generator: 989 passed; runtime: 5 passed; integration: 1 passed. Zero failures or skips in these suites.
  • All three source samples pass. The consumer-skill validator, solution-path consistency check, CRLF-aware whitespace check, and independent read-only review pass.
  • Available packaging: 224 passed, two infrastructure failures, zero skips. All 12 framework/language consumers, clean-package samples, package/API checks, usage checks and benchmark smoke passed. The shared example runs in the matrix, including genuine netstandard2.0/C#9 references.
  • Local trimming and Native AOT stopped at MSBuild ILLink task-host creation (MSB4216 / SocketException 13). PowerShell and clang are absent; 49 PowerShell-dependent cases were not run locally. No tests or warnings were weakened. The successful exact-head CI below covers these remaining gates.

CI and review boundary

Verified published head: 532a3b484d9c480ae9af1cd3a2d59f16fbb0c085; tree: bb19214ff83fac1b678f249fc03afc0597d3885a matches the locally validated tree. CI #109 completed successfully on this exact head. Its checked-out merge tree also matches the validated head tree.

  • Windows and Linux each passed 1,270 tests: 989 generator, 5 runtime, 275 packaging, and 1 integration; zero failures or skips. Both builds reported zero warnings/errors.
  • All six Roslyn jobs (4.8.0, 4.14.0, 5.9.0 on both OS) each passed 989 tests, with zero failures or skips.
  • Both full jobs ran the unfiltered packaging suite with LITEMAPPER_REQUIRE_NATIVE_AOT=1, covering trimming, Native AOT, and the PowerShell-dependent cases unavailable locally. Linux sample/benchmark smoke and both solution-path checks passed.
  • Release-only jobs were skipped as expected for an ordinary PR.

This draft is ready for human review. No merge, release, tag, NuGet publication, or workflow dispatch was performed.

Nullable value-type intermediate traversal that fails earlier source-path resolution is outside this enum-lowering repair.

Prepared with OpenAI Codex.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P2] Preserve null from a missing enum source-path intermediate

1 participant