Ignore package version compat

I am trying to install two package versions that are incompatible with each other. Can I tell ]add to ignore the incompatibility and proceed anyway?

As far as I know, there are three solutions:

  1. open a pull request at one or both of the packages to fix the issue upstream,
  2. clone one of the packages, use dev Foo and remove the compat entries on your computer for package Foo or
  3. if you have set compat entries too, switch to an older version of one of the packages.

The first one is preferred, because it would solve the problem for everyone. Which packages are incompatible? If you mention it here, it is very likely that someone will start to work on a fix.

1 Like

There’s technically a a fourth way, although this is not recommended and rarely works:
The package manager keeps environments internally consistent with possibly different versions, but it will not load two different versions of a dependency even when you are using them from different environments (or so it used to, but I don’t think this changed). So having the incompatible packages in distinct environments and then loading the first whos dependency versions you want to use, then switching the environment and loading the second package will try to do what you want (but be aware of the consequences, compat entries are there for a reason).

Edit: here’s the relevant section

https://docs.julialang.org/en/v1/manual/code-loading/#Environment-stacks

Packages in non-primary environments can end up using incompatible versions of their dependencies even if their own environments are entirely compatible. This can happen when one of their dependencies is shadowed by a version in an earlier environment in the stack (either by graph or path, or both).

1 Like