Skip to content

Incorrect state machine compilation in debug #20466

Description

@majocha

Please provide a succinct description of the issue.

Repro steps

  1. Clone https://github.com/fsprojects/FSharp.Control.TaskSeq
  2. just run smoke tests in VS test explorer or:
    edit sdk pin in global.json to "10.0.400"
    dotnet test -c Debug .\src\FSharp.Control.TaskSeq.SmokeTests\
    builds fine, runs fine, taskSeq produces wrong values and tests fail.

This is particularly nasty, because it builds and runs, just the execution is wrong.

Tests pass up to sdk 10.0.204, fail for 10.0.400 and 11 preview.

Activity

  1. added theissue type on Sep 6, 2026
  2. added this to the Backlog milestone on Sep 6, 2026
  3. majocha commented on Sep 7, 2026

    @majocha
    ContributorAuthor

    Large part of it is that TaskSeq's dynamic implementation is incomplete and untested. Up til recently we emitted the static implementation even in debug, so this was hidden and not exercised unless a consumer wrote code that did not statically compile.

  4. added
    Area-ComputationExpressionsEnd-to-end experience for computation expressions (except async and state machine compilation)
    and removed on Sep 7, 2026
  5. T-Gro commented on Sep 9, 2026

    @T-Gro
    Member

    <OtherFlags>--always-inline+</OtherFlags> should help in the meantime.

    I would also love if we could have an addition to the regression testing matrix guarding TaskSeq.

  6. added a commit that references this issue on Sep 15, 2026
  7. 6 remaining items

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Compiler-CodeGenIlxGen, ilwrite and things at the backendArea-ComputationExpressionsEnd-to-end experience for computation expressions (except async and state machine compilation)BugRegression

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions