From e1a2f55b0d81813b29b3a11adec46c8e6f6a5a87 Mon Sep 17 00:00:00 2001 From: Simon May Date: Wed, 12 Jul 2023 15:54:38 -0400 Subject: [PATCH 1/3] =?UTF-8?q?Remove=20mentions=20of=20=E2=80=9Chome=20pr?= =?UTF-8?q?oject=E2=80=9D=20in=20documentation=20and=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The concept of “home project” was removed in JuliaLang/julia#36434. Also see #1891. Fixes #3127 --- src/Pkg.jl | 5 ++--- src/REPLMode/command_declarations.jl | 2 +- test/api.jl | 2 +- test/new.jl | 2 +- test/repl.jl | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Pkg.jl b/src/Pkg.jl index 826411c312..734c064c13 100644 --- a/src/Pkg.jl +++ b/src/Pkg.jl @@ -539,9 +539,8 @@ The logic for what path is activated is as follows: activate the environment at the tracked path. * Otherwise, `s` is interpreted as a non-existing path, which is then activated. -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. +If no argument is given to `activate`, then use `LOAD_PATH` to determine the +project to activate. # Examples ``` diff --git a/src/REPLMode/command_declarations.jl b/src/REPLMode/command_declarations.jl index d1c48a383a..6504cc614b 100644 --- a/src/REPLMode/command_declarations.jl +++ b/src/REPLMode/command_declarations.jl @@ -304,7 +304,7 @@ PSA[:name => "activate", activate [--shared] path activate --temp -Activate the environment at the given `path`, or the home project environment if no `path` is specified. +Activate the environment at the given `path`, or use `LOAD_PATH` to determine the project to activate if no `path` is specified. The active environment is the environment that is modified by executing package commands. When the option `--shared` is given, `path` will be assumed to be a directory name and searched for in the `environments` folders of the depots in the depot stack. In case no such environment exists in any of the depots, diff --git a/test/api.jl b/test/api.jl index 244b929a11..7dadc1fc48 100644 --- a/test/api.jl +++ b/test/api.jl @@ -38,7 +38,7 @@ using ..Utils cd(mkdir("tests")) Pkg.activate("Foo") # activate developed Foo from another directory @test Base.active_project() == joinpath(path, "modules", "Foo", "Project.toml") - Pkg.activate() # activate home project + Pkg.activate() # activate LOAD_PATH project @test Base.ACTIVE_PROJECT[] === nothing end end end diff --git a/test/new.jl b/test/new.jl index dd5e5c731a..77ec679ca0 100644 --- a/test/new.jl +++ b/test/new.jl @@ -53,7 +53,7 @@ Pkg._auto_gc_enabled[] = false source053 = pkg.source source053_time = mtime(pkg.source) end - # - The home project was automatically created. + # - The active project was automatically created. @test haskey(Pkg.project().dependencies, "Example") @test length(Pkg.project().dependencies) == 1 # Now we install the same package at a different version: diff --git a/test/repl.jl b/test/repl.jl index e80f072ced..542baffbd0 100644 --- a/test/repl.jl +++ b/test/repl.jl @@ -260,7 +260,7 @@ temp_pkg_dir() do project_path pkg"activate --shared Foo" # activate existing shared Foo @test Base.active_project() == joinpath(tmpdir, "Project.toml") pop!(Base.DEPOT_PATH) - pkg"activate" # activate home project + pkg"activate" # activate LOAD_PATH project @test Base.ACTIVE_PROJECT[] === nothing # expansion of ~ if !Sys.iswindows() From a9758974bd931c9f05633fd79702c87b1b1fc245 Mon Sep 17 00:00:00 2001 From: Simon May Date: Tue, 8 Aug 2023 23:04:03 -0400 Subject: [PATCH 2/3] Clarify no-argument behavior of activate in docstring --- src/Pkg.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Pkg.jl b/src/Pkg.jl index 734c064c13..ef9705aefc 100644 --- a/src/Pkg.jl +++ b/src/Pkg.jl @@ -539,8 +539,7 @@ The logic for what path is activated is as follows: activate the environment at the tracked path. * Otherwise, `s` is interpreted as a non-existing path, which is then activated. -If no argument is given to `activate`, then use `LOAD_PATH` to determine the -project to activate. +If no argument is given to `activate`, then use the first project found in `LOAD_PATH`. # Examples ``` From 15dcd2aa23a61c0e370f537b42452a798862cd05 Mon Sep 17 00:00:00 2001 From: Simon May Date: Wed, 9 Aug 2023 03:25:00 +0000 Subject: [PATCH 3/3] Clarify no-argument behavior of activate in REPL help Co-authored-by: Ian Butterworth --- src/REPLMode/command_declarations.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/REPLMode/command_declarations.jl b/src/REPLMode/command_declarations.jl index 6504cc614b..a0edb437da 100644 --- a/src/REPLMode/command_declarations.jl +++ b/src/REPLMode/command_declarations.jl @@ -304,7 +304,7 @@ PSA[:name => "activate", activate [--shared] path activate --temp -Activate the environment at the given `path`, or use `LOAD_PATH` to determine the project to activate if no `path` is specified. +Activate the environment at the given `path`, or use the first project found in `LOAD_PATH` if no `path` is specified. The active environment is the environment that is modified by executing package commands. When the option `--shared` is given, `path` will be assumed to be a directory name and searched for in the `environments` folders of the depots in the depot stack. In case no such environment exists in any of the depots,