Skip to content

F# 4.1 compiler raises warnings #21

Closed

Description

@vasily-kirichenko

I created a new console project in VS 2017 RC, add FSharpPlus NuGet dependency into it, copied the follwing code into it:

open FSharpPlus

[<EntryPoint>]
let main argv = 
    let lst11n21n12n22 = 
        monad {                
            let! x1 = [1;   2]
            let! x2 = [10; 20]
            return ((+) x1 x2)}
    
    let neLst11n21n12n22 = 
        monad {                
            let! x1 = { NonEmptyList.Head =  1; Tail =  [2] }
            let! x2 = { NonEmptyList.Head = 10; Tail = [20] }
            return ((+) x1 x2)}
    
    let some14 = 
        monad {                
            let! x1 = Some 4
            let! x2 = Some 10
            return ((+) x1 x2)}
    0

and try to compile. It's compiled successfully, but with some strangely looking warnings:

1>------ Rebuild All started: Project: FSharpPlusTest, Configuration: Debug Any CPU ------
1> C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0\fsc.exe -o:obj\Debug\FSharpPlusTest.exe
1>-g
1>--debug:full
1>--noframework
1>--define:DEBUG
1>--define:TRACE
1>--doc:bin\Debug\FSharpPlusTest.XML
1>--optimize-
1>--tailcalls-
1>--platform:anycpu32bitpreferred
1>-r:D:\github\FSharpPlusTest\packages\FsControl.1.0.9\lib\net40\FsControl.Core.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp.NETFramework\v4.0\4.4.0.0\FSharp.Core.dll
1>-r:D:\github\FSharpPlusTest\packages\FSharpPlus.0.0.4\lib\net40\FSharpPlus.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\mscorlib.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Core.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.dll
1>-r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Numerics.dll
1>--target:exe
1>--warn:3
1>--warnaserror:76
1>--vserrors
1>--utf8output
1>--fullpaths
1>--flaterrors
1>--subsystemversion:6.00
1>--highentropyva+
1>C:\temp.NETFramework,Version=v4.6.1.AssemblyAttributes.fs
1>AssemblyInfo.fs
1>Program.fs
1>
1>FSC: warning FS3186: An error occurred while reading the F# metadata node at position 878 in table 'ivals' of assembly 'FsControl.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using.
1>FSC: warning FS3186: An error occurred while reading the F# metadata node at position 879 in table 'ivals' of assembly 'FsControl.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using.
1>FSC: warning FS3186: An error occurred while reading the F# metadata node at position 880 in table 'ivals' of assembly 'FsControl.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using.
1>FSC: warning FS3186: An error occurred while reading the F# metadata node at position 881 in table 'ivals' of assembly 'FsControl.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using.
1>FSC: warning FS3186: An error occurred while reading the F# metadata node at position 1118 in table 'ivals' of assembly 'FsControl.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using.
1>FSC: warning FS3186: An error occurred while reading the F# metadata node at position 1141 in table 'ivals' of assembly 'FsControl.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using.
1>FSC: warning FS3186: An error occurred while reading the F# metadata node at position 1164 in table 'ivals' of assembly 'FsControl.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using.
1>FSC: warning FS3186: An error occurred while reading the F# metadata node at position 1256 in table 'ivals' of assembly 'FsControl.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The node had no matching declaration. Please report this warning. You may need to recompile the F# assembly you are using.
1> FSharpPlusTest -> D:\github\FSharpPlusTest\FSharpPlusTest\bin\Debug\FSharpPlusTest.exe
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

Activity

  1. gusty commented on Nov 19, 2016

    @gusty
    Member

    @vasily-kirichenko this is related to this issue reported in FsControl which at the same time is linked there to an issue in the F# compiler.
    This issue has no effects and you can avoid those warnings with a #nowarn 3186, they just switched the compiler to display these warnings in F#4.0 in order to fix the underlying problem.
    Still I'm surprised this is not fixed in VS2017, since I remember having seen it fixed.

    Anyway if you're trying to measure the speed-up in the compile time be aware that in VS2017 only the initial speed up was merged.
    From what I can see the other 3 PRs were still not merged for the RC.

  2. gusty commented on Nov 19, 2016

    @gusty
    Member

    Here's the issue in the F# compiler but as you can read there it's supposed to be fixed.
    If it's not we should report them.
    In any case bear in mind that these warnings are "inoffensive" in these projects, you can safely ignore them.

  3. gusty commented on Dec 24, 2016

    @gusty
    Member

    @vasily-kirichenko Now that RC 2 is available I'm using it to compile the project and tried removing the #nowarn and the warning doesn't show anymore.
    Have you tried it with RC 2?

  4. wallymathieu commented on Jan 2, 2018

    @wallymathieu
    Member

    Do we still see this issue, or can we close it?

  5. gusty commented on Jan 2, 2018

    @gusty
    Member

    I don't see it since long time, it was something the F# team put in place to debug some internal stuff.

    But I leave it because @vasily-kirichenko reported he was still seeing it.

    Maybe we can close it, did you remove the #nowarns ?

  6. wallymathieu commented on Jan 2, 2018

    @wallymathieu
    Member

    I didn't remove the #nowarns, just moved them

  7. gusty commented on Jan 3, 2018

    @gusty
    Member

    We can reopen it if someone keep receiving these warnings.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions