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

Move Plug and Phoenix code into another lib. #216

Closed
vic opened this issue Oct 23, 2016 · 2 comments
Closed

Move Plug and Phoenix code into another lib. #216

vic opened this issue Oct 23, 2016 · 2 comments

Comments

@vic
Copy link
Contributor

vic commented Oct 23, 2016

Quoting the README file: Guardian remains a functional system. It integrates with Plug, but can be used outside of it.. However if the app does not depend on Plug nor Phoenix, a warning is emitted upon Guardian compilation:

=> guardian
warning: function Phoenix.Socket.assign/3 is undefined (module Phoenix.Socket is not available)
Found at 3 locations:
  lib/guardian/phoenix/socket.ex:71
  lib/guardian/phoenix/socket.ex:79
  lib/guardian/phoenix/socket.ex:87

One solution would be to move the Plug and Phoenix specific code from Guardian into another package, say guardian_plug. However, as I guess most people are using Guardian from inside a Phoenix app, I'm not sure if this is the right way to go. Also, moving the code out would require a major version change.

@doomspork
Copy link
Member

@vic while I agree a warning is not pretty but I'm not sure if it warrants a wholly separate library. @hassox do you have any thoughts?

@vic
Copy link
Contributor Author

vic commented Jan 15, 2017

Yep I know, just was used to having nicely clean builds, but now with elixir 1.4 almost any dep I have has some warning (regarding the ()) hopefully some day I'll have my eyes clean of warnings. :D cheers !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants