Projects with symlinked Project.toml
s are broken
#48339
Labels
bug
Indicates an unexpected problem or unintended behavior
Project.toml
s are broken
#48339
Issue originally filed with Pkg: JuliaLang/Pkg.jl#3326
Because instantiating the project follows the symlink and creates/instantiates the
Manifest.toml
in the directory of the pointed toProject.toml
.However, trying to
using
any package in that project checks the project directory itself, which doesn't have aManifest.toml
due to it having been created elsewhere.E.g.:
tests.tar.gz
I attached the sample directory illustrating the problem.
myproj
contains aProject.toml
.myprojlink
contains a symlink to thisProject.toml
I activate the
myprojlink
project. The active project ismyprojlink
.I instantiate the project. The
Manifest.toml
gets created inmyproj
, the location of the actualProject.toml
. That is, it follows the link.I
using IfElse
. This throws an error, because there is noManifest.toml
inside the active project.It unhelpfully suggests I try instantiating the project.
For the example to illustrate the problem, you can't have
IfElse.jl
in your main environment/it can't be findable otherwise. Otherwise it'll load from that Project+Manifest instead of the one we're testing.I used
IfElse
as the example because (a) I figured people were unlikely to have it in their main environment and (b) it is one of the most lightweight packages.I think
Pkg
should be consistent in following or not following the symlink with respect to creating and reading theManifest.toml
.It is the inconsistency that caused the problem.
Why does this example matter?
Some package managers (e.g. straight.el) clone repos in one directory, and then sym link the files to another directory for building.
This doesn't work if you want to have Julia dependencies without also shipping a
Manifest.toml
to be copied over. non-Jedi/eglot-jl#37The text was updated successfully, but these errors were encountered: