BinaryDefense / BinaryDefense.FSharp.Analyzers

Security analyzers for the FSharp (F#) language
MIT License
37 stars 4 forks source link

FSharp.Analyzers.SDK 0.11 causes build exception #8

Open ImaginaryDevelopment opened 2 years ago

ImaginaryDevelopment commented 2 years ago

Describe the bug analyzer exception trying to run

To Reproduce if I remove this from .dependencies and update the lock nuget FSharp.Analyzers.SDK < 0.11 then the exception from below occurs

Expected behavior No exception on attempting to start analysis from mini-scaffold

Screenshots

Info : Running in verbose mode Info : Fail On Warnings: [BDH0002] Info : Ignore Files: [] Info : Loading analyzers from C:\sbsdev\sbs\sbs-enbl-octo-ass\build..\packages/analyzers Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'FSharp.Compiler.Service, Version=41.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. File name: 'FSharp.Compiler.Service, Version=41.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.Reflection.RuntimeAssembly.GetExportedTypes() at FSharp.Analyzers.SDK.Client.mapping@1(String tupledArg0, Assembly tupledArg1) in /Users/chethusk/oss/FSharp.Analyzers.SDK/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fs:line 90 at FSharp.Analyzers.SDK.Client.loadAnalyzers(String dir) in /Users/chethusk/oss/FSharp.Analyzers.SDK/src/FSharp.Analyzers.SDK/FSharp.Analyzers.SDK.Client.fs:line 88 at Program.main(String[] argv) in /Users/chethusk/oss/FSharp.Analyzers.SDK/src/FSharp.Analyzers.Cli/Program.fs:line 196 Finished (Failed) 'FSharpAnalyzers' in 00:00:01.5248919

Desktop (please complete the following information):

Additional context I have confirmed this works in another mini-scaffold repo locally and toggled the setting to see it does work with the line, and fails with it.

ImaginaryDevelopment commented 2 years ago

well, I had it working for a minute or two, now I'm getting

Loading analyzers from C:\sbsdev\sbs\sbs-enbl-octo-ass\build..\packages/analyzers Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'FSharp.Compiler.Service, Version=40.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

using

source https://www.nuget.org/api/v2 source https://api.nuget.org/v3/index.json // might be required for proper proget/octo packaging storage: packages nuget Argu 6.1.1 nuget FSharp.Core 5.0 nuget Expecto 9.0.2 nuget YoloDev.Expecto.TestSdk 0.11.1 nuget Microsoft.NET.Test.Sdk 16.8.0 nuget altcover ~> 7 nuget Packaging.Targets 0.1.189 nuget System.Data.SqlClient

// [ FAKE GROUP ] group Build source https://www.nuget.org/api/v2 source https://api.nuget.org/v3/index.json storage: packages nuget Argu nuget Fake.IO.FileSystem 5.20.4 nuget Fake.Core.Target 5.20.4 nuget Fake.Core.ReleaseNotes 5.20.4 nuget FAKE.Core.Environment 5.20.4 nuget Fake.DotNet.Cli 5.20.4 nuget FAKE.Core.Process 5.20.4 nuget Fake.DotNet.AssemblyInfoFile 5.20.4 nuget Fake.Tools.Git 5.20.4 nuget Fake.DotNet.Paket 5.20.4 nuget Fake.Api.GitHub 5.20.4 nuget Fake.BuildServer.GitHubActions 5.20.4 nuget Octokit 0.48 nuget HtmlAgilityPack

group Analyzers storage: packages // required for BD analyzer source https://www.nuget.org/api/v2 source https://api.nuget.org/v3/index.json nuget BinaryDefense.FSharp.Analyzers.Hashing 0.2.2 nuget FSharp.Analyzers.SDK < 0.11