You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because instantiating the project follows the symlink and creates/instantiates the Manifest.toml in the directory of the pointed to Project.toml.
However, trying to using any package in that project checks the project directory itself, which doesn't have a Manifest.toml due to it having been created elsewhere.
(myproj) pkg> instantiate
Updating registry at `~/.julia/registries/General.toml`
Updating `~/Documents/progwork/julia/tests/myproj/Project.toml`
[615f187c] + IfElse v0.1.1
Updating `~/Documents/progwork/julia/tests/myproj/Manifest.toml`
[615f187c] + IfElse v0.1.1
(myproj) pkg> st
Status `~/Documents/progwork/julia/tests/myproj/Project.toml`
[615f187c] IfElse v0.1.1
julia>using IfElse
ERROR: ArgumentError: Package IfElse [615f187c-cbe4-4ef1-ba3b-2fcf58d6d173] is required but does not seem to be installed:- Run `Pkg.instantiate()` to install all recorded dependencies.
Stacktrace:
[1] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1685
[2] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1571
[3] macro expansion
@ ./loading.jl:1559 [inlined]
[4] macro expansion
@ ./lock.jl:267 [inlined]
[5] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1522
julia> Base.active_project()
"/home/chriselrod/Documents/progwork/julia/tests/myprojlink/Project.toml"
shell> ll myprojlink/
total 4.0K
lrwxrwxrwx. 1 chriselrod chriselrod 22 Jan 1815:19 Project.toml ->../myproj/Project.toml
I attached the sample directory illustrating the problem.
myproj contains a Project.toml. myprojlink contains a symlink to this Project.toml
I activate the myprojlink project. The active project is myprojlink.
I instantiate the project. The Manifest.toml gets created in myproj, the location of the actual Project.toml. That is, it follows the link.
I using IfElse. This throws an error, because there is no Manifest.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 the Manifest.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#37
The text was updated successfully, but these errors were encountered:
If the Project and Manifest files are created correctly, then this seems to be more an issue with the package loading code in Julia and not the package manager itself.
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: