Skip to content

Julia: user depot not accessible with Pkg.add #17455

@lexming

Description

@lexming

The Julia easyconfigs and JuliaPackages follow the usual approach of prepending installation paths to the environment. In this case, new modules prepend their installation path to JULIA_DEPOT_PATH.

However, this breaks the capability of end-users to install new packages with Pkg.add() in Julia. This tool only uses the top path in DEPOT_PATH as destination of new installations. This seems to be by design as described in the Pkg documentation

The depot path is controlled by the Julia DEPOT_PATH global variable which is populated at startup based on the value of the JULIA_DEPOT_PATH environment variable. The first entry is the “user depot” and should be writable by and owned by the current user. The user depot is where: registries are cloned, new package versions are installed, named environments are created and updated, package repos are cloned, newly compiled package image files are saved, log files are written, development packages are checked out by default, and global configuration data is saved. Later entries in the depot path are treated as read-only and are appropriate for registries, packages, etc. installed and managed by system administrators.

So we would have to append paths to JULIA_DEPOT_PATH to not break Pkg. The issue is that this approach allows user installs to overwrite what is loaded with modules from EasyBuild (not desirable).

An alternative approach might be to use JULIA_LOAD_PATH in our easyconfigs to control locations with available installations and only set JULIA_DEPOT_PATH to the user's depot.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions