Skip to content

Comments

[Repo Assist] Add CompilerMessage warning to groupBy/groupByAsync (closes #125)#235

Merged
dsyme merged 1 commit intomainfrom
repo-assist/fix-groupby-compilermessage-warning-issue125-f644cf01cb793fcb
Feb 22, 2026
Merged

[Repo Assist] Add CompilerMessage warning to groupBy/groupByAsync (closes #125)#235
dsyme merged 1 commit intomainfrom
repo-assist/fix-groupby-compilermessage-warning-issue125-f644cf01cb793fcb

Conversation

@github-actions
Copy link
Contributor

🤖 Repo Assist here — I'm an automated AI assistant for this repository.

Implements dsyme's request to add a [(CompilerMessage)] warning to groupBy and groupByAsync.

What changed

Both groupBy and groupByAsync now emit an FS9999 compiler warning at every call site:

The result of groupBy must be consumed with a parallel combinator such as AsyncSeq.mapAsyncParallel. Sequential consumption will deadlock because sub-sequence completion depends on other sub-sequences being consumed concurrently.

The warning is added to both the .fs (implementation) and .fsi (signature) files so it fires regardless of how the module is referenced.

To suppress the warning in code that correctly consumes the result in parallel, callers can use #nowarn "9999" locally.

Root cause

groupBy/groupByAsync create sub-sequences whose completion is interdependent — the outer sequence must advance to let each sub-sequence complete. Sequential consumption (e.g. with mapAsync) blocks waiting for a sub-sequence to finish while the sub-sequence waits for the outer sequence to advance, causing a deadlock. Previously this was only documented in the XML doc comment, which many users miss.

Test Status

Build succeeded
189/190 tests pass — 1 pre-existing flaky timing failure (bufferByTimeAndCount) unrelated to this change
⚠️ Fable tests: 9 pre-existing build errors in the Fable test project (from v4 migration on main); unrelated to this change

Generated by Repo Assist

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@077cdbca7864e820e3425e9598cf1269d3dce05a. View source at https://github.com/githubnext/agentics/tree/077cdbca7864e820e3425e9598cf1269d3dce05a/workflows/repo-assist.md.

…consumption requirement

Adds FS9999 warning to both groupBy and groupByAsync to alert callers that
the resulting sequence must be consumed with a parallel combinator (e.g.
AsyncSeq.mapAsyncParallel) to avoid deadlocks.

Closes #125

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme dsyme marked this pull request as ready for review February 22, 2026 13:55
@dsyme dsyme closed this Feb 22, 2026
@dsyme dsyme reopened this Feb 22, 2026
@dsyme dsyme merged commit b416593 into main Feb 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant