dotnet / dotnet/fsharp

NoWarn for FS5311 no longer respected in Release builds after .NET / F# 7 -> 8 update

Open
#16,552 7 comments 0 reactions 0 assignees View on GitHub
Bug Needs-More information
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

> `FS3511`: This state machine is not statically compilable. A resumable code invocation at '(...)' could not be reduced. An alternative dynamic implementation will be used, which may be slower. Consider adjusting your code to ensure this state machine is statically compilable, or else suppress this warning.

We have a few task CEs that trigger this warning and have opted to suppress it.

In .NET 7, we used `3511` in Directory.Build.props. After updating to .NET 8, the warnings still occur, but only in Release configuration. Because we use `TreatWarningsAsErrors`, this is a breaking change.

As a workaround, we added the `#nowarn` directive to each file, which is arguably an improvement.

.NET SDK 8.0.101
OS: all

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.