Skip to content

Adopt MoreLINQ; remove duplicated collection extensions #355

@ChrisonSimtian

Description

@ChrisonSimtian

Tier 2 — Consolidate. src/Fallout.Utilities/Collections/ (~900 LOC, 23 files) contains many LINQ-like helpers that duplicate MoreLINQ: Enumerable.Distinct.cs (DistinctBy), Enumerable.Random.cs (Random/Shuffle), Enumerable.TakeUntil.cs, Enumerable.ForEach.cs.

Action

Add MoreLINQ; delete the duplicated helpers and redirect call sites.

Keep (genuinely Fallout-specific — do NOT delete)

  • Enumerable.TopologicalSort.cs (cycle-detecting sort used for target ordering)
  • LookupTable.cs (mutable ILookup — no BCL/MoreLINQ equivalent)
  • Enumerable.SingleOrDefaultOrError.cs / Enumerable.ToDictionary.cs (custom diagnostic messages)

⚠️ Breaking change

These are public extension methods. Removal breaks consumers → breaking-change, experimental, batched to yearly major, CHANGELOG migration note. Where feasible, keep [Obsolete] forwarders.

Acceptance

  • MoreLINQ added to Directory.Packages.props
  • Duplicated Distinct/Random/TakeUntil/ForEach helpers removed or obsoleted
  • Fallout-specific helpers retained
  • CHANGELOG entry + migration note

From dependency-consolidation audit, 2026-06-02.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking-changeChange is breaking — requires major version bump per CLAUDE.md semver policy.enhancementNew feature or requesttarget/2026Targets the 2026 calendar-version line (current). See ADR-0004.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions