Best practice for handling "same" types between different packages

You set compatible package versions in Project.toml. The actual versions of packages that are going to be used when running your program are defined by Manifest.toml.

When you create a package P that depends on B and C, package A will be a (transitive) dependency of P, too. Once you instantiate P, Manifest.toml will be created and versions of all dependencies will be resolved. If B fixes A to be at version x (in Project.toml of package B), and C fixes A to be at a different version y (in Project.toml of package c), then the dependencies cannot be resolved and you get an error. However, packages usually define a range of compatible versions of their dependencies, in which case a version for A would be found that works for both B and C. That version is going to be used when running P.

3 Likes