stripity-stripe
stripity-stripe copied to clipboard
Compilation fails if `plug` isn't a dependency
If you don't have plug
as a dependency, stripity_stripe
will fail to compile because of Stripe.WebhookPlug
.
This sort of precludes Elixir apps that need to connect with Stripe but don't serve HTTP requests (e.g. CLIs, backend server apps, etc). It's an easy fix to add plug
but that's a large dependency that's unnecessary in the context of those apps.
A fix here would be to make the compilation of Stripe.WebhookPlug
conditional on the presence of plug
, which seems appropriate. That module is opt-in if you need it (and it's great, I've used it in other apps) but unnecessary to the larger context of Stripe API integration.
I created #701 to fix this
@snewcomer is there something I can do to get this merged in quicker?
@MikaAK Ya I was wondering why the tests weren't running. Mind rebasing with latest?
@snewcomer done!
@snewcomer is there anything else?
I just ran into this as well. I'm using stripity_stripe in a CLI app that doesn't have Plug installed.
@MikaAK your PR is still failing, and it does look like it's related to the PR. Compile warnings are treated as errors and you get a warning: https://github.com/beam-community/stripity_stripe/runs/5148451957?check_suite_focus=true
Got tripped up by this trying to use in a non-Phoenix app. #701 is closed but this issue is still open; any plans to resolve?
https://github.com/beam-community/stripity-stripe/pull/798/files @ehogberg-papa give a code review, this should fix the issue, please confirm.