fsprojects / Paket

A dependency manager for .NET with support for NuGet packages and Git repositories.
https://fsprojects.github.io/Paket/
MIT License
2.02k stars 524 forks source link

exactly-this-operator does not seem to work #2777

Closed 0x53A closed 7 years ago

0x53A commented 7 years ago

Description

FsPickler 4.0 was just just released.

Unfortunately, a few of my other dependencies have a hard check < 4.0:

image

image

My current strategy (lets see if it works) is to just pin everything to their latest versions with ==. Unfortunately, this means that paket update becomes kind of useless.

Instead I would want to be able to specify

nuget FsPickler == latest
MBrace.Thespian == latest
Vagabond == latest
...

then it should resolve the latest version of each of these packages, ignoring conflicting version ranges. Transitives should still be resolved normally, I may need to pin some more packages.

forki commented 7 years ago

O_o

Am 18.09.2017 12:40 schrieb "Lukas Rieger" notifications@github.com:

Description

FsPickler 4.0 was just just released https://www.nuget.org/packages/FsPickler/4.0.0.

Unfortunately, a few of my other dependencies have a hard check < 4.0:

[image: image] https://user-images.githubusercontent.com/4236651/30538405-256bf166-9c6e-11e7-9978-3910fe4e7647.png

[image: image] https://user-images.githubusercontent.com/4236651/30538418-32329a8a-9c6e-11e7-861a-871b6fac1ef2.png

My current strategy (lets see if it works) is to just pin everything to their latest versions with ==. Unfortunately, this means that paket update becomes kind of useless.

Instead I would want to be able to specify

nuget FsPickler == latest MBrace.Thespian == latest Vagabond == latest ...

then it should resolve the latest version of each of these packages, ignoring conflicting version ranges. Transitives should still be resolved normally, I may need to pin some more packages.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fsprojects/Paket/issues/2777, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNMkeecLVn-jZzr-eJGJ7SoDklGhRks5sjkiugaJpZM4Pat4E .

0x53A commented 7 years ago

(The alternative would be ~annoy~ kindly ask Eirik to update all dependencies to the latest FsPickler)

0x53A commented 7 years ago

Also, the take-exactly-this operator seems broken:

Paket failed with
-> There was a version conflict during package resolution.
     Resolved packages:
      - Akka.Remote 1.3.1
      - EntityFramework 6.1.3
      - FSharp.Core 4.1.17
      - FsPickler 4.0.0
      - FsPickler.Json 4.0.0
      - Gjallarhorn.Bindable.Wpf 0.0.2-beta1
      - MBrace.Runtime 1.4.0
      - MBrace.Thespian 1.4.0
      - Microsoft.AspNetCore.Razor 1.1.2
      - Mono.Cecil 0.9.6.4
      - RazorEngine 4.5.0-rc1
      - RoslynPad.Editor.Windows 1.0.3
      - Thespian 0.1.14
      - Vagabond 0.14.0
      - WindowsAPICodePack-Shell 1.1.1
     Conflict detected:
      - Dependencies file requested package FsPickler: == 4.0
      - MBrace.Runtime 1.4.0 requested package FsPickler: >= 3.2 < 4.0
      - MBrace.Thespian 1.4.0 requested package FsPickler: >= 3.2 < 4.0
      - Vagabond 0.14.0 requested package FsPickler: >= 3.0 < 4.0
      - FsPickler.Json 4.0.0 requested package FsPickler: 4.0
      - Thespian 0.1.14 requested package FsPickler: 3.1

source https://api.nuget.org/v3/index.json

framework: net461

nuget FsPickler == 4.0
nuget FsPickler.Json == 4.0

nuget Microsoft.Net.Compilers
nuget FSharp.Compiler.Tools

nuget RoslynPad.Editor.Windows redirects:force, strategy:min
nuget NETStandard.Library redirects:force

nuget Akka.Remote strategy: min

# these are just the currently latest versions
# pinning is required to resolve the conflict with FsPickler
nuget MBrace.Thespian == 1.4.0
nuget MBrace.Runtime == 1.4.0
nuget Vagabond == 0.14.0
nuget Thespian == 0.1.14

nuget lz4net

nuget System.Collections.Immutable redirects:force
nuget System.ValueTuple redirects:force
nuget FSharp.Core 4.1.17 redirects:force
nuget Newtonsoft.Json redirects:force
nuget Gjallarhorn.Bindable.Wpf prerelease

nuget Fody content:once
nuget Equals.Fody
nuget PropertyChanged.Fody
nuget FodyCecil
# latest version; pinned to improve paket resolution
nuget Mono.Cecil 0.9.6.4

nuget Castle.Core redirects:force
nuget CommonServiceLocator
nuget Autofac redirects:force
nuget Moq redirects:force

nuget EntityFramework 6.1.3
nuget ComparerExtensions
nuget ExposedObject
nuget Extended.Wpf.Toolkit
nuget log4net redirects:force
nuget System.Diagnostics.DiagnosticSource redirects:force
nuget Microsoft.Diagnostics.Tracing.EventSource
nuget netDumbster
nuget PdfiumViewer
nuget PDFsharp

nuget RazorEngine 4.5.0-rc1
nuget Microsoft.AspNetCore.Razor 1.1.2
#nuget Microsoft.CodeAnalysis

nuget System.Reactive
nuget System.Data.SQLite.Core
nuget WindowsAPICodePack-Shell 1.1.1

