haf / expecto

A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
Apache License 2.0
663 stars 96 forks source link

Outdated SDK requirement #337

Closed auduchinok closed 4 years ago

auduchinok commented 4 years ago

Is there a reason to require a particular .NET Core SDK version? Could it be just stated in the readme that SDK 2.1+ is required without forcing this version instead?

Trying to build the library on another machine, getting this exception:

eugene@unit-937:expecto$ dotnet build
A compatible installed dotnet SDK for global.json version: [2.1.505] from [/Users/eugene/Developer/expecto/global.json] was not found
Please install the [2.1.505] SDK or update [/Users/eugene/Developer/expecto/global.json] with an installed dotnet SDK:
  2.1.3 [/usr/local/share/dotnet/sdk]
  2.1.4 [/usr/local/share/dotnet/sdk]
  2.1.402 [/usr/local/share/dotnet/sdk]
  2.1.503 [/usr/local/share/dotnet/sdk]
  2.2.103 [/usr/local/share/dotnet/sdk]
  2.2.104 [/usr/local/share/dotnet/sdk]
  2.2.105 [/usr/local/share/dotnet/sdk]
  2.2.300 [/usr/local/share/dotnet/sdk]
  3.0.100-preview5-011568 [/usr/local/share/dotnet/sdk]

The same thing happened in Fantomas repo and there were no complaints after removing the requirement: https://github.com/fsprojects/fantomas/issues/426.

baronfel commented 4 years ago

Alternatively, the requirement can be changed to 2.1.500, and the default roll-forward configuration will allow any 500-series SDK.

The problem with saying just 2.1+, is that 2.1 encompasses many different F# versions: https://dotnet.microsoft.com/download/dotnet-core/2.1

2.1.500-2.1.700+ support F# 4.5, while 2.1.800+ supports F# 4.6, so you have to have some amount of min-range-bounding.