Skip to content

[Repo Assist] Upgrade fable to 5.0.0-rc.7 and .NET SDK to 10.0.100 (fixes 6+ hour CI hang) #306

Description

@github-actions

🤖 This is an automated pull request from Repo Assist.

This PR addresses the request from @dsyme (repeated 3 times) to upgrade Fable to fix the CI hang in PR #302.

Problem

The "Test Fable" CI step hangs indefinitely (cancelled after 6+ hours) when using fable 4.x with the .NET 10 SDK. This affects PR #302 which bumped the SDK from 8.0.19 to 10.0.100.

Root Cause

Fable 4.x is incompatible with the .NET 10 SDK and enters an infinite loop during compilation. fable 5.0.0-rc.7 is fully compatible with .NET 10 and compiles in ~20 seconds.

Note: fable 5.0.0-rc.12 (as requested) is not yet available on NuGet — 5.0.0-rc.7 is the latest prerelease at time of writing.

Changes

.config/dotnet-tools.json

  • fable: 4.25.05.0.0-rc.7

global.json

  • SDK version: 8.0.1910.0.100 (required for fable 5 to restore correctly)

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

  • Added Condition="'$(FABLE_COMPILER)' != 'True'" to the EnableSourceLink property.
  • Why: Fable 5 sets the FABLE_COMPILER MSBuild property during evaluation. Without this condition, SourceLink embeds obj/Release/netstandard2.1/FSharp.Control.AsyncSeq.AssemblyInfo.fs into the compilation, which the Fable compiler rejects with: error FSHARP: Files in libraries must begin with namespace/module declaration.

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

  • Fixed 4 tests that used Jest.expect(promise).rejects.toThrow().
  • Why: In Fable 4, failwith "msg" compiled to throw new Error("msg"). In Fable 5, it compiles to throw new Exception("msg") where Exception is a custom class from fable-library-js that does not extend JavaScript's Error. jest 26's rejects.toThrow() only catches Error instances, so these tests failed.
  • Fix: Replaced with Async.Catch + Choice2Of2 pattern match:
    // Before
    do! Jest.expect(f |> Async.StartAsPromise).rejects.toThrow()
    // After
    let! result = f |> Async.Catch
    Jest.expect(result |> (function Choice2Of2 _ -> true | _ -> false)).toBe(true)

Test Status

Fable tests: 78/78 passed (fable 5.0.0-rc.7, ~20 seconds)
.NET build: succeeded (0 errors, pre-existing warnings only)
.NET tests: 402/402 passed


Warning

Protected Files

This was originally intended as a pull request, but the patch modifies protected files. These files may affect project dependencies, CI/CD pipelines, or agent behaviour. Please review the changes carefully before creating the pull request.

Click here to create the pull request once you have reviewed the changes

Protected files
  • global.json

To route changes like this to a review issue instead of blocking, configure protected-files: fallback-to-issue in your workflow configuration.

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@7ee2b60744abf71b985bead4599640f165edcd93

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions