Skip to content

refactor: drop dead shims (Lazy.Create + Dictionary.GetOrDefault)#368

Closed
ChrisonSimtian wants to merge 7 commits into
spike/shim-migration-redesignfrom
refactor/357-drop-dead-shims
Closed

refactor: drop dead shims (Lazy.Create + Dictionary.GetOrDefault)#368
ChrisonSimtian wants to merge 7 commits into
spike/shim-migration-redesignfrom
refactor/357-drop-dead-shims

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

What

  • Inline the 8 Lazy.Create(...) call sites to target-typed new(...). Mark Lazy.Create [Obsolete] as a one-cycle forwarder (kept for soft deprecation, not deleted outright).
  • Delete the netstandard2.0-only GetValueOrDefault polyfill on IReadOnlyDictionary (Dictionary.GetOrDefault.cs).
  • Rewrite its internal call sites (LookupTable, ReflectionUtility, CompletionUtility, TeamCity, TeamCityAttribute) to use TryGetValue so both target frameworks compile without the shim.

Why

  • Lazy.Create<T>(func) is just new Lazy<T>(func) — no value added.
  • The dictionary polyfill was reachable cross-assembly via InternalsVisibleTo. Fallout.Utilities still multi-targets netstandard2.0, so the polyfill was not actually dead; the call sites are now framework-agnostic, which is what lets the file go.

Tests

  • dotnet build fallout.slnx — green (both netstandard2.0 and net10.0).
  • dotnet test tests/Fallout.Utilities.Tests — 187 passed.
  • dotnet test tests/Fallout.Common.Tests — only pre-existing failure GitHubRepositoryFromLocalDirectoryTest (worktree path artifact, fails on base too; unrelated).

Notes

This is a breaking change to public surface (Lazy.Create obsoleted). No CHANGELOG entry per task instruction.

Closes #357

ChrisonSimtian and others added 7 commits May 30, 2026 15:02
…330)

Implements the trigger/hygiene slice of milestone #18 (CI cost & pipeline
structure). #325 (publish-lane realignment) already landed in the ladder PR.

- #318/#326 Cross-platform gated to release intent. windows/macos no longer run
  on main/experimental pushes (or any routine push). They run only on PR-to-
  release/* or support/*, and on v* tag pushes. ("On main we've got our edge":
  the ubuntu-latest PR gate + alpha/preview pipelines.) workflow_dispatch is not
  emitted — the generator only writes it with inputs; GitHub's run re-run covers
  on-demand cross-platform.
- #322 concurrency cancel-in-progress on ubuntu/windows/macos (generator) +
  experimental.yml + preview.yml. NOT on release.yml (never cancel a publish).
- #323/#328 Canonical CI-ignore list (docs/**, .assets/**, **/*.md) on every
  PR/push trigger. (release.yml is tag-triggered, so path-ignore is N/A there.)
- #327 Codified "feature branches run zero CI until PR'd" + the trigger model in
  docs/agents/conventions.md, with what-not-to-do guards.
- #329 Dropped dead 'submodules: recursive' from all checkouts + the generator
  (no .gitmodules; full build passes without it) and the stale vendor comment.

Generated workflows regenerated from build/Build.CI.GitHubActions.cs.

Deferred (own follow-ups): #324 split Build/Test/Pack stages; #328 caching
deep-dive; #327 automated reflective guard-test (docs guard in place now).

Also unblocked publishing separately: the github-packages environment
deployment policy now allows experimental/main/release/*/support/* + v* tags.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…328) (#331)

#324 — experimental.yml and preview.yml ran `dotnet fallout Pack` only, publishing
alpha/preview packages WITHOUT running tests. Both now run `dotnet fallout Test Pack`
(release.yml + the PR gate already did). One invocation = NUKE's discrete internal
stages (Restore → Compile → Test → Pack), failing at the breaking stage; a test
failure stops the job before the push step, so untested packages never publish.
Separate per-step `dotnet fallout` invocations are avoided on purpose — each re-runs
the dependency graph (double-compile); the single invocation is the staged build.

#328 — added `restore-keys:` prefix fallback to the hand-written workflows' caches
for faster partial restores on key miss. Evaluation: current key (global.json +
*.csproj + Directory.Packages.props) is the right dependency set; no packages.lock.json
exists to add; build-output (bin/obj) caching deliberately not done (stale-artifact
risk). Canonical ignore list (docs/.assets/md) already applied in the trigger PR.

Codified both in docs/agents/conventions.md.

Deferred: #327 automated reflective guard-test (docs guard already in place).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Repo moved ChrisonSimtian/Fallout → Fallout-build/Fallout. Owner-scoped refs that
don't auto-redirect, fixed on main:

- GitHub Packages feed URL nuget.pkg.github.com/ChrisonSimtian → /Fallout-build
  (release.yml, preview.yml, experimental.yml, + consumer docs: shim READMEs,
  from-nuke.md, release-and-versioning.md, CHANGELOG mention)
- CODEOWNERS @ChrisonSimtian@Fallout-build/maintainers (team now has Maintain access)

Feed stays PAT-gated (GitHub Packages has no anonymous access even when public; #344).
Web links / badges / issue refs redirect automatically and are left for a later sweep.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Updated star tracking links and attribution in README.
)

User feedback: AI-written issues are too complex and hard to read, especially for non-native English speakers. Require short, plain, bulleted output for issues, PR bodies/comments, and commit messages.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Inline Lazy.Create call sites to target-typed `new(...)`; mark
  Lazy.Create [Obsolete] as a one-cycle forwarder (public surface).
- Remove the netstandard2.0-only GetValueOrDefault polyfill on
  IReadOnlyDictionary; rewrite its internal call sites to TryGetValue
  so both netstandard2.0 and net10.0 compile without the shim.

Closes #357

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ChrisonSimtian ChrisonSimtian requested a review from a team as a code owner June 3, 2026 07:54
@ChrisonSimtian ChrisonSimtian added breaking-change Change is breaking — requires major version bump per CLAUDE.md semver policy. target/2026 Targets the 2026 calendar-version line (current). See ADR-0004. labels Jun 3, 2026
@ChrisonSimtian

Copy link
Copy Markdown
Collaborator Author

Discarding. The agent worktrees forked from the pre-rearchitecture tree (main), so this is implemented against old paths (Fallout.Build/Common/Utilities) and does not stack cleanly on #359. Will redo on the new onion structure after #359 merges. Issue stays open.

@ChrisonSimtian ChrisonSimtian deleted the refactor/357-drop-dead-shims branch June 3, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Change is breaking — requires major version bump per CLAUDE.md semver policy. target/2026 Targets the 2026 calendar-version line (current). See ADR-0004.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant