ueberauth / guardian

Elixir Authentication
MIT License
3.4k stars 381 forks source link

Does not build without Plug #676

Closed the-destro closed 3 years ago

the-destro commented 3 years ago

Plug is listed as an optional dependency and it seem like it is actually required. In an empty project with just the latest guardian in the mix.exs:

% mix deps.compile guardian
==> guardian
Compiling 25 files (.ex)

== Compilation error in file lib/guardian/plug/pipeline.ex ==
** (CompileError) lib/guardian/plug/pipeline.ex:109: module Plug.Conn is not loaded and could not be found
    (stdlib 3.15.1) lists.erl:1358: :lists.mapfoldl/3
    (stdlib 3.15.1) lists.erl:1359: :lists.mapfoldl/3
    (elixir 1.12.1) expanding macro: Kernel.if/2
could not compile dependency :guardian, "mix compile" failed. You can recompile this dependency with "mix deps.compile guardian", update it with "mix deps.update guardian" or clean it with "mix deps.clean guardian"

Adding plug to the project's mix.exs fixes it.

yordis commented 3 years ago

https://github.com/ueberauth/guardian/blob/a938e4918105f86ebd0f004d52d5644ab56ec410/lib/guardian/plug/pipeline.ex#L1

hhhhmmm is this still persisting?

Hanspagh commented 3 years ago

Please verify that you are using the newest version of guardian

yordis commented 3 years ago

@Hanspagh you fixed this one, https://github.com/ueberauth/guardian/commit/0b7aba1840bf2f8b75bc3a258463a3fba7f325de#diff-b54395a33e81f03a9ac67ed97c25a7e2775cc7e5c22121ef3b4a3d4649f0f72f

I will close it for now, @the-destro if the issue persists in the latest version, please reopen it