Skip to content

chore: the review fixes of #31 in the files of main, and FlatList.clear - #54

Open
xperiandri wants to merge 6 commits into
mainfrom
chore/review-rules
Open

xperiandri wants to merge 6 commits into
mainfrom
chore/review-rules

Conversation

@xperiandri

@xperiandri xperiandri commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

The review of #31 found things that are in the files of main too. The open pull requests fix them in the lines that they add, so the lines of main need a pull request of their own. Nothing here changes a file that an open pull request deletes.

One commit for each thing:

What is left to the pull requests that change the same lines, so that the branches do not conflict:

Verification

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added FlatList.clear to empty a list. Clearing an empty list keeps it empty; attempting to clear a default-initialized list is rejected.
  • Documentation
    • Updated FlatList function listings and clarified XML documentation formatting and references.
    • Refined documentation across collection APIs without changing their documented behavior.
  • Tests
    • Added coverage for clearing non-empty and empty lists, and for rejecting default-initialized lists.

xperiandri and others added 4 commits November 30, 2026 04:27
It returns the empty flat list, as `ImmutableArray.Clear` does, and rejects a default flat list as the other functions of the module do. `IndexedList`, `Queue` and `Stack` get a `clear` in their pull requests, so that the modules of the lists do not differ in it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h `'` instead of `^`

F# 7 accepts both for a statically resolved type parameter, and the signatures of the assembly and the generated documentation are the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comments only; the code without them is the same.

The references to the ADRs leave the comments: the documentation of the internal modules is in the XML of the package too, and a reader of it has no ADR. The cases of the option types are `<see cref>`, not `<c>`. `<summary>` and `<remarks>` take one line each when their own text has up to 60 characters, whatever the length of the other one.

`FlatListCE` is left to #52, which changes the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n length

The rule tied the layout of the two elements together, so that a remark such as `O(1).` took three lines under a long summary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 51 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 03088bdf-03d0-4c22-909b-b923845a9954
Commits

Reviewing files that changed from the base of the PR and between 8dabd7f and 3c0d253.

Files selected for processing: 2

  • tests/FSharp.Collections.Immutable.Tests/FlatList/FlatListComputationExpressionTests.fs
  • tests/FSharp.Collections.Immutable.Tests/FlatList/FlatListTests.fs

No actionable comments were generated in the recent review.

Walkthrough

The PR adds FlatList.clear, updates generic parameters on sequential and parallel aggregate functions, and reformats XML documentation and comments across the repository.

Changes: FlatList API changes

Layer / File(s) Summary
Add FlatList.clear
src/FSharp.Collections.Immutable/FlatList/FlatList.fs, src/FSharp.Collections.Immutable/FlatList/FlatList.fsi, tests/FSharp.Collections.Immutable.Tests/FlatList/FlatListTests.fs, CHANGELOG.md
The API adds clear. It rejects a default FlatList and calls Clear(). Tests cover default-value rejection and verify that clearing returns an empty flat list.
Update aggregate generic parameters
src/FSharp.Collections.Immutable/FlatList/FlatList.fs, src/FSharp.Collections.Immutable/FlatList/FlatList.fsi, tests/FSharp.Collections.Immutable.Tests/Assert.fs
Sequential and parallel average, averageBy, sum, and sumBy signatures use ordinary generic parameters. Assertion helper type parameters change in the same way.

Documentation and comment updates

