Repository navigation
refactor(generator)!: drop IEnumerable member support - #17
Merged
OleRoss merged 1 commit intoOct 4, 2026
Merged
Conversation
Require counted collection members and reuse the existing span writers. Remove enum enumerable handling, list wrappers, runtime collection shortcuts, and duplicate utility selection. BREAKING CHANGE: IEnumerable<T> members are rejected. Materialize lazy sequences explicitly; collections below declared or minimum counts now fail consistently.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lazy
IEnumerable<T>members do not fit the separate sizing and writing API: counting can consume a sequence before serialization, and repeating a sequence can produce different data. No consumer needs this support. Reject these members, including declarations withBinaryElementCount, and keep arrays, memory, lists, and the four counted collection interfaces.Stacked on #16; the base is
codex/fix-floating-enum-collections.Changes
IEnumerable<T>members. Ignored members remain allowed.Countdirectly forICollection<T>,IReadOnlyCollection<T>,IList<T>, andIReadOnlyList<T>; sizing never enumerates.falseinstead of reporting unwritten bytes as successfully written. Surplus elements remain ignored for declared-count members.Testing
dotnet testlauncher failed.git diff --checkpassed. Independent local review found no remaining substantive issues.Impact
Breaking source change: replace
IEnumerable<T>declarations with supported collection types and explicitly materialize lazy sequences withToArray()orToList(). Writes below a declared or minimum count now consistently fail. Valid retained declarations keep their binary layout. Keep collections unchanged between sizing and writing and throughout serialization.Checklist