Repository navigation
docs(observable): correct misleading XML docs and document every function - #34
Open
xperiandri wants to merge 1 commit into
Open
xperiandri wants to merge 1 commit into
xperiandri wants to merge 1 commit into
Conversation
…tion
- `catch`: the remark "Exception does not stop further processing" was
wrong; the handler only sees terminal failures of its exception type,
the failed source is not resumed and `OnErrorResume` passes through.
- `concat`: state that `a |> concat b` emits `b` first.
- `bind`: an inner failure fails the result only while the source runs.
- `cast`: an invalid cast is reported through `OnErrorResume`, and a
null element cast to a value type as a `NullReferenceException`.
- `skip`/`take`: a negative count throws when called; `take 0` completes
at once without subscribing.
- Document the module, `ofType` and the error behaviour of `map`,
`filter` and `where`, and fix the copied typos ("identy", "upn", the
question mark in `take`).
- Name the `mapi` lambda parameters after the element and the index
that R3 passes; the behaviour is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 5, 2026
This was referenced Oct 5, 2026
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Some new documentation remains inaccurate for delayed inner failures and nullable value-type casts.
Review effort: Balanced
Findings: 3
Open (3)
What changed in this PR
Improves XML documentation for observable operators while preserving behavior.
Changes:
- Documents operator semantics, failures, and edge cases.
- Clarifies
mapilambda parameter names. - Updates changelog and repository guidance.
| File | Description |
|---|---|
src/FSharp.Control.R3/Observable.fs |
Expands and corrects operator documentation. |
CHANGELOG.md |
Records the documentation correction. |
.github/copilot-instructions.md |
Refines the Observable.fs description. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+17
to
+19
| /// The result completes when the source and every inner sequence have completed. It fails when the source fails, | ||
| /// or when an inner sequence fails while the source is still running. | ||
| /// </para> |
| /// Casts every element to <typeparamref name="CastType"/>. | ||
| /// An element that cannot be cast is reported through <see cref="M:R3.Observer`1.OnErrorResume(System.Exception)"/> | ||
| /// as an <see cref="T:System.InvalidCastException"/>, or as a <see cref="T:System.NullReferenceException"/> when | ||
| /// a <see langword="null"/> element is cast to a value type, and the sequence continues. |
| /// The result completes when both sequences have completed, and fails as soon as either of them fails. | ||
| let inline merge (source1, source2) = ObservableExtensions.Merge (source1, source2) | ||
|
|
||
| /// Emits the elements that are of type 'R, cast to it, and silently drops the others. |
This branch has not been deployed
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.

Proposed Changes
Part of splitting #22 into small pull requests that can be reviewed one at a time. It is stacked on #33 (
docs/processing-options), so it shows only its own change; merge #33 first.Documentation only, apart from naming the
mapilambda parameters after the element and the index that R3 passes; the behaviour is unchanged.catch: the remark "Exception does not stop further processing" was wrong; the handler only sees terminal failures of its exception type, the failed source is not resumed andOnErrorResumepasses through.concat:a |> concat bemitsbfirst.bind: an inner failure fails the result only while the source runs.cast: an invalid cast is reported throughOnErrorResume, and a null element cast to a value type as aNullReferenceException.skip/take: a negative count throws when called;take 0completes at once without subscribing.ofTypeand the error behaviour ofmap,filterandwhereare documented, and the copied typos ("identy", "upn", the question mark intake) are fixed.Types of changes
What types of changes does your code introduce to FSharp.Control.R3?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
Each corrected statement is pinned by a test of
ObservableTests.fsin #22.Stack – every pull request is based on the one before it, so each shows only its own change. Merge them in this order:
AwaitOperationConfigurationcases withAwait#23 refactor!: prefixAwaitOperationConfigurationcases withAwaitmapAsyncoptions eagerly #24 fix: validate the concurrency limit ofmapAsyncoptions eagerlyyield/zerosynchronously to keep element order #25 fix(rxquery): emityield/zerosynchronously to keep element ordersumBywithUnchecked.defaultof#26 fix(rxquery)!: stop seedingsumBywithUnchecked.defaultofrxqueryWithto cancel the terminal query operators #27 feat(rxquery): addrxqueryWithto cancel the terminal query operatorsofSeqreachable asObservable.ofSeq#29 feat(observable)!: makeofSeqreachable asObservable.ofSeqObservable.choosetake avoptionchooser, addObservableOption#30 feat(observable)!: makeObservable.choosetake avoptionchooser, addObservableOptionchunkByBoundariesfor boundaries of any element type #31 feat(observable): addchunkByBoundariesfor boundaries of any element typecancellationTokenfromtoLookup#35 fix(async)!: remove the ignoredcancellationTokenfromtoLookupiterAsyncthroughForEachAsyncinstead ofCountAsync#37 fix: wait foriterAsyncthroughForEachAsyncinstead ofCountAsynciterAsyncreliably and never lose a failure of its action #38 fix: stopiterAsyncreliably and never lose a failure of its actionofTaskconfigureAwaittotrue#39 fix(task)!: defaultofTaskconfigureAwaittotruetoArrayandtoListinto theTask.Observablemodule #40 feat(task)!: movetoArrayandtoListinto theTask.Observablemodulebind,catchandmapAsync#42 docs: document the R3 1.3.1 limitations ofbind,catchandmapAsync🤖 Generated with Claude Code