hedwig-im/hedwig

When trying to include v0.1.0 in my project, dependency resolution for exml fails.

alakra opened this issue · 3 comments

When trying to start a link via a new client like so:

defmodule Thermubots.Device.Messenger do
  use GenServer

  alias Hedwig.Client

  def start_link(settings) do
    config = %{jid: settings.username,
               password: settings.password,
               nickname: settings.id,
               resource: settings.resource}

    GenServer.start_link(__MODULE__, config)
  end

  def init(config) do
    {:ok, client} = Client.start_link(config)
    {:ok, client: client}
  end
end

I get the following:

** (UndefinedFunctionError) undefined function: :exml_stream.new_parser/0 (module :exml_stream is not available)
    :exml_stream.new_parser()
    lib/hedwig/transports/tcp.ex:89: Hedwig.Transports.TCP.init/1
    (stdlib) gen_server.erl:306: :gen_server.init_it/6

I'm using the following versions of Elixir/Erlang (from iex --version):

Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Elixir 1.0.4

What am I doing wrong? (thanks ahead of time ❤️ ❤️ ❤️)

@alakra Can you confirm if the exml dependency is in your ./deps?

I think you need to manually add :exml to your dependencies in mix.exs because it's not a hex package. I'll make sure to add those details to the README.

I see. I just added that as a dependency and things are working great now. Thanks for responding!

Awesome! Glad to help!
On Wed, Apr 29, 2015 at 14:44 Angelo Lakra notifications@github.com wrote:

I see. I just added that as a dependency and things are working great now.
Thanks for responding!


Reply to this email directly or view it on GitHub
https://github.com/scrogson/hedwig/issues/6#issuecomment-97557591.