SchlenkR/FsHttp

FsHttp Has an Implicit Dependency on Fsharp.Core 8.0+ from version 12.0.0 on

Closed this issue · 3 comments

Context

  • I was trying to use FsHttp in a Replit
  • Replit defaults to F# 7 via dotnet 7
  • Installing FsHttp via nuget (dotnet add package ...) will automagically get the latest version because FsHttp says it has no dependencies

Problem

  • FsHttp will fail with a runtime error that it cannot find Fsharp.Core 8.0.0

Error:

Could not load file or assembly 'FSharp.Core,          │
│             │       │ Version=8.0.0.0, Culture=neutral,                      │
│             │       │ PublicKeyToken=b03f5f7f11d50a3a'. The system cannot    │
│             │       │ find the file specified.

Reason:

  • I believe this is because FsHttp does have a dependency on Fsharp.Core 8.0.0 from version 12.0.0 on
    • Data: When I downgraded to previous versions, this error stopped happening on FsHttp 12.0.0 which I guess is the latest version that is compatible with Fsharp.Core 7.0

Ask

  • Q1: Have we seen this before? Do we know the cause?
  • Q2: If the problem is indeed an implicit dependency - Please update the package to have an explicit dependency on the Fsharp.Core version that's required so easier to use in future.

Repro

Replit: https://replit.com/@HamiltonGreene/FsHttpFsharpCore8ImplicitDependency?run=#main.fs

image

But basically can just do:

  • Create dotnet 7 project
  • Add package FsHttp
  • Try to use it (simple GET to google or smth)
  • Observe runtime error

Re-pinning FSharp.Core by adding the following to your project file might resolve the issue:

<PackageReference Update="FSharp.Core" Version="7.0.0" />

Thanks for reporting. I think that one is on me. Sorry.

Thanks for reporting @SIRHAMY and for the fix @dawedawe. We should have an updated nuget package in an hour - feel free to try it and leave a comment. 🙏