Typespecs already required an atom key but it was never enforced by
code. We're doing this because we eventually would like to support
passing a _path_ like:
Application.get_env(:myapp, [:key, :foo, :bar])
and this way we will be consistent with recently added
`Application.compile_env/3`.
Mix stores the compile_env in each applications' .app file.
Releases and Mix tasks were also changed to validate against
the runtime configuration against any stored `compile_env`.
In case of mismatches, an error is raised during boot.
2) test application directory (ApplicationTest)
test/elixir/application_test.exs:53
Assertion with == failed
code: String.downcase(Application.app_dir(:elixir)) == String.downcase(Path.join(root, "bin/../lib/elixir"))
lhs: "d:/home/docs/dev/git_repos/robi-wan-elixir/lib/elixir"
rhs: "d:/home/docs/dev/git_repos/robi-wan-elixir/bin/../lib/elixir"
stacktrace:
test/elixir/application_test.exs:55: (test)
`Application.app_dir(:elixir)` delivers under Windows (7 Pro 64bit) an absolute path:
iex(1)> Application.app_dir(:elixir)
"d:/home/docs/dev/git_repos/robi-wan-elixir/lib/elixir"
Under Linux (Ubuntu 16.04 64bit) it delivers a relative path:
iex(1)> Application.app_dir(:elixir)
"/home/robi-wan/development/work/robi-wan-elixir/bin/../lib/elixir"
`Application.app_dir/1` uses `:code.lib_dir` to retrieve the code path.
So maybe the different types of paths (relative vs absolute) are caused by Erlang.
Suggestion to fix the tests under Windows: Use Path.expand/1 to convert
the path (on the right hand side of the assertion) to an absolute path.