-
Notifications
You must be signed in to change notification settings - Fork 72
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
Fix error linting projects that use .NET Framework #657
Fix error linting projects that use .NET Framework #657
Conversation
Upgraded FSharp.Compiler.Service to 41.0.1. Made changes to framework, rules and test framework code necessary to accomodate changes in FCS version 41 as compared to version 40. FSharp.Compiler.Service 41.0.1 requires FSharp.Core 6. Also had to pin Microsoft.Build version to 16.11.0 because of build error. Fake uses 5.x uses FSharp.Core 5, so have to pin it in Build group. Had to pin Ionide.ProjInfo.* to version 0.53.0 (using == operator, which tells to use specific version instead of ~> wihch allows the last part stated explicitly to increase) to avoid the following error: ``` error NU1202: Package Ionide.ProjInfo 0.62.0 is not compatible with net5.0 (.NETCoreApp,Version=v5.0) ``` Updated paket.lock file using `dotnet paket update` command. And then when executing `dotnet fake build` have errors like this: ``` C:\Users\PC\.nuget\packages\system.threading.tasks.dataflow\8.0.0\buildTransitive\netcoreapp2.0\System.Threading.Tasks.Dataflow.targets(4,5): error : System.Threading.Tasks.Dataflow 8.0.0 doesn't support net5.0 and has not been tested with it. Consider upgrading your TargetFramework to net6.0 or later. You may also set <SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings> in the project file to ignore this warning and attempt to run in this unsupported configuration at your own risk. [D:\Projects\work\FSharpLint\src\FSharpLint.Core\FSharpLint.Core.fsproj] ``` wip
Pin nunit version to 3.x because version 4 that gets selected automatically now after upgrade to .net 6 has breaking changes and breaks our tests.
In order to fix build process we pin the System.Reactive and MSBuild.StructuredLogger version.
In order to use Visual Studio for building and debugging FSharpLint, added `<NoWarn>$(NoWarn);NU1605</NoWarn>` to Directory.Build.props file. This has to be done because of version conflict as a result of pinning of Microsoft.Build.* packages done in commit 57b4584 (Paket,Core,Tests: upgrade FCS to 41.0.1). The errors due to version conflicts were like this: ``` Error NU1605 Warning As Error: Detected package downgrade: Microsoft.Build.Framework from 17.8.3 to 16.11.0. Reference the package directly from the project to select a different version. FSharpLint.Core -> Microsoft.Build.Tasks.Core 17.8.3 -> Microsoft.Build.Framework (>= 17.8.3) FSharpLint.Core -> Microsoft.Build.Framework (>= 16.11.0) FSharpLint.Core D:\Projects\work\FSharpLint\src\FSharpLint.Core\FSharpLint.Core.fsproj 1 ```
Upgrade Ionide.ProjInfo package version to 0.58.0. Fixes fsprojects#336.
Added new test for WildcardNamedWithAsPattern rule that checks that wildcard pattern without as should not raise warning.
Fix rule WildcardNamedWithAsPattern that was broken when porting to FCS version 41. Removed misleading comment.
Please explain why this is needed.
Please explain why this is needed. |
Title of PR should reflect the goal of the PR, not its implementation details. |
Ionide.ProjInfo upgrade is needed to fix #336. |
I'm not asking you to explain it to me, because I already know (and I know you know). I'm asking you to edit the PR description. |
Newer .NET versions??? Please read the github issue first. |
Weren't there several issues that required new Ionide.ProjInfo? I remember testing on .NET 6 project. |
We didn't confirm that new versions of Ionide.ProjInfo fixed other problems. But you did confirm that it fixed issue #336, so that reason alone (only it) is enough to merge this PR. |
Fixes #336