.paket/paket.exe update <package> --version <version>
doesn't modify paket.dependencies
Please provide the steps required to reproduce the problem
Given the paket.dependency file:
group Main
source https://api.nuget.org/v3/index.json
storage:none
nuget FSharp.Core
nuget Fable.Core >= 2.0.0-alpha-010
nuget Fable.Parsimmon
clitool dotnet-fable ~> 2.0.0-alpha-017
group Build
source https://api.nuget.org/v3/index.json
nuget FAKE
# on windows
.paket/paket.exe update dotnet-fable --version 2.0.0-alpha-018
# linux
mono .paket/paket.exe update dotnet-fable --version 2.0.0-alpha-018
the simple-json-repro can be used to reproduce the issue, just clone and run the above command
Expected the paket.dependencies file to get modified to match what is generated in paket.lock
paket.dependencies isn't modified and an incorrect (out-dated) version is shown in that file
Modifying the file by hand
Paket never changed paket.dependencies on update. And I guess updating the package works in this case because the version 2.0.0-alpha-018 is within the ~> 2.0.0-alpha-017 constraint, otherwise the update command would fail.
I think you should change the version constraints to something like this:
nuget Fable.Core >= 2 prerelease
clitool dotnet-fable >= 2 prerelease
Take a look at the docs on prerelease dependencies as well, you can explicitly define that you only want alpha versions.
Thanks @inosik for the explanation, please excuse my ignorance on the subject, (because of how npm works) I expected that when I do something with paket.exe that my changes I reflected both in paket.lock and paket.dependencies, so even if I would remove paket.dependencies and run restore again, I would get the same paket.dependencies that I removed. The same way I expected that if I manually change the paket.dependencies (in a valid way) and paket restore again, that paket would diff the changes and rebuild paket.dependencies
I guess these restrictions solve problems that I haven't yet encountered :smile:
Npm works differently. Paket is modeled after bundler. Pros and cons as
always....
Zaid Ajaj notifications@github.com schrieb am Do., 14. Juni 2018, 17:06:
Closed #3252 https://github.com/fsprojects/Paket/issues/3252.
—
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/3252#event-1681418021, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADgNEAVb0uuEtukrqh-j8hE_qmbttHQks5t8nvjgaJpZM4Umivb
.
Most helpful comment
Paket never changed
paket.dependenciesonupdate. And I guess updating the package works in this case because the version2.0.0-alpha-018is within the~> 2.0.0-alpha-017constraint, otherwise theupdatecommand would fail.I think you should change the version constraints to something like this:
Take a look at the docs on prerelease dependencies as well, you can explicitly define that you only want
alphaversions.