Skip to content
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

Warning FS3186 when writing/referencing a 'DependencyManager' #8678

Closed
matthid opened this issue Mar 7, 2020 · 2 comments
Closed

Warning FS3186 when writing/referencing a 'DependencyManager' #8678

matthid opened this issue Mar 7, 2020 · 2 comments
Labels
Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone

Comments

@matthid
Copy link
Contributor

matthid commented Mar 7, 2020

git clone git@github.com:fsharp/FAKE.git
git checkout 6a4902e41bccfcfac0dbf8a045b798d3bb28f029
dotnet build src/app/fake-cli

Expected behavior

Builds without FS3186

Actual behavior

E:\Projects\FAKE\src\app\Fake.Runtime\unknown(1,1): warning FS3186: An error occurred while reading the F# metadata node at position 1 in table 'itycons' of assembly 'Fake.Core.DependencyManager.Paket, 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. [E:\Projects\FAKE\src\app\Fake.Runtime\Fake.Runtime.fsproj]
E:\Projects\FAKE\src\app\Fake.Runtime\unknown(1,1): warning FS3186: An error occurred while reading the F# metadata node at position 0 in table 'ivals' of assembly 'Fake.Core.DependencyManager.Paket, 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. [E:\Projects\FAKE\src\app\Fake.Runtime\Fake.Runtime.fsproj]
E:\Projects\FAKE\src\app\fake-cli\unknown(1,1): warning FS3186: An error occurred while reading the F# metadata node at position 1 in table 'itycons' of assembly 'Fake.Core.DependencyManager.Paket, 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. [E:\Projects\FAKE\src\app\fake-cli\fake-cli.fsproj]
E:\Projects\FAKE\src\app\fake-cli\unknown(1,1): warning FS3186: An error occurred while reading the F# metadata node at position 0 in table 'ivals' of assembly 'Fake.Core.DependencyManager.Paket, 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. [E:\Projects\FAKE\src\app\fake-cli\fake-cli.fsproj]

Known workarounds

<NoWarn>FS3186</NoWarn>

Description

What we try to do is to workaround #8663 but now hit the next problem. Our test suite fails because this warning starts popping up everywhere.
Our idea was to write a 'dummy' dependency manager which doesn't error but ignores all #r "paket" references (to unblock ourself).
To simplify deployment we just added a reference to this dependency manager to Fake.Runtime and fake-cli because then we can assume that the dependency manager is "always" deployed with FAKE (which looks like an obvious solution).

But now this warning appears in several places:

  1. When compiling Fake.Runtime and fake-cli (reported above)
  2. It appears again when we compile scripts via FCS (at runtime), the only thing changed is that we added --compilertool: and --langversion:

For 1. we can add <NoWarn>FS3186</NoWarn>. For 2. we currently try with --nowarn:3186 but we couldn't get rid of it yet.

EDIT: It seems in FCS-API --nowarn is just not supported at all, so we now just filter the warning afterwards.

The code we use is this: https://github.com/fsharp/FAKE/blob/6a4902e41bccfcfac0dbf8a045b798d3bb28f029/src/app/Fake.Core.DependencyManager.Paket/PaketDependencyManager.fs#L3-L56

EDIT: I hope to filter this warning it not hiding some underlying issue with the approach, please advise :)

Related information

  • Operating system: Windows 10
  • .NET Runtime kind (.NET Core, .NET Framework, Mono): .Net Core
  • Editing Tools (e.g. Visual Studio Version, Visual Studio) : Visual Studio 2019

Related: #7881 #6140

/cc @baronfel

@dsyme
Copy link
Contributor

dsyme commented Sep 3, 2020

This error usually indicates mismatched assemblies. It would be good to have a much smaller repro to narrow down if that is not the case. I'd be very surprised if it's anything specifically to do with dependency managers

@dsyme dsyme added Area-Compiler Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. labels Sep 3, 2020
@dsyme
Copy link
Contributor

dsyme commented Apr 4, 2022

We suppressed the specific harmless warning a while back, and as mentioned above the warning usually indicated mismatched assemblies. As a result I will close this.

@dsyme dsyme closed this as completed Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Projects
None yet
Development

No branches or pull requests

3 participants