Layer / File(s) Summary
Reformat API XML documentation
src/FSharp.Collections.Immutable/FlatList/FlatList.fsi, src/FSharp.Collections.Immutable/FlatList/FlatListBuilder.fsi, src/FSharp.Collections.Immutable/FlatList/FlatListOption.fsi, src/FSharp.Collections.Immutable/FlatList/FlatListTuple.fsi, src/FSharp.Collections.Immutable/FlatList/FlatListTypes.fs, src/FSharp.Collections.Immutable/Helper/*
Documentation formatting changes across FlatList and helper APIs. XML references replace literal option and choice-case text in the documented outcomes.
Update documentation guidance and comments
.github/copilot-instructions.md, build/CheckOrder.fs, build/build.fs, src/FSharp.Collections.Immutable/ComputationExpressions.fsi, src/FSharp.Collections.Immutable/FlatList/FlatList.fs, src/FSharp.Collections.Immutable/Helper/*, tests/FSharp.Collections.Immutable.Tests/*
The XML documentation guideline applies its line-length rule separately to <summary> and <remarks>. Comments in build, source, and test files remove ADR references; described behavior remains unchanged.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Possibly related issues

Possibly related PRs

Suggested reviewers: vectortetra, irina-konovalova

Merge Risk: Minimal · previous review 8dabd

The PR adds FlatList.clear and reformats documentation and comments without changing runtime behavior elsewhere. No concrete merge-blocking risk was found. Unresolved documentation cross-references are a minor, speculative concern.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names two parts of the changeset: a chore that applies review fixes from #31 to files on main, and the addition of FlatList.clear. The change set adds FlatList.clear and mostly removes ADR r…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title names two parts of the changeset: a chore that applies review fixes from #31 to files on main, and the addition of FlatList.clear. The change set adds FlatList.clear and mostly removes ADR references and reformats documentation, along with statically resolved type parameter notation changes. The title covers a real part of the change but not the main point, which is mainly documentation and review-fix cleanup, so it is partially related. It is specific and not vague.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9ab8d46c-094e-42b7-ab81-fcb27cf80e80
Commits

Reviewing files that changed from the base of the PR and between 6b106fc and 8dabd7f.

Files selected for processing: 30

  • .github/copilot-instructions.md
  • CHANGELOG.md
  • build/CheckOrder.fs
  • build/build.fs
  • src/FSharp.Collections.Immutable/ComputationExpressions.fsi
  • src/FSharp.Collections.Immutable/FlatList/FlatList.fs
  • src/FSharp.Collections.Immutable/FlatList/FlatList.fsi
  • src/FSharp.Collections.Immutable/FlatList/FlatListBuilder.fsi
  • src/FSharp.Collections.Immutable/FlatList/FlatListOption.fsi
  • src/FSharp.Collections.Immutable/FlatList/FlatListTuple.fsi
  • src/FSharp.Collections.Immutable/FlatList/FlatListTypes.fs
  • src/FSharp.Collections.Immutable/Helper/Arrays.fs
  • src/FSharp.Collections.Immutable/Helper/Comparers.fs
  • src/FSharp.Collections.Immutable/Helper/ErrorStrings.fs
  • src/FSharp.Collections.Immutable/Helper/ImmutableCollectionUtil.fs
  • src/FSharp.Collections.Immutable/Helper/ParallelArrays.fs
  • src/FSharp.Collections.Immutable/Helper/Raise.fs
  • tests/FSharp.Collections.Immutable.Tests/Assert.fs
  • tests/FSharp.Collections.Immutable.Tests/Contracts/ExceptionAssert.fs
  • tests/FSharp.Collections.Immutable.Tests/Contracts/Inputs.fs
  • tests/FSharp.Collections.Immutable.Tests/Contracts/Mirror.fs
  • tests/FSharp.Collections.Immutable.Tests/Contracts/OverrideAssert.fs
  • tests/FSharp.Collections.Immutable.Tests/Contracts/SeqCreationContract.fs
  • tests/FSharp.Collections.Immutable.Tests/Contracts/SeqLike/SeqLikeAccessContract.fs
  • tests/FSharp.Collections.Immutable.Tests/Contracts/SeqLike/SeqLikeContract.fs
  • tests/FSharp.Collections.Immutable.Tests/Contracts/SeqOps.fs
  • tests/FSharp.Collections.Immutable.Tests/FlatList/FlatListParallelTests.fs
  • tests/FSharp.Collections.Immutable.Tests/FlatList/FlatListTests.fs
  • tests/FSharp.Collections.Immutable.Tests/TestCategories.fs
  • tests/FSharp.Collections.Immutable.Tests/TestCategoriesTests.fs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

xperiandri and others added 2 commits November 30, 2026 04:43
The comments of `FlatList.Parallel.collect` and of `IndexedContract` are left to #53 and #31, which change the lines next to them, so that the branches do not conflict. Those pull requests have the same fix in them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he defects that they are about

`FlatList.except` removed objects from a list that has none of them, so the test passed for a function that ignores the items
to exclude. The resource of `use` and the compensation of `try finally` in `flatList { }` have to wait for the end of the
body: the tests passed also for an expression that disposes the resource first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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.

1 participant