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
Copy file name to clipboardExpand all lines: docs/src/environments.md
+51-23Lines changed: 51 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ The following discusses Pkg's interaction with environments. For more on the rol
4
4
5
5
## Creating your own projects
6
6
7
-
So far we have added packages to the default project at `~/.julia/environments/v1.0`. It is however easy to create other, independent, projects.
7
+
So far we have added packages to the default project at `~/.julia/environments/v1.6`. It is however easy to create other, independent, projects.
8
8
It should be pointed out that when two projects use the same package at the same version, the content of this package is not duplicated.
9
9
In order to create a new project, create a directory for it and then activate that directory to make it the "active project", which package operations manipulate:
10
10
@@ -15,32 +15,33 @@ julia> cd("MyProject")
15
15
/Users/kristoffer/MyProject
16
16
17
17
# we can now use "." instead of a longer relative or full path:
18
-
(v1.0) pkg> activate .
18
+
(@v1.6) pkg> activate .
19
+
Activating new environment at `/Users/kristoffer/MyProject/Project.toml`
19
20
20
21
(MyProject) pkg> st
21
-
Status `Project.toml`
22
+
Status `/Users/kristoffer/MyProject/Project.toml` (empty project)
22
23
```
23
24
24
25
Note that the REPL prompt changed when the new project is activated. Since this is a newly created project, the status command shows that it contains no packages, and in fact, it has no project or manifest file until we add a package to it:
25
26
26
27
```julia-repl
27
28
julia> readdir()
28
-
0-element Array{String,1}
29
+
String[]
29
30
30
31
(MyProject) pkg> add Example
31
-
Updating registry at `~/.julia/registries/General`
This new environment is completely separate from the one we used earlier.
63
-
61
+
This new environment is completely separate from the one we used earlier. See [`Project.toml` and `Manifest.toml`](@ref Project-and-Manifest) for a more detailed explanation.
64
62
65
63
## Project Precompilation
66
64
@@ -92,9 +90,16 @@ Precompiling project...
92
90
Simply clone their project using e.g. `git clone`, `cd` to the project directory and call
0 commit comments