How to update a library dependency

Upgrading a library is very similar to the regular process of updating Unison code. It involves one additional simple command. The following workflow uses Unison's standard library,base,as an example.


Upgrade workflow:

    • pullthe latest version of the dependency into your codebase so that it is a sibling of your current library version.
      • myProject/main> pull @unison/base/releases/2.0.0 lib.base_2_0_0
    • Run theupgradecommand, indicating which library you'd like to upgrade
      • myProject/main> upgrade base_1_0_0 base_2_0_0
  1. If there are conflicts to resolve, the UCM will open up the affected terms in your editor. Resolve the conflicts and enterupdateagain once the file typechecks.

In rare cases, the Unison project that you're depending upon may be located in a user'spublicnamespace, and therefore predates the project ecosystem. In that case, you can usethis process for upgrading.