From bd9b39e27e0c41ebd8aa8d5d0a6ed5388924e439 Mon Sep 17 00:00:00 2001 From: David Anthoff Date: Thu, 14 Mar 2019 01:54:30 -0700 Subject: [PATCH] Set --project=@. for the default kernel. (#820) --- README.md | 11 +++++++++++ deps/build.jl | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d02a281..2124c055 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,17 @@ running IJulia kernel. If your code needs to detect whether it is running in an IJulia notebook (or other Jupyter client), it can check `isdefined(Main, :IJulia) && Main.IJulia.inited`. +### Julia projects + +The default Jupyter kernel that is installed by IJulia starts with the +Julia command line flag `--project=@.`. A `Project.toml` (or `JuliaProject.toml`) +in the folder of a notebook (or in a parent folder of this notebook) will +therefore automatically become the active project for that notebook. +Users that don't want this behavior should install an additional IJulia +kernel without that command line flag (see section +[Installing additional Julia kernels](#Installing-additional-Julia-kernels)). + + ### Customizing your IJulia environment If you want to run code every time you start IJulia---but only when in IJulia---add a `startup_ijulia.jl` file to your Julia `config` directory, e.g., `~/.julia/config/startup_ijulia.jl`. diff --git a/deps/build.jl b/deps/build.jl index e67631b7..19199846 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -2,7 +2,7 @@ using Conda # Install Jupyter kernel-spec file. include("kspec.jl") -kernelpath = installkernel("Julia") +kernelpath = installkernel("Julia", "--project=@.") # make it easier to get more debugging output by setting JULIA_DEBUG=1 # when building.