beam-community / stripity-stripe

An Elixir Library for Stripe
Other
965 stars 344 forks source link

Plug hard-required by `extra_applications` #836

Closed IslandUsurper closed 3 months ago

IslandUsurper commented 4 months ago

Existing Issue or Pull Request Verification

Package Version

2.17.3

Are you using the latest version?

Steps to Reproduce

Create a library that does not depend on Plug, but does depend on stripity_stripe. Create a mix task to do anything at all, but with @requirements ["app.start"]. Try to run the task.

Expected Result

The mix task completes successfully.

Actual Result

10:29:23.746 [notice] Application decimal exited: :stopped
** (MatchError) no match of right hand side value: {:error, {:plug, {'no such file or directory', 'plug.app'}}}
IslandUsurper commented 4 months ago

Prior art: #701 and #798. I believe the fix is to just remove :plug from the extra_applications in mix.exs. If Plug is present, it should be started automatically with other deps.

srevenant commented 4 months ago

Perhaps make a separate application for anything that requires :plug? It is a little odd that :plug is a required dependency. That makes it hard for umbrella apps. Basically runs an assertion that people ONLY use this app within a phoenix app (which just isn't the case).