Skip to content

Comments

Fix Fable compatibility: guard getIterator obsolete attribute and complete #if FABLE_COMPILER cleanup#233

Merged
dsyme merged 3 commits intorepo-assist/v4-bcl-iasyncenumerable-migration-3b81040f29c8a5a6from
copilot/sub-pr-231-again
Feb 22, 2026
Merged

Fix Fable compatibility: guard getIterator obsolete attribute and complete #if FABLE_COMPILER cleanup#233
dsyme merged 3 commits intorepo-assist/v4-bcl-iasyncenumerable-migration-3b81040f29c8a5a6from
copilot/sub-pr-231-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 22, 2026

Addresses remaining Fable build errors from the AsyncSeq v4 IAsyncEnumerable<'T> migration and cleans up [<Obsolete>] attribute handling for Fable vs .NET builds.

Fable build errors (fixed in previous sub-PR, now merged)

  • ValueTask<T> unavailable in Fable — guarded AsyncSeqImpl<'T>'s IAsyncEnumerator implementation with #if !FABLE_COMPILER
  • IAsyncEnumerable<_>.GetEnumerator not found — for Fable, AsyncSeq<'T> is now defined as an interface with a public GetEnumerator() returning IAsyncSeqEnumerator<'T>, avoiding BCL types unavailable in Fable

[<Obsolete>] attribute cleanup

getIterator in AsyncSeq.fsi was unconditionally marked [<System.Obsolete("Use .GetEnumerator directly")>], but the message only makes sense for Fable (where GetEnumerator() is a public interface method on AsyncSeq<'T>). In .NET builds, GetEnumerator() is an internal extension method not exposed in .fsi, making the guidance incorrect.

Guard the attribute:

#if FABLE_COMPILER
[<System.Obsolete("Use .GetEnumerator directly") >]
#endif
val getIterator : source:AsyncSeq<'T> -> (unit -> Async<'T option>)

ofAsyncEnum/toAsyncEnum are already marked [<Obsolete>] and correctly excluded from Fable via #if !FABLE_COMPILER (they reference IAsyncEnumerable<'T> which doesn't exist in Fable).


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits February 22, 2026 11:50
Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com>
Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com>
Copilot AI changed the title [WIP] Update AsyncSeq for Fable compatibility in migration Fix Fable compatibility: guard getIterator obsolete attribute and complete #if FABLE_COMPILER cleanup Feb 22, 2026
@dsyme dsyme marked this pull request as ready for review February 22, 2026 13:13
@dsyme dsyme merged commit 51f5b85 into repo-assist/v4-bcl-iasyncenumerable-migration-3b81040f29c8a5a6 Feb 22, 2026
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.

2 participants