Confusion between "paket install" and "paket update"
See original GitHub issueThere’s considerable overlap in the behavior of paket install
and paket update
, and some confusion on which one should be used in which situation.
Summary
paket update
could also be calledpaket forget-everything-and-re-resolve (and-install-into-projects)
paket install
could also be calledpaket only-update-packages-where-absolutely-necessary (and-install-into-projects)
Proposed solution: My intuition is that paket install
should really be called paket update --pin-unchanged
, because this is what it really does.
paket install
does not really have a purpose anymore then, but should probably be kept for compatibility reasons. The documentation of paket install
could then say: “paket install
has the same effect as paket update --pin-unchanged
”. This would also remove the confusion between the two commands.
For completeness: The third use case (no updates to paket.lock
) is already covered by another command:
paket restore
could also be calledpaket do-not-update-versions-and-install-into-projects
Details:
Behavior of paket update:
- Delete paket.lock if it exists, therefore discarding the currently used versions of the packages (UpdateProcess.Update).
- Compute a new
paket.lock
file based onpaket.dependencies
(UpdateProcess.SmartInstall/.SelectiveUpdate) - (Optionally:) Install everything from paket.lock (InstallProcess.InstallIntoProjects)
Behavior of paket install:
- If no
paket.lock
file exists: Same behavior aspaket update
(it just calls UpdateProcess. SmartInstall) - If a
paket.lock
file exists: (UpdateProcess.SmartInstall/.SelectiveUpdate)- Compare
paket.lock
andpaket.dependencies
to find (DependencyChangeDetection. findChangesInDependenciesFile):- Dependencies that were added to
paket.dependencies
- Dependencies where the current version from
paket.lock
does not match the version requirement frompaket.dependencies
- Dependencies that were added to
- Pin all unchanged dependencies (i.e. the ones that are not newly added or modified)
- Compute a new
paket.lock
, taking into account the pinned dependencies.
- Compare
- Install everything from paket.lock (InstallProcess.InstallIntoProjects)
Behavior of paket restore:
- Install everything from paket.lock (RestoreProcess.Restore)
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:17 (15 by maintainers)
Top Results From Across the Web
paket install and paket update is deleting packages.config ...
When there is a paket.references paket is deleting the packages.config file (even when they contain different packages).
Read more >Seven tips for using Paket effectively
My last tip is to know the differences between the three core commands of Paket: install , restore and update . I often...
Read more >Learn how to use paket
Once you've installed Paket, it's time to learn how to use it! ... paket update - Run this to update your codebase to...
Read more >FAQ — Frequently Asked Questions
No, since Paket provides a global view of your dependencies it usually installs only one version of a package and therefore the version...
Read more >Getting Started with Paket – Part 1 - The Cockney Coder
Update – Update is a more drastic version of Install. It does the same thing, except it updates the entire dependency graph, rather...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Your’re right; I cross-checked
RestoreProcess.Restore
to verify this.I incorporated your feedback into my proposal above. The original text is marked using
strikethrough. Do you think it’s better now?To get the terminology clear (and to try to establish an ubiquituous language):
docs say:
add
add --no-install
install
remove
remove --no-install
update
restore
install
)What’s your feedback on the table above? Does it match the “mental model” of the expected end user?
we will review on the PR again - and discuss wording