Giter Club home page Giter Club logo

Comments (18)

kelostrada avatar kelostrada commented on July 16, 2024 30

for anyone having this problem - until they include it into hex, you can add this to your deps (before amqp) to fix it:
{:amqp_client, git: "https://github.com/dsrosario/amqp_client.git", branch: "erlang_otp_19", override: true}

from amqp.

whitfin avatar whitfin commented on July 16, 2024 9

@pma are you able to publish the latest to Hex, I see you're the owner of amqp_client.

Any chance of this happening? This library is forcing us to stay on OTP 18 and causing several compatibility issues (I am not comfortable pointing to a branch which may be removed at any time).

from amqp.

whitfin avatar whitfin commented on July 16, 2024 3

And, as if I'm psychic:

zackehh:~/GitHub/project$ mix deps.get
* Updating amqp_client (https://github.com/jbrisbin/amqp_client.git)
* Updating rabbit_common (https://github.com/jbrisbin/rabbit_common.git)
fatal: You are on a branch yet to be born
** (Mix) Command "git --git-dir=.git checkout --quiet " failed

Can no longer use the workaround because of rabbit_common :) Have to point at forks now, which is just ridiculous considering package managers exist.

from amqp.

blatyo avatar blatyo commented on July 16, 2024 2

I built a fork of this project and pushed it to hex.pm today, because I couldn't use git or an override. Hopefully this stuff will get fixed soon, but until then, hopefully this helps:

https://hex.pm/packages/amqp19

It uses an amqp_client package I also pushed today.

from amqp.

ono avatar ono commented on July 16, 2024 2

We have just merged #51 and now amqp supports OTP 19 ✌️

Please change the version of amqp to 0.2.0-pre.1 and run mix deps.update amqp && mix deps.get (you need to run mix deps.get to get rabbit_common).

I hope all are sorted now but let us know if you experience any issues.

from amqp.

iamd3vil avatar iamd3vil commented on July 16, 2024

This is actually fixed in jbrisbin/amqp_client#30

Including amqp_client from master does the job.

from amqp.

michaelklishin avatar michaelklishin commented on July 16, 2024

This is the same issue as rabbitmq/rabbitmq-server#860.

from amqp.

max-vogler avatar max-vogler commented on July 16, 2024

@zackehh: Same problem here. Both, linking to a branch and not being able to control the specific version made us choose a git commit hash instead. Maybe this helps you.

{:amqp_client, github: "jbrisbin/amqp_client", ref: "d50aec0", override: true},

from amqp.

whitfin avatar whitfin commented on July 16, 2024

@max-vogler it's more than that though; the repo could go away at any time :p

from amqp.

mendrugory avatar mendrugory commented on July 16, 2024

Hi guys,

In order to avoid that, I have cloned the repo, so now I use my own (cloned) repo until the Erlang compatibility is fixed. I am not going to delete it, so you can use it with no concerns.

from amqp.

Nezteb avatar Nezteb commented on July 16, 2024

I too was forced to fork both repos myself and put this in my deps:

defp deps do
  [
    {:rabbit_common, git: "https://github.com/Nezteb/rabbit_common.git", override: true},
    {:amqp_client, git: "https://github.com/Nezteb/amqp_client.git", override: true},
    {:amqp, "~> 0.1.4"},
  ]
end

Then everything works. Not ideal, but meh.

from amqp.

whitfin avatar whitfin commented on July 16, 2024

Even more annoying now, you can no longer put packages on Hex which have a Git dependency.

from amqp.

sotte avatar sotte commented on July 16, 2024

I also had this problem, but using the solution of @kelostrada (I think, can't find the project anymore) solved the problem for me. But it's not working anymore.

Trying out all the proposed ways I get the following errors.

Using the default suggested in the README {:amqp, "~> 0.1.4"},
I also get the syntax error befor: '/'

Using @kelostrada solution I get

src/rabbit_ct_client_helpers.erl:19: can't find include lib "common_test/include/ct.hrl"
Compiled src/amqp_connection_sup.erl
src/rabbit_ct_client_helpers.erl:65: undefined macro 'config/2'
src/rabbit_ct_client_helpers.erl:101: undefined macro 'config/2'
src/rabbit_ct_client_helpers.erl:61: function stop_channels_manager/1 undefined
src/rabbit_ct_client_helpers.erl:72: function open_conn/2 undefined
src/rabbit_ct_client_helpers.erl:76: function open_conn/2 undefined
Compiling src/rabbit_ct_client_helpers.erl failed:
src/rabbit_ct_client_helpers.erl:19: can't find include lib "common_test/include/ct.hrl"
src/rabbit_ct_client_helpers.erl:65: undefined macro 'config/2'
src/rabbit_ct_client_helpers.erl:101: undefined macro 'config/2'
src/rabbit_ct_client_helpers.erl:61: function stop_channels_manager/1 undefined
src/rabbit_ct_client_helpers.erl:72: function open_conn/2 undefined
src/rabbit_ct_client_helpers.erl:76: function open_conn/2 undefined
ERROR: compile failed while processing /home/stefan/prjs/rabbitmq_experiments/deps/amqp_client: rebar_abort

** (Mix) Could not compile dependency :amqp_client, "/home/stefan/.mix/rebar compile skip_deps=true deps_dir="/home/stefan/prjs/rabbitmq_experiments/_build/dev/lib"" command failed. You can recompile this dependency with "mix deps.compile amqp_client", update it with "mix deps.update amqp_client" or clean it with "mix deps.clean amqp_client"

Same for the solution of @max-vogler.

The solution of @Nezteb gives me:

src/rabbit_net.erl:27: can't find include lib "ssl/src/ssl_api.hrl"
...
Compiling src/rabbit_net.erl failed:
...

I'm using

Erlang/OTP 19 [erts-8.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Elixir 1.3.1

@pma it would be great if you can have a look.

from amqp.

pma avatar pma commented on July 16, 2024

@sotte You can override the two deps of amqp to point to versions compatible with Erlang 19:

defp deps do
    [{:amqp, "~> 0.1.4"},
     {:amqp_client, github: "jbrisbin/amqp_client", override: true},
     {:rabbit_common, github: "jbrisbin/rabbit_common", override: true}]
  end

This compiles in Erlang/OTP 19 [erts-8.1] with only some warnings about the random module being deprecated.

The SSL issue could be something else. You may have an incomplete Erlang/OTP installation and miss some SSL related lib.

from amqp.

sotte avatar sotte commented on July 16, 2024

@pma you're right. An OS update broke some erlang dependencies. After reinstalling erlang und using the deps you specified it seems to work again. Thanks!

from amqp.

blatyo avatar blatyo commented on July 16, 2024

BTW, in order to be able to push it, but have it be a drop in replacement, the package and app name are different. You can use it like so:

{:amqp, "~> 0.1", hex: :amqp19}

from amqp.

0x6e6562 avatar 0x6e6562 commented on July 16, 2024

Thanks @blatyo, this patch seems to fix the issue. I wonder if this is going to get ported back into master?

from amqp.

blatyo avatar blatyo commented on July 16, 2024

My fork is depending on forked version of other libraries as well. The RabbitMQ team has taken ownership of rabbit_common and amqp_client and will be releasing new versions in the future. They've releases a prerelease version so far. Once they go stable, I'll deprecate all of the forks I made. At that point, it should just be a matter of updating the library dependencies for this project.

from amqp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.