Skip to content

Conversation

wojtekmach
Copy link
Member

Closes #874

nil

path ->
path = List.to_string(path)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was the culprit, when inspecting variables we had:

lib_dirs: [
  {"/Users/wojtek/src/elixir-lang/elixir/lib/elixir/ebin",
   "https://hexdocs.pm/elixir/"},
  {"/Users/wojtek/src/elixir-lang/elixir/lib/eex/ebin",
   "https://hexdocs.pm/eex/"},
  {"/Users/wojtek/src/elixir-lang/elixir/lib/iex/ebin",
   "https://hexdocs.pm/iex/"},
  {"/Users/wojtek/src/elixir-lang/elixir/lib/logger/ebin",
   "https://hexdocs.pm/logger/"},
  {"/Users/wojtek/src/elixir-lang/elixir/lib/mix/ebin",
   "https://hexdocs.pm/mix/"},
  {"/Users/wojtek/src/elixir-lang/elixir/lib/ex_unit/ebin",
   "https://hexdocs.pm/ex_unit/"},
  {"/usr/local/opt/asdf/installs/erlang/21.1/lib",
   "http://www.erlang.org/doc/man/"}
]
path: "/Users/wojtek/src/elixir-lang/elixir/bin/../lib/mix/ebin/Elixir.Mix.Tasks.Compile.App.beam"

which explains the discrepancy.

I couldn't easily write a test for it, verified by regenerating Elixir docs.

do: prefix <> module.id <> "." <> entry

lib_dirs = extra_lib_dirs ++ elixir_lib_dirs() ++ erlang_lib_dirs()
lib_dirs = Enum.map(lib_dirs, fn {path, url} -> {Path.expand(path), url} end)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer if we did not do this and the paths were already given expanded. Would that be possible?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@josevalim agreed. I just realised I was expanding elixir paths twice so doing it just in elixir_lib_dir/1 now.

@wojtekmach wojtekmach changed the title Always expand paths Always expand Elixir lib dirs Oct 28, 2018
@wojtekmach wojtekmach merged commit 2caa6e0 into master Oct 28, 2018
@wojtekmach wojtekmach deleted the wm-fix branch October 28, 2018 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants