Closed mcelaney closed 4 years ago
Dropping to Elixir 1.10.2 to run the task and then back to elixir 1.10.4 got me past it...
@mcelaney I wasn't able to recreate the issue locally, but I wonder if somehow a version of phoenix <1.5.2 has gotten into your path. This PR (https://github.com/phoenixframework/phoenix/pull/3737) created the build/2
function your system appears to be missing and was released in phoenix 1.5.2. I'd be curious what the output of mix archives
is when using your elixir 1.10.4 and 1.10.2 installs.
I hope this helps and it's great to hear you were able to get past it.
Ah that let me see the problem... in 1.10.4 I had the phx_gen_auth-0.5.0 archive which was causing issues. I had loaded it while trying to run the tests on the library... was thinking of sending a PRs to add @spec statements and gettext for all the strings (which I ended up unfortunately bailing on due to time... but if there is interest I can circle back)
Removing that clears the issue.
Glad to hear this works! phx_gen_auth
isn't meant to be installed as an archive, so I'm not sure if that caused the issue. I'm going to close this issue, since it sounds like its fixed.
Regarding the specs and gettext PRs, phx_gen_auth needs to stay consistent with the rest of the phoenix generators. The generators don't use specs, so we won't be adding them here either. I'm less familiar with the thoughts behind adding gettext, but I noticed phx.gen.html doesn't use it. I'd suggest opening an issue in phoenix to see if they want to use gettext more in the generators, and if so, PRs would be welcome in both projects.
Yea - that's part of why I decided not to take the time. I'll probably maintain a fork that has it - takes a couple hours to lock it all down if you're a dialyxir enthusiast who does a lot of localized projects ;)
Elixir 1.10.4 Erlang/OTP 23 Phoenix 1.5.4
Installed Phoenix, credo, and dialyxir
Added
{:phx_gen_auth, "~> 0.5", only: [:dev], runtime: false}
to mix.exs... then ran in to the following exception.mix phx.gen.context Accounts User users name:string
works fine... so I'm not sure what's going on here...