florinpatrascu / bolt_sips

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

Etls cannot be used or I got it wrong #22

Closed dnesteryuk closed 6 years ago

dnesteryuk commented 7 years ago

Context:

  1. I added the bolt_sips to my project.
  2. I added export BOLT_WITH_ETLS=true to my .profile in Ubuntu.
  3. I installed dependencies.

Expected result: The etls package is installed along with the bolt_sips. Actual result: The etls is missing (the project crashes at launch).

** (Mix) Could not start application etls: could not find application file: etls.app

I successfully launched the project after adding the etls into dependencies of the project. I think the mix installs only dependencies listed in the mix.lock of the bolt_sips. Actually, I am ok to keep the etls among dependencies of my project. Probably, the approach with the BOLT_WITH_ETLS env variable should be changed. My advice is to get rid of the BOLT_WITH_ETLS and mention in the readme that the etls should be added to dependencies of a project which uses the bolt_sips. Meantime, the bolt_sips can provide a configuration option to select the ssl lib, example:

config :bolt_sips, Bolt,
  ssl_lib: :etls

What do you think?

dnesteryuk commented 7 years ago

Thank you for your hard work on this project, @florinpatrascu :clap: :fireworks:

florinpatrascu commented 7 years ago

Hi Dmitriy,

Thank you for your kind words and I am sorry to hear about your troubles with etls. I am at work now but I'll check later on to see if there are any issues with the current mix support, but I doubt there are; had Travis working with this for a while. See, the etls dependency is used, conditional, in the mix.exs. Please view this part ++ env_specific_deps(); hope I typed it right from the memory ;)

Are you sure the env variable is set, when you run mix? Also please make sure you clear up the previous dependencies, the ones where you compiled without etls. The hardcore approach :) as follows:

mix deps.unlock --all
export BOLT_WITH_ETLS=true
mix deps.get

You should see now the mix pulling etls and its dependencies.

Please let me know if this works for you. HTH - Florin

florinpatrascu commented 7 years ago

Hi there - please let me know if cleaning the previous compile results and dependencies works for you. I just had the opportunity to try on a fresh install and couldn't reproduce your case. But I don't doubt you're right, just need more info to be able to reproduce the issue at my end. Thank you!

dnesteryuk commented 7 years ago

Hello Florin,

Thank you for the fast response. I tried your approach, but it didn't work for me. :cry: Most likely, I am doing something wrong.

How did I try?

$ git clone https://github.com/sirko-io/engine.git
$ cd engine
$ mix deps.unlock --all
$ export BOLT_WITH_ETLS=true
$ mix deps.get

It isn't there.

florinpatrascu commented 7 years ago

Ugh, I see what is going on now. Mix is just doing what it's expected to do, when you set environment variables, for example:

w_and_wo_etls

However, this is not happening when bolt_sips is included in another project. Two things may happen:

I'll have to look into the how Mix works, and chat on Slack with some people; hopefully I can do this today. Sorry for the delay, Dmitriy.

Meanwhile, please try the following:

And see if bolt_sips can be "fooled" that way; because of my BoltSips.Mixfile.opt_etls/1, hopefully?! Not having a better idea right now, need a coffee, too early, but I'll be back :)

Have a great day! Florin

dnesteryuk commented 7 years ago

@florinpatrascu please, take your time. It doesn't block my work :wink: Thank you!

florinpatrascu commented 6 years ago

Etls will be removed, from the next version. Sorry for the confusion created.