florinpatrascu / bolt_sips

Neo4j driver for Elixir
Apache License 2.0
258 stars 49 forks source link

Publish latest version (0.5) to Hex? #39

Closed clintgibler closed 5 years ago

clintgibler commented 6 years ago

Hey Florin,

Thanks for creating bolt_sips, it's really useful!

In the README, you recommend using version 0.5:

def deps do
  [{:bolt_sips, "~> 0.5"}]
end

But on Hex, it appears that the latest version is 0.4.12.

I see the disclaimer in the README that you're working on implementing the db_connection behavior. Is the reason you haven't pushed version 0.5 to Hex because that's experimental?

Thanks for your help!

florinpatrascu commented 6 years ago

Hi @clintgibler - thank you for your kind feedback. The db_connection is already integrated and available in the master, you can use it right away. However, the db_connection we're using is also in development, and we cannot publish de driver to Hex.pm until the db_connection will also be published. We will publish the stable version as soon as db_connection is ready. Meanwhile the focus is on following the db_connection master branch, and on adding the bolt+routing support, but the latter is a different topic. HTH - Florin

clintgibler commented 6 years ago

@florinpatrascu Thanks for the quick response! Ah ok, that makes sense, thanks for the clarification.

I'm going to be playing with bolt_sips a bit over the next few weeks, so you may hear from me again :)

By the way, you may want to add a note in the README that one should use Elixir 1.6+ with this library. I was following the MoviesElixirPhoenix example using Elixir 1.5, and when I tried to do the following:

iex> {:ok, pid} = Bolt.Sips.start_link(url: "localhost")

I received the following error:

** (Mix) Could not start application movies_elixir_phoenix: 
  MoviesElixirPhoenix.start(:normal, []) returned an error: shutdown: failed to start child: Bolt.Sips
    ** (EXIT) an exception was raised:
        ** (ArgumentError) supervisors expect the child to be a module, a {module, arg} 
             tuple or a map with the child specification, got: 
             {:bolt_sips_pool, {:poolboy, :start_link, [[name: {:local, :bolt_sips_pool}, 
             worker_module: Bolt.Sips.Connection, size: 10, max_overflow: 5, strategy: :fifo], 
             [socket: :gen_tcp, retry_linear_backoff: [delay: 150, factor: 2, tries: 3], 
             with_etls: false, ssl: false, timeout: 15000, hostname: 'localhost', port: 7687, 
             pool_size: 10, max_overflow: 5]]}, :permanent, 5000, :worker, [:poolboy]}
            (elixir) lib/supervisor.ex:609: Supervisor.init_child/1
            (elixir) lib/enum.ex:1255: Enum."-map/2-lists^map/1-0-"/2
            (elixir) lib/enum.ex:1255: Enum."-map/2-lists^map/1-0-"/2
            (elixir) lib/supervisor.ex:581: Supervisor.init/2
            (stdlib) supervisor.erl:294: :supervisor.init/1
            (stdlib) gen_server.erl:328: :gen_server.init_it/6
            (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3

Changing to Elixir 1.6 solved the issue.

Feel free to close this issue, thanks again for your help!

florinpatrascu commented 6 years ago

Ahh, right. Good catch! I’ll open an issue on the movies demo, and will close this one after that. Thanks again!

clintgibler commented 6 years ago

No problem, thanks for your help!

nazarsh commented 6 years ago

Hi @florinpatrascu - it looks like db_connection is published and is a v1.1.3. Does that mean you can publish v0.5?

Otherwise I was getting

  > In deps/bolt_sips/mix.exs:
    {:db_connection, [env: :prod, git: "https://github.com/elixir-ecto/db_connection.git", manager: :mix]}

  > In deps/ecto/mix.exs:
    {:db_connection, "~> 1.1", [env: :prod, hex: "db_connection", repo: "hexpm", optional: true]}

until I changed the db_connection to 1.1 as you previously had it. Looking forward to using the lib and thanks for it!

florinpatrascu commented 6 years ago

@nazarsh - db_connection v1.1.3 is a maintenance release, the code from db_connection's master branch is different, and bolt_sips is using the master version. Right now, my master branch is a little behind the db_connection, especially after the removal of the external pool support from db_c.. and there are new callback I need to add, probably this weekend. But no, unfortunately I can't publish a new hex yet, sorry. Thank you for keeping an eye on this 👍

nazarsh commented 6 years ago

Thanks @florinpatrascu ! I am happy to help test any of the changes you'd make since I am pretty much setting up from scratch.

florinpatrascu commented 6 years ago

Awesome, thank you! I’ll post here a notification when I have the code synced with the latest db_connection

florinpatrascu commented 5 years ago

https://hex.pm/packages/bolt_sips/1.0.0-rc2