Skip to content

Commit 91f6522

Browse files
committed
Add @doc since to install_project_dir
1 parent 0bb305a commit 91f6522

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

lib/mix/lib/mix.ex

+17-9
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,6 @@ defmodule Mix do
352352
* `MIX_INSTALL_DIR` - (since v1.12.0) specifies directory where `Mix.install/2` keeps
353353
install cache
354354
355-
* `MIX_INSTALL_FORCE` - (since v1.13.0) runs `Mix.install/2` with empty install cache
356-
357355
* `MIX_PATH` - appends extra code paths
358356
359357
* `MIX_PROFILE` - a list of comma-separated Mix tasks to profile the time spent on
@@ -661,13 +659,6 @@ defmodule Mix do
661659
This function can only be called outside of a Mix project and only with the
662660
same dependencies in the given VM.
663661
664-
The `MIX_INSTALL_RESTORE_PROJECT_DIR` environment variable may be specified.
665-
It should point to a previous installation directory, which can be obtained
666-
with `Mix.install_project_dir/0` (after calling `Mix.install/2`). Using a
667-
restore dir may speed up the installation, since matching dependencies do
668-
not need be refetched nor recompiled. This environment variable is ignored
669-
if `:force` is enabled.
670-
671662
## Options
672663
673664
* `:force` - if `true`, runs with empty install cache. This is useful when you want
@@ -783,6 +774,22 @@ defmodule Mix do
783774
The contents inside `defmodule` will only be expanded and executed
784775
after `Mix.install/2` runs, which means that any struct, macros,
785776
and imports will be correctly handled.
777+
778+
## Environment variables
779+
780+
The `MIX_INSTALL_DIR` environment variable configures the directory that
781+
caches all `Mix.install/2`. It defaults to the "mix/install" folder in the
782+
default user cache of your operating system.
783+
784+
The `MIX_INSTALL_FORCE` is available since Elixir v1.13.0 and forces
785+
`Mix.install/2` to discard any previously cached entry of the current install.
786+
787+
The `MIX_INSTALL_RESTORE_PROJECT_DIR` environment variable may be specified
788+
since Elixir v1.16.2. It should point to a previous installation directory,
789+
which can be obtained with `Mix.install_project_dir/0` (after calling `Mix.install/2`).
790+
Using a restore dir may speed up the installation, since matching dependencies
791+
do not need be refetched nor recompiled. This environment variable is ignored
792+
if `:force` is enabled.
786793
"""
787794
@doc since: "1.12.0"
788795
def install(deps, opts \\ [])
@@ -1057,6 +1064,7 @@ defmodule Mix do
10571064
Returns the directory where the current `Mix.install/2` project
10581065
resides.
10591066
"""
1067+
@doc since: "1.16.2"
10601068
@spec install_project_dir() :: Path.t()
10611069
def install_project_dir() do
10621070
case Mix.State.get(:installed) do

0 commit comments

Comments
 (0)