I am having a versioning problem

I am maintaining the package Implicit3DPlotting (currently @0.2.2 in the registry) and I recently discovered that when adding from the registry, the old version 0.1.6 gets installed. Even when adding specific versions to a fresh installation. I get the following error message:

(@v1.7) pkg> status
      Status `C:\Users\matth\.julia\environments\v1.7\Project.toml` (empty project)

(@v1.7) pkg> add Implicit3DPlotting@0.2.0
[ Info: Use `./Implicit3DPlotting` to add or develop the local directory at `C:\Users\matth\Implicit3DPlotting`.
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package Implicit3DPlotting [d997a800]:
 Implicit3DPlotting [d997a800] log:
 ├─possible versions are: 0.1.1-0.1.6 or uninstalled
 └─restricted to versions 0.2.0 by an explicit requirement — no versions left

Can someone explain to me why this happens and how I can fix it? I can add directly from the package url without issues.

This correctly installs v0.2.2 for me in a ]activate --temp environment.

2 Likes

Here the correct version got installed, so probably is some local version conflict. Try installing in a fresh environment. Some other package may be holding back a dependency of the most recent version of your package.

1 Like

Thanks for your responses. I reinstalled Julia, but got the same issues. Even when working in ]activate --temp, as @Sukera suggested. This is kind of curious…

Did you remove the .julia directory? You may have a broken registry.

1 Like

Please, don’t suggest to do that.

4 Likes

Ok, well, it’s too late now. Naturally, it worked and the latest version got installed. But this doesn’t really solve this issue for some users, right?

I just can confirm that it installed the latest version for me into the default/global environment.

1 Like

The problem is only for users who dump dozens and dozens of packages into a single environment, typically the global one. Users should really take the habit of using local environments and keep the global one as small as possible, ideally only with some development tools

3 Likes

Specifically here it seems that the installation failed in a temporary environment. In that case the most likely cause is a corrupted or out-of-date registry, isn’t it?

1 Like

That’s unlikely. The error message is

possible versions are: 0.1.1-0.1.6 or uninstalled

If anything that looks like an outdated registry (my diagnosis above of a polluted environment is probably also inaccurate, but it’s always good to remind people to not use them). Corrupted registries usually result in not having any versions of a package, because the entire directory is missing. If there are only some versions, like here, the reason is more likely an outdated registry. Note also that the frequency of corrupted registries in Julia v1.7 should be drastically reduced

3 Likes