Package manager

When should I use:

up --project

in the package manager?

Advantages/ disadvantages?

1 Like

Do you mean --project?

(@v1.9) pkg> up --package
ERROR: option 'package' is not a valid option

(@v1.9) pkg> ?up
  [up|update] [-p|--project]  [opts] pkg[=uuid] [@version] ...
  [up|update] [-m|--manifest] [opts] pkg[=uuid] [@version] ...
  opts: --major | --minor | --patch | --fixed

  Update pkg within the constraints of the indicated version specifications.
  These specifications are of the form @1, @1.2 or @1.2.3, allowing any
  version with a prefix that matches, or ranges thereof, such as @1.2-3.4.5.
  In --project mode, package specifications only match project packages, while
  in --manifest mode they match any manifest package. Bound level options
  force the following packages to be upgraded only within the current major,
  minor, patch version; if the --fixed upgrade level is given, then the
  following packages will not be upgraded at all.

  After any package updates the project will be precompiled. For more
  information see pkg> ?precompile.

Yes, sorry for the typo.

I mean, I can read the help, but it doesn’t answer my question, it just confuses me. I need a practical advice. When would you use the option --project?

1 Like

To be more specific: What is the difference between

  • up --project
  • up --manifest
  • what is the default?
  • and when should you use which variant?

I think --manifest is the default, but I’m not sure, and I think both apply really only with other options, e.g. to preserving versions.

I see e.g.:

⌃ [d330b81b] PyPlot v2.11.1

and I would have thought:

(@v1.9) pkg> up

actually updates that and all packages left behind. But it doesn’t. I have a messy environment, and something is holding it back. Happens to me all the time. I don’t know of a way to force the latest version except to look the latest/er version up manually and (try to force it) this way:

(@v1.9) pkg> add PyPlot@2.11.2
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package PyPlot [d330b81b]:
 PyPlot [d330b81b] log:
 ├─possible versions are: 2.6.1-2.11.2 or uninstalled
 ├─restricted to versions 0.0.0-2.11.1 by FLOWNoise [d27480ee], leaving only versions: 2.6.1-2.11.1
 │ └─FLOWNoise [d27480ee] log:
 │   ├─possible versions are: 2.3.1 or uninstalled
 │   └─FLOWNoise [d27480ee] is fixed to version 2.3.1
 └─restricted to versions 2.11.2 by an explicit requirement — no versions left

[ I know how to fix that by deleting, rm some packages (and I wouldn’t want up to do that, so it MUST fail), and try again, but often this is a screenful or more of info, and a bit confusing.]


(@v1.9) pkg> up PyPlot@2.11.2

with or without a space does something, but in practice nothing. I would like an error there too, seemingly add as I used is to really mean you want an upgrade… There’s nothing wrong (always) with not being at the latest version, though I would want it to be more clear if I’m missing out, to not have to do st.

I think up means up all packages, best effort, just silently failing. And with --project probably not the default, probably to to use with specifying some specific package, and project file to prioritize, but NOT all its dependencies, up --manifest .. is for that.

What happens if you do NOT preserve is that sometimes versions get upgraded, but also some downgraded, since that was the only way to upgrade some package. I watch out for that happening, or use the preserve option. I think those options may be fore only preserving versions for just some package.

If you have been following this guide it is likely that the packages installed are at the latest version so up will not do anything. Below we show the status output in the case where we deliberately have installed an old version of the Example package and then upgrade it:

In my case I never deliberately used an old version.