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

Compatibility with gen_stage v0.14+ #4

Open
xward opened this issue Apr 29, 2019 · 5 comments
Open

Compatibility with gen_stage v0.14+ #4

xward opened this issue Apr 29, 2019 · 5 comments

Comments

@xward
Copy link
Contributor

xward commented Apr 29, 2019

In most of my recent project, I can't use conduit_sqs since it is using gen_stage v0.14+ and conduit forbid it using v0.13.1.

Any plan to upgrade ? Thx !

@blatyo
Copy link
Member

blatyo commented Apr 29, 2019

Sure, send a PR that adds or ~> 0.14.0 to the requirements. I'm assuming there were no backwards incompatible changes between the versions?

@xward
Copy link
Contributor Author

xward commented Apr 30, 2019

Actually that was my plan first, but then when you run tests you have:

warning: conflicting behaviours found. function terminate/2 is required by GenStage and GenStage (in module ConduitSQS.Poller)
  lib/conduit_sqs/poller.ex:1

warning: conflicting behaviours found. function init/1 is required by GenStage and GenStage (in module ConduitSQS.Poller)
  lib/conduit_sqs/poller.ex:1

warning: conflicting behaviours found. function handle_subscribe/4 is required by GenStage and GenStage (in module ConduitSQS.Poller)
  lib/conduit_sqs/poller.ex:1

warning: conflicting behaviours found. function handle_info/2 is required by GenStage and GenStage (in module ConduitSQS.Poller)
  lib/conduit_sqs/poller.ex:1

warning: conflicting behaviours found. function handle_events/3 is required by GenStage and GenStage (in module ConduitSQS.Poller)
  lib/conduit_sqs/poller.ex:1

warning: conflicting behaviours found. function handle_demand/2 is required by GenStage and GenStage (in module ConduitSQS.Poller)
  lib/conduit_sqs/poller.ex:1

warning: conflicting behaviours found. function handle_cast/2 is required by GenStage and GenStage (in module ConduitSQS.Poller)
  lib/conduit_sqs/poller.ex:1

warning: conflicting behaviours found. function handle_cancel/3 is required by GenStage and GenStage (in module ConduitSQS.Poller)
  lib/conduit_sqs/poller.ex:1

warning: conflicting behaviours found. function handle_call/3 is required by GenStage and GenStage (in module ConduitSQS.Poller)
  lib/conduit_sqs/poller.ex:1

warning: conflicting behaviours found. function format_status/2 is required by GenStage and GenStage (in module ConduitSQS.Poller)
  lib/conduit_sqs/poller.ex:1

warning: conflicting behaviours found. function code_change/3 is required by GenStage and GenStage (in module ConduitSQS.Poller)
  lib/conduit_sqs/poller.ex:1

warning: conflicting behaviours found. function terminate/2 is required by GenStage and GenStage (in module ConduitSQS.Worker)
  lib/conduit_sqs/worker.ex:1

warning: conflicting behaviours found. function init/1 is required by GenStage and GenStage (in module ConduitSQS.Worker)
  lib/conduit_sqs/worker.ex:1

warning: conflicting behaviours found. function handle_subscribe/4 is required by GenStage and GenStage (in module ConduitSQS.Worker)
  lib/conduit_sqs/worker.ex:1

warning: conflicting behaviours found. function handle_info/2 is required by GenStage and GenStage (in module ConduitSQS.Worker)
  lib/conduit_sqs/worker.ex:1

warning: conflicting behaviours found. function handle_events/3 is required by GenStage and GenStage (in module ConduitSQS.Worker)
  lib/conduit_sqs/worker.ex:1

warning: conflicting behaviours found. function handle_demand/2 is required by GenStage and GenStage (in module ConduitSQS.Worker)
  lib/conduit_sqs/worker.ex:1

warning: conflicting behaviours found. function handle_cast/2 is required by GenStage and GenStage (in module ConduitSQS.Worker)
  lib/conduit_sqs/worker.ex:1

warning: conflicting behaviours found. function handle_cancel/3 is required by GenStage and GenStage (in module ConduitSQS.Worker)
  lib/conduit_sqs/worker.ex:1

warning: conflicting behaviours found. function handle_call/3 is required by GenStage and GenStage (in module ConduitSQS.Worker)
  lib/conduit_sqs/worker.ex:1

warning: conflicting behaviours found. function format_status/2 is required by GenStage and GenStage (in module ConduitSQS.Worker)
  lib/conduit_sqs/worker.ex:1

warning: conflicting behaviours found. function code_change/3 is required by GenStage and GenStage (in module ConduitSQS.Worker)
  lib/conduit_sqs/worker.ex:1

So it would go depper than that.

@blatyo
Copy link
Member

blatyo commented Apr 30, 2019

Looks like use GenStage starting setting @behaviour GenStage. If you want to submit a PR that removes the @behaviour from both of those modules, it seems like it would fix that.

@xward
Copy link
Contributor Author

xward commented Apr 30, 2019

Yep indeed, (cf PR: #5).
But other warning appear if you still works with gen_stage v0.13+, like:

warning: got "@impl true" for function init/1 but no behaviour was declared
  lib/conduit_sqs/poller.ex:41

warning: got "@impl true" for function handle_demand/2 but no behaviour was declared
  lib/conduit_sqs/poller.ex:60

warning: got "@impl true" for function handle_info/2 but no behaviour was declared
  lib/conduit_sqs/poller.ex:74

warning: got "@impl true" for function init/1 but no behaviour was declared
  lib/conduit_sqs/worker.ex:31

warning: got "@impl true" for function handle_events/3 but no behaviour was declared
  lib/conduit_sqs/worker.ex:56

warning: got "@impl true" for function handle_info/2 but no behaviour was declared
  lib/conduit_sqs/worker.ex:65

Thus I've put:
{:gen_stage, "~> 0.14.0"},

@blatyo
Copy link
Member

blatyo commented May 1, 2019

v0.3.0 has your changes in it

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