nuget FParsec
nuget FSharp.Data
nuget FSharp.Data.SqlClient
nuget FSPowerPack.Core.Community
nuget FSPowerPack.Linq.Community

nuget FsCheck
nuget FsCheck.Xunit
nuget xunit
nuget Xunit.Combinatorial
nuget expecto.xunit
nuget expecto redirects:force
nuget xunit.runner.visualstudio version_in_path:true
nuget xunit.analyzers
matthid commented 7 years ago

don't try to fool paket ;)

0x53A commented 7 years ago

yeah, the == latest doesn't seem like that great an idea anymore, but I would like to keep this open for the (potential) exactly-this-operator issue, I would expect the deps file above to resolve.

sjancke commented 7 years ago

@0x53A seeing this also in newer versions, worked the other day with version 5.100.3

sjancke commented 7 years ago

@matthid what do you mean by "fool paket" here?

sjancke commented 7 years ago

Investigating this issues further, I have the impression, the problem is related to the number of packagings that require a "conflicting" version (sorry for caps, lots of code / console following).

Stripping down @0x53A sample:

source https://api.nuget.org/v3/index.json

framework: net461

nuget FsPickler == 4.0
nuget FsPickler.Json == 4.0

nuget MBrace.Thespian 1.4.0
#nuget MBrace.Runtime 1.4.0

seems to work:

Paket version 5.119.8
Resolving packages for group Main:
 - FsPickler 4.0.0
 - FsPickler.Json 4.0.0
 - MBrace.Thespian is pinned to 1.4.0
 - Argu 3.7.0
 - Vagabond 0.14.0
 - Thespian 0.1.16
 - MBrace.Core 1.4.0
 - MBrace.Runtime 1.4.0
 - Newtonsoft.Json 10.0.3
 - FSharp.Core 4.2.3
 - FSharp.Core 4.2.2
 - Thespian 0.1.15
 - FSharp.Core 4.1.18
 - FSharp.Core 4.1.17
 - Thespian 0.1.14
 - Thespian 0.1.13
 - Thespian 0.1.12-alpha
 - Thespian 0.1.11-alpha
 - FSharp.Core 4.2.1
 - FSharp.Core 4.1.12
     FSharp.Core 4.1.12 was unlisted
 - FSharp.Core 4.1.2
     FSharp.Core 4.1.2 was unlisted
 - FSharp.Core 4.1.0.2
     FSharp.Core 4.1.0.2 was unlisted
 - FSharp.Core 4.1.0
     FSharp.Core 4.1.0 was unlisted
 - FSharp.Core 4.0.1.5
     FSharp.Core 4.0.1.5 was unlisted
 - FSharp.Core 4.0.0.1
 - FSharp.Core 4.0.0
     FSharp.Core 4.0.0 was unlisted
 - FSharp.Core 3.1.2.5
 - FSharp.Core 3.1.2.1
     FSharp.Core 3.1.2.1 was unlisted
 - FSharp.Core 3.1.2
 - Newtonsoft.Json 10.0.2
 - Newtonsoft.Json 10.0.1
 - Newtonsoft.Json 9.0.1
 - Newtonsoft.Json 8.0.3
 - Newtonsoft.Json 8.0.2
 - Newtonsoft.Json 8.0.1
 - Newtonsoft.Json 7.0.1
 - Newtonsoft.Json 6.0.8
 - Newtonsoft.Json 6.0.7
 - Newtonsoft.Json 6.0.6
 - Newtonsoft.Json 6.0.5
 - Argu 3.6.1
 - Mono.Cecil 0.9.6.4
Locked version resolution written to C:\dev\stuff\paket-issues\paket.lock

Adding another dependency that results in the same conflict breaks the exactly-this-operator:

source https://api.nuget.org/v3/index.json

framework: net461

nuget FsPickler == 4.0
nuget FsPickler.Json == 4.0

nuget MBrace.Thespian 1.4.0
nuget MBrace.Runtime 1.4.0
Paket version 5.119.8
Resolving packages for group Main:
 - FsPickler 4.0.0
 - FsPickler.Json 4.0.0
 - MBrace.Runtime is pinned to 1.4.0
 - MBrace.Thespian is pinned to 1.4.0
Performance:
 - Resolver: 2 seconds (1 runs)
    - Runtime: 413 milliseconds
    - Blocked (retrieving package details): 156 milliseconds (4 times)
    - Blocked (retrieving package versions): 1 second (2 times)
    - Not Blocked (retrieving package versions): 2 times
 - Average Request Time: 361 milliseconds
 - Number of Requests: 14
 - Runtime: 4 seconds
Paket failed with
-> There was a version conflict during package resolution.
     Resolved packages:
      - FsPickler 4.0.0
      - FsPickler.Json 4.0.0
      - MBrace.Runtime 1.4.0
      - MBrace.Thespian 1.4.0
     Conflict detected:
      - Dependencies file requested package FsPickler: == 4.0
      - MBrace.Runtime 1.4.0 requested package FsPickler: >= 3.2 < 4.0
      - MBrace.Thespian 1.4.0 requested package FsPickler: >= 3.2 < 4.0
      - FsPickler.Json 4.0.0 requested package FsPickler: 4.0

     Please try to relax some conditions or resolve the conflict manually (see http://fsprojects.github.io/Paket/nuget-dependencies.html#Use-exactly-this-version-constraint).
forki commented 7 years ago

thanks for the repros. A fix is in https://github.com/fsprojects/Paket/pull/2867

sjancke commented 7 years ago

thanks.