Search code examples
juliadependency-managementpackage-management

How the dependencies are resolved in julia?


Please correct me, if I were wrong! I assume that:
a)REQUIRES, Project.toml and Manifest.toml, Registries are used in dependency resolution in julia.
b)Project.toml and Manifest.toml can exist at both master level(ie. at user level or host level) and at project level.
c) REQUIRES and Project.toml and Manifest.toml can exist simultaneously.

Please help me in understanding the functionalities of REQUIRES, Project.toml&Manifest.toml and Registries and how the dependencies are resolved when more than one mechanism (for example, case 1: REQUIRES and Project.toml and Manifest.toml exist in a project) exists together.


Solution

  • On the old package registration system METADATA (Pkg 2 - up to Julia 0.6), dependencies were resolved using REQUIRES. On the new registration system (julia 0.7 upwards) dependencies are resolved using Project.toml and Manifest.toml. So your Julia version determines which method is used.

    The Manifest contains a complete record of the versions of all dependencies and transitive dependencies needed for a given environment. You can read more here: https://julialang.github.io/Pkg.jl/v1/managing-packages/