Description
When the property <TreatWarningsAsErrors>true</TreatWarningsAsErrors> is included in the fsproj file, the Fable compiler still issues warnings instead of errors.
Repro code
Test.fsproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Compile Include="Library.fs" />
</ItemGroup>
</Project>
Library.fs
module WarnAsErrorTest
type Message = Load | Save | Exit
let message =
function
| Load -> printfn "Loading"
| Save -> printfn "Saving"
Expected and actual results
Expected
Running dotnet fable should print an error message.
Actual
Running dotnet build does print an error message.
Running dotnet fable does not print an error message.
Related information
- Fable version:
dotnet fable --version : 3.2.12
- Operating system: Windows
Description
When the property
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>is included in the fsproj file, the Fable compiler still issues warnings instead of errors.Repro code
Test.fsproj
Library.fs
Expected and actual results
Expected
Running
dotnet fableshould print an error message.Actual
Running
dotnet builddoes print an error message.Running
dotnet fabledoes not print an error message.Related information
dotnet fable --version: 3.2.12