FSharp.Control.Reactive icon indicating copy to clipboard operation
FSharp.Control.Reactive copied to clipboard

Get rid of Paket

Open xperiandri opened this issue 1 year ago • 7 comments

I spent more than hour trying to override System.Reactive package version for net6.0

having: dependencies

group Net472_or_less
    source http://api.nuget.org/v3/index.json
    framework: <= net472

    nuget Microsoft.NETCore.Platforms < 6.0
    nuget System.Reactive < 6.0

group NetStandard2_0_or_less
    source http://api.nuget.org/v3/index.json
    framework: <= netstandard2.0

    nuget Microsoft.NETCore.Platforms < 6.0
    nuget System.Reactive < 6.0

group NetCore3_1_or_less
    source http://api.nuget.org/v3/index.json
    framework: <= netcoreapp3.1

    nuget Microsoft.NETCore.Platforms < 6.0
    nuget System.Reactive < 6.0

group Net5_0_or_less
    source http://api.nuget.org/v3/index.json
    framework: <= net5.0

    nuget Microsoft.NETCore.Platforms < 6.0
    nuget System.Reactive < 6.0

group Net6_0
    source http://api.nuget.org/v3/index.json
    framework: net6.0

    nuget Microsoft.NETCore.Platforms >= 6.0
    nuget System.Reactive >= 6.0

and

references

group Net472_or_less
	System.Reactive
	Microsoft.NETCore.Platforms

group NetStandard2_0_or_less
	System.Reactive
	Microsoft.NETCore.Platforms

group NetCore3_1_or_less
	System.Reactive
	Microsoft.NETCore.Platforms

group Net5_0_or_less
	System.Reactive
	Microsoft.NETCore.Platforms

group Net6_0
	System.Reactive

What is the benefin of using it is even simple things require tons of code?

xperiandri avatar Aug 08 '23 16:08 xperiandri

@xperiandri why is there a need for separate group for each target runtime? AFAIU paket would just work with a single group and no framework restriction.

smoothdeveloper avatar Aug 08 '23 17:08 smoothdeveloper

Because if we allow System.Reactive to be 6.0 we want:

  1. to set 6.0 for net6.0. As System.Reactive package 5.0 targets only net5.0
  2. to run tests against System.Reactive 6.0

xperiandri avatar Aug 08 '23 19:08 xperiandri

Otherwise, Paket sets System.Reactive 5.0 even for net6.0 which is very strange

xperiandri avatar Aug 08 '23 19:08 xperiandri

@xperiandri I may not understand properly, but I doubt the maintainers of this repository have anything to do with the issue (unless the nuget package doesn't have the right dependencies for the targets you aim to have in your project).

It feels more like an issue, if you want to use paket, to open on paket repository, to ask what would be the right approach.

Otherwise, you can deal with nuget references manually and target framework conditionals.

In my experience, paket makes it simpler and easier to check across a repository what is going on, but this is just my experience.

smoothdeveloper avatar Aug 08 '23 19:08 smoothdeveloper

I use central package management via Packages.props like https://github.com/xperiandri/Elmish.Uno/blob/NET_6/src/Directory.Build.targets https://github.com/xperiandri/Elmish.Uno/blob/NET_6/src/Packages.props

Just 1 file, no tools, no learning curve, easy

xperiandri avatar Aug 09 '23 14:08 xperiandri

I think that @xperiandri doesn't really make himself clear here. The issue, obviously, is not with Paket, but with the allowed ranges. Currently, we have a System.Reactive version 6.0.0, which is supported for .NET 6.0 (and other sdks) and up, without further dependencies.

However: there is currently no way (unless you force it), to use version 6.0 or higher with this package. Even the latest version, 5.0.5, explicitly disallows System.Reactive 6.0.0 or up.

I doubt that has ever been the intent here. All we need is to change the deps such that there is no upperbound (unless for those frameworks where there is a maximum supported version).

Currently, System.Reactive 6.0 is supported in .NET Framework4.7.2 and up, .NETStandard 2.0, .NET 6.0 and .NET 5.0.

So, the simple solution (forget the discussion on Paket) is to increase, or remove, the upper bound on that dependency.

abelbraaksma avatar Nov 01 '23 20:11 abelbraaksma

Also, this wasn't always the case. For instance, the 4.5 version did not have an upper bound on System.Reactive...

EDIT, I missed that this was already fixed meanwhile here: https://github.com/fsprojects/FSharp.Control.Reactive/pull/172.

abelbraaksma avatar Dec 22 '23 02:12 abelbraaksma