-
-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pkg.activate()
doesn't seem to activate the home package
#3127
Comments
Here's another and perhaps simpler MWE: user@host:~/myenv$ julia --project=. julia> using Pkg
julia> Pkg.status()
Status `~/myenv/Project.toml` (empty project)
julia> Pkg.activate(; temp=true)
Activating new project at `/tmp/jl_gmivnG`
julia> Pkg.status()
Status `/tmp/jl_gmivnG/Project.toml` (empty project)
julia> Pkg.activate()
Activating project at `~/.julia/environments/v1.8`
julia> Pkg.status()
Status `~/.julia/environments/v1.8/Project.toml`
[...] Clearly |
Noticed this too, with ➜ JULIA_PROJECT=~/.julia/dev/Example julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.9.0 (2023-05-07)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using Pkg
julia> Pkg.project().path
"/Users/dkleinschmidt/.julia/dev/Example/Project.toml"
julia> ENV["JULIA_PROJECT"]
"/Users/dkleinschmidt/.julia/dev/Example"
julia> Pkg.activate()
Activating project at `~/.julia/environments/v1.9`
julia> Pkg.project().path
"/Users/dkleinschmidt/.julia/environments/v1.9/Project.toml" and 1.8: ➜ JULIA_PROJECT=~/.julia/dev/Example julia +1.8
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.8.5 (2023-01-08)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using Pkg
julia> Pkg.project().path
"/Users/dkleinschmidt/.julia/dev/Example/Project.toml"
julia> ENV["JULIA_PROJECT"]
"/Users/dkleinschmidt/.julia/dev/Example"
julia> Pkg.activate()
Activating project at `~/.julia/environments/v1.8`
julia> Pkg.project().path
"/Users/dkleinschmidt/.julia/environments/v1.8/Project.toml" |
It looks like in this case, we're calling into Line 1820 in daf02a4
|
Okay, the relevant bits in base AFAICT are:
So what this all comes down to is that |
The concept of “home project” was removed in JuliaLang/julia#36434. Also see JuliaLang#1891. Fixes JuliaLang#3127
In a project directory at
I launch julia using
abcd/ $ julia-1.8 --project=.
In julia
The docstring says "If no argument is given to activate, then activate the home project. The home project is specified by either the --project command line option to the julia executable, or the
JULIA_PROJECT
environment variable.". In this case, the specified--project
flag is not being activated anymore, andJULIA_PROJECT
is not set. In this case,Pkg.activate()
should not change the path at all, as the home project is already activated.The text was updated successfully, but these errors were encountered: