You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
restore - doesn't change csproj files or any of the paket.* files. It just reads paket.lock and downlods all the dependencies
Install - reads the paket.lock and modifies all csproj/fsproj files accoring to their paket.references files. Afterwards it does restore
update - analyzes the paket.dependencies file and calculates the paket.lock file. Afterwards it does install
So there is some logic in this, but it seems people like bundler's workflow more.
If I understand @haf and @agross correctly the new install should be a bit between the old install and update command: we would want it to analyze the changes in the paket.dependencies file since the last install, recompute the changed part of the lockfile and then perform our current install routine.
change paket.references -> paket install syncs these to the projects (unless reference is "unmanaged", i.e. reference node without <Paket>true</Paket>)
add or remove dependency to paket.dependecies -> paket install to recalculate the graph
change version constraint in paket.dependecies -> paket install to recalculate the graph
no change to paket.dependencies -> no need to recalculate the graph, but make sure projects are in sync with paket.references
I think the vital part is detecting what changed in paket.dependencies w.r.t. paket.lock. Bundler saves all dependency definitions (= our paket.dependencies) in a separate section in Gemfile.lock (= our paket.lock):
I agree with agross, the key is keeping the build reproducible by doing a minimum of intervention on paket install. Install should be 'the default thing to call to get started'; or 'make it right'.
If there are no changes to paket.references or paket.dependencies, install eq restore.
If there are no changes to paket.references or paket.dependencies but we're on a new platform, install updates paket.lock with the newly supported platform.
If there are changes to paket.dependencies, but paket.lock hasn't been correspondingly updated, update paket.lock with the minumum set of changes that still fits the versions specified in paket.dependencies.
If there are changes to paket.references inside particular project files, update both paket.dependencies and paket.lock with the most recent nuget that in a version-levelled way meets all previous nugets' version specifications in paket.lock. Otherwise warn and suggest 'paket update'.
update <package>
Update paket.lock with the semver-/version-levelled transitive closure of paket.dependencies' specified nugets. Update xxproj files.
update
Finds the transitive closure of all dependencies in a version-levelled way. Updates all nugets according to their version specifications in paket.dependencies.
If there are changes to paket.references inside particular project files, update both paket.dependencies and paket.lock with the most recent nuget that in a version-levelled way meets all previous nugets' version specifications in paket.lock. Otherwise warn and suggest 'paket update'.
If there are changes in the file that accompanies each xxproj file, e.g. adding a reference through it, as opposed to adding it though paket add, I think install should update both the list of dependencies and the list of installed versions.
The version-levelling means that if e.g. I add a reference to Intelliplan.JsonNet in an individual paket.references file, but I already have Newtonsoft.Json 5.0.7 in my lock-file, then paket install should not install Intelliplan.JsonNet 2.0 but Intelliplan.JsonNet 1.7, because it has a lesser Newtonsoft.Json requirement. Now, if I also add a dependency on the nuget Intelliplan.Logary, then, because we're require paket update Newtonsoft.Json to be called to 'unlock' the version of it/bump the version of it, doing a paket install with this new dependency on Logary would cause version 1.5 to be installed, because it depends on ~>1.7 and not > 1.7 and not ~>2.0 of Intelliplan.JsonNet. That's version levelling.
If the versions can't be unified in a nice way, warn and suggest calling paket update newtonsoft.json.
I didn't start this before since I don't like the idea of storing the dependencies file as a copy in the lock file (like bundler does). Until today I didn't really saw a better way, but maybe the following could work:
we take the lockfile (we already have a good internal API for querying it)
we load the new dependencies file
for every dependency in the dependencies file we fix all indirect dependencies according to old lock file
if the dependency in the lockfile doesn't fit the dependency requirement (it must has changed) we don't fix, but use the new dependency (all indirect dependencies are not fixed)
we remove all requirements which are not indirectly used in the new dependencies file
we add requirements from all paket.references files (but at the movent with x >= 0 since we don't allow versions in references files)
Another question is how to replace a nuget. In ruby-world I do this:
edit Gemfile, replace the string with the other, run 'bundle install', done.
In paket-world, I tried this:
edit paket.dependencies, run 'paket install', complains about lock-file, figure I need to update each project's references too, update those, run paket install again, get same complaint, try paket update, more complaints, scream a little, run '--force', paket is happy, it compiles, but xxproj-file not updated, go for lunch, come back 5 hours later when I discover the old package is still referenced, file this post.
Another question is how to replace a nuget. In ruby-world I do this:
edit Gemfile, replace the string with the other, run 'bundle install', done.
In paket-world, I tried this:
edit paket.dependencies, run 'paket install', complains about lock-file,
figure I need to update each project's references too, update those, run
paket install again, get same complaint, try paket update, more complaints,
scream a little, run '--force', paket is happy, it compiles, but
xxproj-file not updated, go for lunch, come back 5 hours later when I
discover the old package is still referenced, file this post.
—
Reply to this email directly or view it on GitHub #435 (comment).
Activity
agross commentedon Dec 7, 2014
Yes, that looks good.
In particular:
paket installsyncs these to the projects (unless reference is "unmanaged", i.e. reference node without<Paket>true</Paket>)paket installto recalculate the graphpaket installto recalculate the graphagross commentedon Dec 7, 2014
I think the vital part is detecting what changed in paket.dependencies w.r.t. paket.lock. Bundler saves all dependency definitions (= our paket.dependencies) in a separate section in Gemfile.lock (= our paket.lock):
haf commentedon Dec 7, 2014
installI agree with agross, the key is keeping the build reproducible by doing a minimum of intervention on
paket install. Install should be 'the default thing to call to get started'; or 'make it right'.If there are no changes to paket.references or paket.dependencies,
installeqrestore.If there are no changes to paket.references or paket.dependencies but we're on a new platform,
installupdatespaket.lockwith the newly supported platform.If there are changes to paket.dependencies, but paket.lock hasn't been correspondingly updated, update paket.lock with the minumum set of changes that still fits the versions specified in paket.dependencies.
If there are changes to paket.references inside particular project files, update both paket.dependencies and paket.lock with the most recent nuget that in a version-levelled way meets all previous nugets' version specifications in paket.lock. Otherwise warn and suggest 'paket update'.
update <package>Update paket.lock with the semver-/version-levelled transitive closure of paket.dependencies' specified nugets. Update xxproj files.
updateFinds the transitive closure of all dependencies in a version-levelled way. Updates all nugets according to their version specifications in paket.dependencies.
forki commentedon Dec 7, 2014
I don't get that part.
haf commentedon Dec 7, 2014
If there are changes in the file that accompanies each xxproj file, e.g. adding a reference through it, as opposed to adding it though
paket add, I thinkinstallshould update both the list of dependencies and the list of installed versions.The version-levelling means that if e.g. I add a reference to
Intelliplan.JsonNetin an individualpaket.referencesfile, but I already haveNewtonsoft.Json 5.0.7in my lock-file, thenpaket installshould not installIntelliplan.JsonNet 2.0butIntelliplan.JsonNet 1.7, because it has a lesserNewtonsoft.Jsonrequirement. Now, if I also add a dependency on the nugetIntelliplan.Logary, then, because we're requirepaket update Newtonsoft.Jsonto be called to 'unlock' the version of it/bump the version of it, doing apaket installwith this new dependency on Logary would cause version1.5to be installed, because it depends on~>1.7and not> 1.7and not~>2.0ofIntelliplan.JsonNet. That's version levelling.If the versions can't be unified in a nice way, warn and suggest calling
paket update newtonsoft.json.forki commentedon Dec 7, 2014
ok that sounds really useful.
I didn't start this before since I don't like the idea of storing the dependencies file as a copy in the lock file (like bundler does). Until today I didn't really saw a better way, but maybe the following could work:
then we run the resolver.
haf commentedon Dec 16, 2014
Current workflow
haf commentedon Dec 16, 2014
Another question is how to replace a nuget. In ruby-world I do this:
edit Gemfile, replace the string with the other, run 'bundle install', done.
In paket-world, I tried this:
edit paket.dependencies, run 'paket install', complains about lock-file, figure I need to update each project's references too, update those, run paket install again, get same complaint, try paket update, more complaints, scream a little, run '--force', paket is happy, it compiles, but xxproj-file not updated, go for lunch, come back 5 hours later when I discover the old package is still referenced, file this post.
forki commentedon Dec 16, 2014
We will change the install workflow soon.
Another question is how to replace a nuget. In ruby-world I do this:
edit Gemfile, replace the string with the other, run 'bundle install', done.
In paket-world, I tried this:
edit paket.dependencies, run 'paket install', complains about lock-file,
figure I need to update each project's references too, update those, run
paket install again, get same complaint, try paket update, more complaints,
scream a little, run '--force', paket is happy, it compiles, but
xxproj-file not updated, go for lunch, come back 5 hours later when I
discover the old package is still referenced, file this post.
—
Reply to this email directly or view it on GitHub
#435 (comment).
forki commentedon Dec 27, 2014
latest alpha detects changes in the dependencies file and performs a selective update during
paket install.It doesn't consider changes in the references file, yet. But please give it a try and report issues.
forki commentedon Dec 29, 2014
latest alpha also scans references files for addition
forki commentedon Dec 29, 2014
v0.20 is released - please open new issues with concrete issues.
haf commentedon Dec 29, 2014
@forki thank you, we'll try it out
haf commentedon Dec 30, 2014
It's amazing! =) Smooooth!
Have a dog with a light sabre!