-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for <WarnOn> MSBuild property #379
Comments
@NinoFloris Could you please share a small repro solution showing where Rider doesn't show a warning while the console build does? The example from dotnet/fsharp#13437 doesn't produce any additional warning during build for me. I've also checked it with |
The |
I see, I've changed the repro in the F# issue, there is apparently more broken in the compiler around 3395. You should now see a warning appear under For complete reference: repro open System
// Minimized copy for demonstration of Microsoft.Extensions.Primitives.StringValues
type StringValues(v: string) =
static member op_Implicit(values: StringValues): string = ""
type Foo(_v: Nullable<int>) =
member val Test: Nullable<int> = 0 with get,set // Warning for 3391 as I would have interpreted it.
member val StringValue: string = "" with get,set
static member Create() =
let value = 1
let instance = Foo(value, Test = value) // No warning on either the argument or the property setter?
instance.Test <- value // No warning for 3395 and 3391?
instance.StringValue <- StringValues("1") // Warning for 3395
let mutable test: Nullable<int> = value // Warning for 3391 as I would have interpreted it.
// Warning for 3391 but it's syntactically identical to the line that had no warning and one that had 3395???
test <- 1 fsproj <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<!-- Warning when uncommented -->
<!-- <OtherFlags>$(OtherFlags) --warnon:3395</OtherFlags>-->
<!-- No warning when uncommented -->
<WarnOn>$(WarnOn); 3395</WarnOn>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.fs" />
</ItemGroup>
</Project> |
@auduchinok can you confirm the example repros? |
@NinoFloris Yes, I can repro the |
F# 6.0 SDK released with support for specifying warnings via a new MSBuild property which isn't picked up by Rider yet.
dotnet/fsharp#10885
I'm assuming to light this up, support needs to be added over here? https://github.com/JetBrains/resharper-fsharp/blob/b3bdd454313fb4b32e924ad5b72238245f020f7c/ReSharper.FSharp/src/FSharp.Psi.Daemon/src/Stages/FSharpCompilerWarningProcessor.fs
The text was updated successfully, but these errors were encountered: