Skip to content

Commit 1d12f3a

Browse files
committed
Add top_level field to Mix.Dep struct
1 parent 26d2df6 commit 1d12f3a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/mix/lib/mix/dep.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ defmodule Mix.Dep do
1111
* `status` - the current status of the dependency, check `Mix.Dep.format_status/1` for more info;
1212
* `opts` - the options given by the developer
1313
* `deps` - dependencies of this dependency
14+
* `top_level` - true if dependency was defined in the top-level project
1415
* `manager` - the project management, possible values: `:rebar` | `:mix` | `:make` | `nil`
1516
* `from` - path to the file where the dependency was defined
16-
* `extra` - a slot for adding extra configuration based on the scm.
17-
the information on this field is private to the scm and
17+
* `extra` - a slot for adding extra configuration based on the manager.
18+
the information on this field is private to the manager and
1819
should not be relied on.
1920
2021
A dependency is in two specific states: loaded and unloaded.
@@ -33,7 +34,7 @@ defmodule Mix.Dep do
3334
3435
"""
3536
defstruct scm: nil, app: nil, requirement: nil, status: nil, opts: nil,
36-
deps: [], extra: nil, manager: nil, from: nil
37+
deps: [], top_level: false, extra: nil, manager: nil, from: nil
3738

3839
@doc """
3940
Returns all children dependencies for the current project,

0 commit comments

Comments
 (0)