Skip to content

Add Mix.install/2#10674

Merged
josevalim merged 5 commits intoelixir-lang:masterfrom
wojtekmach:wm-mix-install
Jan 26, 2021
Merged

Add Mix.install/2#10674
josevalim merged 5 commits intoelixir-lang:masterfrom
wojtekmach:wm-mix-install

Conversation

@wojtekmach
Copy link
Member

@josevalim josevalim merged commit af787a4 into elixir-lang:master Jan 26, 2021
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@wojtekmach wojtekmach deleted the wm-mix-install branch January 27, 2021 11:47
@wojtekmach
Copy link
Member Author

I noticed the following:

# ecto_test.exs
Mix.install([
  :ecto
])

import Ecto.Query
IO.inspect(from(p in "posts"))
~% elixir ecto_test.exs
** (CompileError) ecto_test.exs:5: module Ecto.Query is not loaded and could not be found
    (elixir 1.12.0-dev) lib/code.ex:928: Code.require_file/2

it's easy to work around it:

# ecto_test.exs
Mix.install([
  :ecto
])

defmodule Main do
  def main do
    import Ecto.Query
    IO.inspect(from(p in "posts"))
  end
end

Main.main()
# Outputs: #Ecto.Query<from p0 in "posts">

but I'm curious if there's anything we can do about it.

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