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

Etls cannot be used or I got it wrong #22

Closed
dnesteryuk opened this issue Mar 15, 2017 · 7 comments
Closed

Etls cannot be used or I got it wrong #22

dnesteryuk opened this issue Mar 15, 2017 · 7 comments

Comments

@dnesteryuk
Copy link
Collaborator

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
Copy link
Collaborator Author

Thank you for your hard work on this project, @florinpatrascu 👏 🎆

@florinpatrascu
Copy link
Owner

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
Copy link
Owner

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
Copy link
Collaborator Author

Hello Florin,

Thank you for the fast response. I tried your approach, but it didn't work for me. 😢 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
Copy link
Owner

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:

  • mix is only parsing the list of dependencies, w/o executing my BoltSips.Mixfile.deps/1
  • or if it does calling the ...deps/1, then the environment variable is not passed through?! Hard to believe.

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:

  • set the BOLT_WITH_ETLS to true
  • add the :etls library as a dependency to: your mix.exs file

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
Copy link
Collaborator Author

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

@florinpatrascu
Copy link
Owner

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

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

2 participants