Skip to content

Commit

Permalink
Update Julia version in Docs/Standard Library/Pkg (#3542)
Browse files Browse the repository at this point in the history
  • Loading branch information
navidcy authored Jul 8, 2023
1 parent 2cd30ad commit d753d0b
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions docs/src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ To get back to the Julia REPL, press `Ctrl+C` or backspace (when the REPL cursor
Upon entering the Pkg REPL, you should see the following prompt:

```julia-repl
(@v1.8) pkg>
(@v1.9) pkg>
```

To add a package, use `add`:

```julia-repl
(@v1.8) pkg> add Example
(@v1.9) pkg> add Example
Resolving package versions...
Installed Example ─ v0.5.3
Updating `~/.julia/environments/v1.8/Project.toml`
Updating `~/.julia/environments/v1.9/Project.toml`
[7876af07] + Example v0.5.3
Updating `~/.julia/environments/v1.8/Manifest.toml`
Updating `~/.julia/environments/v1.9/Manifest.toml`
[7876af07] + Example v0.5.3
```

Expand All @@ -49,13 +49,13 @@ julia> Example.hello("friend")
We can also specify multiple packages at once to install:

```julia-repl
(@v1.8) pkg> add JSON StaticArrays
(@v1.9) pkg> add JSON StaticArrays
```

The `status` command (or the shorter `st` command) can be used to see installed packages.

```julia-repl
(@v1.8) pkg> st
(@v1.9) pkg> st
Status `~/.julia/environments/v1.6/Project.toml`
[7876af07] Example v0.5.3
[682c06a0] JSON v0.21.3
Expand All @@ -68,27 +68,27 @@ Status `~/.julia/environments/v1.6/Project.toml`
To remove packages, use `rm` (or `remove`):

```julia-repl
(@v1.8) pkg> rm JSON StaticArrays
(@v1.9) pkg> rm JSON StaticArrays
```

Use `up` (or `update`) to update the installed packages

```julia-repl
(@v1.8) pkg> up
(@v1.9) pkg> up
```

If you have been following this guide it is likely that the packages installed are at the latest version
so `up` will not do anything. Below we show the status output in the case where we deliberately have installed
an old version of the Example package and then upgrade it:

```julia-repl
(@v1.8) pkg> st
Status `~/.julia/environments/v1.8/Project.toml`
(@v1.9) pkg> st
Status `~/.julia/environments/v1.9/Project.toml`
⌃ [7876af07] Example v0.5.1
Info Packages marked with ⌃ have new versions available and may be upgradable.
(@v1.8) pkg> up
Updating `~/.julia/environments/v1.8/Project.toml`
(@v1.9) pkg> up
Updating `~/.julia/environments/v1.9/Project.toml`
[7876af07] ↑ Example v0.5.1 ⇒ v0.5.3
```

Expand All @@ -101,16 +101,16 @@ For more information about managing packages, see the [Managing Packages](@ref M

Up to this point, we have covered basic package management: adding, updating, and removing packages.

You may have noticed the `(@v1.8)` in the REPL prompt.
This lets us know that `v1.8` is the **active environment**.
You may have noticed the `(@v1.9)` in the REPL prompt.
This lets us know that `v1.9` is the **active environment**.
Different environments can have different totally different packages and versions installed from another environment.
The active environment is the environment that will be modified by Pkg commands such as `add`, `rm` and `update`.

Let's set up a new environment so we may experiment.
To set the active environment, use `activate`:

```julia-repl
(@v1.8) pkg> activate tutorial
(@v1.9) pkg> activate tutorial
[ Info: activating new environment at `~/tutorial/Project.toml`.
```

Expand Down Expand Up @@ -166,14 +166,14 @@ For more information about environments, see the [Working with Environments](@re
If you are ever stuck, you can ask `Pkg` for help:

```julia-repl
(@v1.8) pkg> ?
(@v1.9) pkg> ?
```

You should see a list of available commands along with short descriptions.
You can ask for more detailed help by specifying a command:

```julia-repl
(@v1.8) pkg> ?develop
(@v1.9) pkg> ?develop
```

This guide should help you get started with `Pkg`.
Expand Down

0 comments on commit d753d0b

Please sign in to comment.