andrewMacmurray / phoenix-elm-scaffold

Mix Task to generate an elm app inside a Phoenix (1.3) app
https://hexdocs.pm/phoenix_elm_scaffold/Mix.Tasks.Phx.Gen.Elm.html
BSD 3-Clause "New" or "Revised" License
37 stars 7 forks source link

Mix.Phoenix.copy_from/5 is undefined #2

Closed rinosamakanata closed 7 years ago

rinosamakanata commented 7 years ago

With Phoenix 1.3.0 release, I got the error below:

:~/Projects/myapp $ mix phx.gen.elm
adding phoenix files 🕊 🔥
** (UndefinedFunctionError) function Mix.Phoenix.copy_from/5 is undefined or private. Did you mean one of:

      * copy_from/4

    Mix.Phoenix.copy_from([:elm_gen], "priv/templates/phx.gen.elm", "", [app_name: "myapp"], [{:eex, "views/elm_view.ex", "lib/myapp_web/views/elm_view.ex"}, {:eex, "controllers/elm_controller.ex", "lib/myapp_web/controllers/elm_controller.ex"}, {:text, "templates/elm/index.html.eex", "lib/myapp_web/templates/elm/index.html.eex"}])
    lib/mix/tasks/phx.gen.elm.ex:63: Mix.Tasks.Phx.Gen.Elm.run/1
    (mix) lib/mix/task.ex:301: Mix.Task.run_task/3
    (mix) lib/mix/cli.ex:75: Mix.CLI.run_task/2
    (elixir) lib/code.ex:376: Code.require_file/2

It seemed Mix.Phoenix.copy_from/5 was changed at https://github.com/phoenixframework/phoenix/commit/1ae44057d87cdfb6f3e21a059aa6c215b85855b2#diff-6f294fe90ad39b7d221b28fa3a855d45

andrewMacmurray commented 7 years ago

@rinosamakanata thanks, they must have removed it in the 1.3 non rc version, feel free to make a pr 👍