Skip to content

Commit 7e64987

Browse files
authored
Merge pull request #309 from fsprojects/repo-assist/eng-fable5-upgrade-20260409-373da99b57781aea
[Repo Assist] Upgrade fable to 5.0.0-rc.7 and .NET SDK to 10.0.100 (fixes 6+ hour CI hang)
2 parents 13d3e42 + 96aef3e commit 7e64987

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"rollForward": false
1111
},
1212
"fable": {
13-
"version": "4.25.0",
13+
"version": "5.0.0-rc.7",
1414
"commands": [
1515
"fable"
1616
],

RELEASE_NOTES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
### 4.13.0
22

3+
* CI: Upgrade Fable from 4.25.0 to 5.0.0-rc.7 and .NET SDK from 8.0.19 to 10.0.100 to fix a CI hang where the Fable build step ran for 6+ hours with .NET 10. Fable 5 + .NET 10 compiles in ~20 seconds.
4+
* CI: Conditionally disable SourceLink for Fable builds to fix a compilation error where AssemblyInfo.fs was being embedded by SourceLink and passed to the Fable compiler.
5+
* Tests: Update 4 Fable tests that used `rejects.toThrow()` to use `Async.Catch` with a `Choice2Of2` pattern match instead, since Fable 5's `failwith` throws a custom `Exception` type that is not a JavaScript `Error` instance.
36
* Added `AsyncSeq.ofList` — creates an async sequence from an F# list with an optimised direct-enumerator implementation (avoids `IEnumerator<T>` boxing).
47
* Added `AsyncSeq.ofArray` — creates an async sequence from an array with an optimised index-based enumerator (avoids `IEnumerator<T>` boxing).
58
* Added `AsyncSeq.cycle` — infinitely cycles through all elements of a source async sequence; returns empty if the source is empty.

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "8.0.19",
3+
"version": "10.0.100",
44
"rollForward": "minor"
55
}
66
}

src/FSharp.Control.AsyncSeq/FSharp.Control.AsyncSeq.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
1717
<RepositoryType>git</RepositoryType>
1818
<GenerateDocumentationFile>true</GenerateDocumentationFile>
19-
<EnableSourceLink>true</EnableSourceLink>
19+
<EnableSourceLink Condition="'$(FABLE_COMPILER)' != 'True'">true</EnableSourceLink>
2020
</PropertyGroup>
2121
<ItemGroup>
2222
<Compile Include="AsyncSeq.fsi" />

tests/fable/FSharp.Control.AsyncSeq.Tests/AsyncSeq.test.fs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,8 @@ Jest.describe("AsyncSeq.interleave", fun () ->
400400
return! AsyncSeq.interleave s1 s2 |> AsyncSeq.toArrayAsync
401401
}
402402

403-
do! Jest.expect(f |> Async.StartAsPromise).rejects.toThrow()
403+
let! result = f |> Async.Catch
404+
Jest.expect(result |> (function Choice2Of2 _ -> true | _ -> false)).toBe(true)
404405
})
405406
)
406407

@@ -481,11 +482,13 @@ Jest.describe("AsyncSeq.try", fun () ->
481482

482483
Jest.expect(x.Value).toBe(0)
483484

484-
do! Jest.expect(s |> AsyncSeq.toListAsync |> Async.StartAsPromise).rejects.toThrow()
485+
let! result1 = s |> AsyncSeq.toListAsync |> Async.Catch
486+
Jest.expect(result1 |> (function Choice2Of2 _ -> true | _ -> false)).toBe(true)
485487

486488
Jest.expect(x.Value).toBe(3)
487489

488-
do! Jest.expect(s |> AsyncSeq.toListAsync |> Async.StartAsPromise).rejects.toThrow()
490+
let! result2 = s |> AsyncSeq.toListAsync |> Async.Catch
491+
Jest.expect(result2 |> (function Choice2Of2 _ -> true | _ -> false)).toBe(true)
489492

490493
Jest.expect(x.Value).toBe(6)
491494
})
@@ -991,15 +994,17 @@ Jest.describe("AsyncSeq.ofObservableBuffered", fun () ->
991994
let src, discarded = observe [] true
992995
let actual = src |> AsyncSeq.ofObservableBuffered |> AsyncSeq.toArrayAsync
993996

994-
do! Jest.expect(actual |> Async.StartAsPromise).rejects.toThrow()
997+
let! result = actual |> Async.Catch
998+
Jest.expect(result |> (function Choice2Of2 _ -> true | _ -> false)).toBe(true)
995999
Jest.expect(discarded()).toBe(true)
9961000
})
9971001

9981002
Jest.test("AsyncSeq.ofObservableBuffered should work (one, fail)", async {
9991003
let src, discarded = observe [1] true
10001004
let actual = src |> AsyncSeq.ofObservableBuffered |> AsyncSeq.toArrayAsync
10011005

1002-
do! Jest.expect(actual |> Async.StartAsPromise).rejects.toThrow()
1006+
let! result = actual |> Async.Catch
1007+
Jest.expect(result |> (function Choice2Of2 _ -> true | _ -> false)).toBe(true)
10031008
Jest.expect(discarded()).toBe(true)
10041009
})
10051010

0 commit comments

Comments
 (0)