Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParallelStream is not available #56

Closed
luk3thomas opened this issue Oct 19, 2016 · 9 comments
Closed

ParallelStream is not available #56

luk3thomas opened this issue Oct 19, 2016 · 9 comments

Comments

@luk3thomas
Copy link

Hi!

I recently created release with edeliver and I'm seeing this?

** (exit) an exception was raised:^M
    ** (UndefinedFunctionError) function ParallelStream.map/3 is undefined (module ParallelStream is not available)^M
        ParallelStream.map(#Function<57.89908360/2 in Stream.transform/3>, #Function<1.67996581/1 in CSV.Decoder.decode/2>, [num_workers: 3])^M

Naive question, but would requiring ParallelStream in the Decoder module fix the runtime error I am seeing?

@beatrichartz
Copy link
Owner

Probably you want to load parallel stream as part of your applications, however that should be done by this library in the current version - which version are you using?

@luk3thomas
Copy link
Author

From mix.lock

|    "csv": {:hex, :csv, "1.4.3", "de92e2bc85bc09ec676f19f6ec2daa59ba1f0103d1da96cf0cca36342c90d93f", [:mix], [{:parallel_stream, "~> 1.0.4", [hex: :parallel_stream, optional: false]}]},

Yeah, I thought about that. I experimented loading parallel stream in my own application as an application dependency. The application wouldn't start since parallel stream isn't a direct dependency.

@beatrichartz
Copy link
Owner

What does your application definition in mix.exs look like, does it load csv? CSV itself loads parallel_stream as an application dependency, so it should be loaded as part of that.

@luk3thomas
Copy link
Author

Here is an except of my mix file:

  def application do
    [mod: {Aprit, []},
     applications: [:phoenix, :phoenix_pubsub, :phoenix_html, :cowboy, :logger, :gettext,
                    :phoenix_ecto, :postgrex, :guardian, :csv, :edeliver]]
  end

  defp deps do
    [{:phoenix, "~> 1.2.1"},
     {:phoenix_pubsub, "~> 1.0"},
     {:phoenix_ecto, "~> 3.0"},
     {:postgrex, ">= 0.0.0"},
     {:phoenix_html, "~> 2.6"},
     {:phoenix_live_reload, "~> 1.0", only: :dev},
     {:guardian, "~> 0.12.0"},
     {:gettext, "~> 0.11"},
     {:poison, "~> 1.0"},
     {:csv, "~> 1.4.2"},
     {:cowboy, "~> 1.0"},
     {:edeliver, "1.3.0"},
     {:distillery, ">= 0.8.0", warn_missing: false}]
  end

Oh I see that it does require parallel stream as an application dependency. Hmmm, weird. I'm probably doing something wrong. If you don't mind, I'll go ahead close the issue for now and I'll reopen it if I find anything else.

@davidkuhta
Copy link

davidkuhta commented Oct 22, 2016

@luk3thomas Did you find a solution? I have this same issue and have already tried adding :parallel_stream to my applications: with no luck.
(Same situation edeliver/distillery, can't find parallel stream from remote_console)

@beatrichartz
Copy link
Owner

Might this be related to this issue edeliver/edeliver#157 ?

@davidkuhta
Copy link

davidkuhta commented Oct 23, 2016

@beatrichartz Thanks, but I was able to build my releases.
After much trial and error, I did a fresh build and it worked.
Could've just been the other RTFM (with R=Restart & M=Machine) ¯**(ツ)**/¯

@luk3thomas
Copy link
Author

I think #51 should fix the problem I am seeing. I suppose the fix will be included in an upcoming release sometime soon?

@beatrichartz
Copy link
Owner

@luk3thomas I released this in 1.4.4 today, sorry for the wait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants