Skip to content

Commit 1e0dfb1

Browse files
committed
Update naming
1 parent c2e63e9 commit 1e0dfb1

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

lib/mix/lib/mix.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,10 @@ defmodule Mix do
352352
* `MIX_INSTALL_DIR` *(since v1.12.0)* - specifies directory where `Mix.install/2` keeps
353353
install cache
354354
355-
* `MIX_DISABLE_LOCK` - disables mix compilation locking. While not recommended, this may be
356-
necessary in cases where hard links or TCP sockets are not available. When opting for this
357-
behaviour, make sure to not start concurrent compilations of the same project.
355+
* `MIX_OS_CONCURRENCY_LOCK` - when set to `0` or `false`, disables mix compilation locking.
356+
While not recommended, this may be necessary in cases where hard links or TCP sockets are
357+
not available. When opting for this behaviour, make sure to not start concurrent compilations
358+
of the same project.
358359
359360
* `MIX_PATH` - appends extra code paths
360361

lib/mix/lib/mix/sync/lock.ex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ defmodule Mix.Sync.Lock do
7979
This function can also be called if this process already has the
8080
lock. In such case the function is executed immediately.
8181
82-
When the `MIX_DISABLE_LOCK` environment variable is set, the lock is
83-
ignored and the function is executed immediately.
82+
When the `MIX_OS_CONCURRENCY_LOCK` environment variable is set to
83+
a falsy value, the lock is ignored and the function is executed
84+
immediately.
8485
8586
## Options
8687
@@ -118,7 +119,7 @@ defmodule Mix.Sync.Lock do
118119
end
119120
end
120121

121-
defp lock_disabled?(), do: System.get_env("MIX_DISABLE_LOCK") in ~w(1 true)
122+
defp lock_disabled?(), do: System.get_env("MIX_OS_CONCURRENCY_LOCK") in ~w(0 false)
122123

123124
defp lock(path, on_taken) do
124125
File.mkdir_p!(path)
@@ -207,7 +208,7 @@ defmodule Mix.Sync.Lock do
207208
could not create hard link from #{port_path} to "#{lock_path}: #{:file.format_error(reason)}.
208209
209210
Hard link support is required for Mix compilation locking. If your system \
210-
does not support hard links, set MIX_DISABLE_LOCK=1\
211+
does not support hard links, set MIX_OS_CONCURRENCY_LOCK=1\
211212
""")
212213
end
213214
end

0 commit comments

Comments
 (0)