Skip to content

Instantly share code, notes, and snippets.

@andywenk
Created November 30, 2016 20:43
Show Gist options
  • Save andywenk/06c3419c031ff029fe930e9b4ca57a84 to your computer and use it in GitHub Desktop.
Save andywenk/06c3419c031ff029fe930e9b4ca57a84 to your computer and use it in GitHub Desktop.
trying to update phoenix_ecto
Generated ecto app
==> phoenix_ecto
Compiling 4 files (.ex)
== Compilation error on file lib/phoenix_ecto/html.ex ==
** (KeyError) key :model not found in: %Phoenix.HTML.Form{data: nil, errors: {:form_for_errors, [line: 12], [{{:., [line: 12], [{:changeset, [line: 12], nil}, :errors]}, [line: 12], []}]}, hidden: [], id: {:name, [line: 10], nil}, impl: Phoenix.HTML.FormData.Ecto.Changeset, index: nil, name: {:name, [line: 11], nil}, options: [], params: %{}, source: {:changeset, [line: 8], nil}}
(stdlib) :maps.update(:model, {:model, [line: 13], nil}, %Phoenix.HTML.Form{data: nil, errors: {:form_for_errors, [line: 12], [{{:., [line: 12], [{:changeset, [line: 12], nil}, :errors]}, [line: 12], []}]}, hidden: [], id: {:name, [line: 10], nil}, impl: Phoenix.HTML.FormData.Ecto.Changeset, index: nil, name: {:name, [line: 11], nil}, options: [], params: %{}, source: {:changeset, [line: 8], nil}})
lib/phoenix_html/form.ex:170: anonymous fn/2 in Phoenix.HTML.Form.__struct__/1
(elixir) lib/enum.ex:1623: Enum."-reduce/3-lists^foldl/2-0-"/3
expanding struct: Phoenix.HTML.Form.__struct__/1
lib/phoenix_ecto/html.ex:7: Phoenix.HTML.FormData.Ecto.Changeset.to_form/2
could not compile dependency :phoenix_ecto, "mix compile" failed. You can recompile this dependency with "mix deps.compile phoenix_ecto", update it with "mix deps.update phoenix_ecto" or clean it with "mix deps.clean phoenix_ecto"
mix deps.update phoenix_ect ⏎
Running dependency resolution
Dependency resolution completed
connection: 1.0.4
cowboy: 1.0.4
cowlib: 1.0.2
db_connection: 1.1.0
decimal: 1.3.1
ecto: 1.1.9
mime: 1.0.1
phoenix_ecto: 2.0.1
phoenix_html: 2.6.2
plug: 1.3.0
poison: 1.5.2
poolboy: 1.5.1
postgrex: 0.11.2
ranch: 1.2.1
* Updating phoenix_ecto (Hex package)
Checking package (https://repo.hex.pm/tarballs/phoenix_ecto-2.0.1.tar)
Fetched package
* Updating postgrex (Hex package)
Checking package (https://repo.hex.pm/tarballs/postgrex-0.11.2.tar)
Fetched package
* Updating phoenix_html (Hex package)
Checking package (https://repo.hex.pm/tarballs/phoenix_html-2.6.2.tar)
Fetched package
* Updating ecto (Hex package)
Checking package (https://repo.hex.pm/tarballs/ecto-1.1.9.tar)
Fetched package
mix deps.update phoenix_ecto
Running dependency resolution
Dependency resolution completed
connection: 1.0.4
cowboy: 1.0.4
cowlib: 1.0.2
db_connection: 1.1.0
decimal: 1.3.1
ecto: 1.1.9
mime: 1.0.1
phoenix_ecto: 2.0.1
phoenix_html: 2.6.2
plug: 1.3.0
poison: 1.5.2
poolboy: 1.5.1
postgrex: 0.11.2
ranch: 1.2.1
mix deps.compile phoenix_ecto
==> phoenix_ecto
Compiling 4 files (.ex)
== Compilation error on file lib/phoenix_ecto/html.ex ==
** (KeyError) key :model not found in: %Phoenix.HTML.Form{data: nil, errors: {{:., [line: 12], [{:changeset, [line: 12], nil}, :errors]}, [line: 12], []}, hidden: [], id: {:name, [line: 10], nil}, impl: Phoenix.HTML.FormData.Ecto.Changeset, index: nil, name: {:name, [line: 11], nil}, options: [], params: %{}, source: {:changeset, [line: 8], nil}}
(stdlib) :maps.update(:model, {:model, [line: 13], nil}, %Phoenix.HTML.Form{data: nil, errors: {{:., [line: 12], [{:changeset, [line: 12], nil}, :errors]}, [line: 12], []}, hidden: [], id: {:name, [line: 10], nil}, impl: Phoenix.HTML.FormData.Ecto.Changeset, index: nil, name: {:name, [line: 11], nil}, options: [], params: %{}, source: {:changeset, [line: 8], nil}})
lib/phoenix_html/form.ex:170: anonymous fn/2 in Phoenix.HTML.Form.__struct__/1
(elixir) lib/enum.ex:1623: Enum."-reduce/3-lists^foldl/2-0-"/3
expanding struct: Phoenix.HTML.Form.__struct__/1
lib/phoenix_ecto/html.ex:7: Phoenix.HTML.FormData.Ecto.Changeset.to_form/2
could not compile dependency :phoenix_ecto, "mix compile" failed. You can recompile this dependency with "mix deps.compile phoenix_ecto", update it with "mix deps.update phoenix_ecto" or clean it with "mix deps.clean phoenix_ecto"
mix deps.clean phoenix_ecto ⏎
* Cleaning phoenix_ecto
mix deps.get ⏎
Running dependency resolution
* Getting phoenix_ecto (Hex package)
Checking package (https://repo.hex.pm/tarballs/phoenix_ecto-2.0.1.tar)
Using locally cached package
mix ecto.create
==> phoenix_html
Compiling 8 files (.ex)
Generated phoenix_html app
==> postgrex
Compiling 43 files (.ex)
warning: undefined behaviour function handle_deallocate/4 (for behaviour DBConnection)
lib/postgrex/protocol.ex:1
warning: undefined behaviour function handle_declare/4 (for behaviour DBConnection)
lib/postgrex/protocol.ex:1
warning: undefined behaviour function handle_first/4 (for behaviour DBConnection)
lib/postgrex/protocol.ex:1
warning: undefined behaviour function handle_next/4 (for behaviour DBConnection)
lib/postgrex/protocol.ex:1
Generated postgrex app
==> ecto
Compiling 73 files (.ex)
warning: random:seed/1: the 'random' module is deprecated; use the 'rand' module instead
lib/ecto/pools/sojourn_broker/worker.ex:48
warning: random:uniform/1: the 'random' module is deprecated; use the 'rand' module instead
lib/ecto/pools/sojourn_broker/worker.ex:241
warning: function :sbroker.ask/2 is undefined (module :sbroker is not available)
lib/ecto/pools/sojourn_broker.ex:75
warning: function :sbroker.async_ask_r/3 is undefined (module :sbroker is not available)
Found at 2 locations:
lib/ecto/pools/sojourn_broker/worker.ex:192
lib/ecto/pools/sojourn_broker/worker.ex:198
warning: function :sbroker.cancel/3 is undefined (module :sbroker is not available)
lib/ecto/pools/sojourn_broker/worker.ex:260
warning: function :sbroker.await/2 is undefined (module :sbroker is not available)
lib/ecto/pools/sojourn_broker/worker.ex:261
warning: function Ecto.Adapters.MySQL.Connection.all/1 is undefined (module Ecto.Adapters.MySQL.Connection is not available)
lib/ecto/adapters/mysql.ex:85
warning: function Ecto.Adapters.MySQL.Connection.delete/4 is undefined (module Ecto.Adapters.MySQL.Connection is not available)
lib/ecto/adapters/mysql.ex:85
warning: function Ecto.Adapters.MySQL.Connection.delete_all/1 is undefined (module Ecto.Adapters.MySQL.Connection is not available)
lib/ecto/adapters/mysql.ex:85
warning: function Ecto.Adapters.MySQL.Connection.execute_ddl/1 is undefined (module Ecto.Adapters.MySQL.Connection is not available)
lib/ecto/adapters/mysql.ex:85
warning: function Ecto.Adapters.MySQL.Connection.update/5 is undefined (module Ecto.Adapters.MySQL.Connection is not available)
lib/ecto/adapters/mysql.ex:85
warning: function Ecto.Adapters.MySQL.Connection.update_all/1 is undefined (module Ecto.Adapters.MySQL.Connection is not available)
lib/ecto/adapters/mysql.ex:85
warning: function Ecto.Adapters.MySQL.Connection.insert/4 is undefined (module Ecto.Adapters.MySQL.Connection is not available)
Found at 2 locations:
lib/ecto/adapters/mysql.ex:85
lib/ecto/adapters/mysql.ex:176
warning: function Ecto.Adapters.MySQL.Connection.to_constraints/1 is undefined (module Ecto.Adapters.MySQL.Connection is not available)
lib/ecto/adapters/mysql.ex:181
warning: function Ecto.Pools.Poolboy.Worker.behaviour_info/1 is undefined or private
lib/ecto/pools/poolboy/worker.ex:5
Generated ecto app
==> phoenix_ecto
Compiling 4 files (.ex)
warning: the variable "max" is unsafe as it has been set inside a case/cond/receive/if/&&/||. Please explicitly return the variable value instead. For example:
case int do
1 -> atom = :one
2 -> atom = :two
end
should be written as
atom =
case int do
1 -> :one
2 -> :two
end
Unsafe variable found at:
lib/phoenix_ecto/html.ex:182
warning: the variable "min" is unsafe as it has been set inside a case/cond/receive/if/&&/||. Please explicitly return the variable value instead. For example:
case int do
1 -> atom = :one
2 -> atom = :two
end
should be written as
atom =
case int do
1 -> :one
2 -> :two
end
Unsafe variable found at:
lib/phoenix_ecto/html.ex:193
Generated phoenix_ecto app
==> hello
Compiling 10 files (.ex)
== Compilation error on file web/router.ex ==
** (CompileError) web/router.ex: internal error in v3_core;
crash reason: {case_clause,
{'EXIT',
{badarg,
[{erl_anno,anno_info,[-1],[{file,"erl_anno.erl"},{line,360}]},
{v3_core,record_anno,2,[{file,"v3_core.erl"},{line,2410}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,539}]},
{v3_core,safe,2,[{file,"v3_core.erl"},{line,1593}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,528}]},
{v3_core,safe,2,[{file,"v3_core.erl"},{line,1593}]},
{v3_core,'-safe_list/2-anonymous-0-',2,
[{file,"v3_core.erl"},{line,1608}]},
{lists,foldr,3,[{file,"lists.erl"},{line,1276}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,538}]},
{v3_core,safe,2,[{file,"v3_core.erl"},{line,1593}]},
{v3_core,'-safe_list/2-anonymous-0-',2,
[{file,"v3_core.erl"},{line,1608}]},
{lists,foldr,3,[{file,"lists.erl"},{line,1276}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,538}]},
{v3_core,safe,2,[{file,"v3_core.erl"},{line,1593}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,528}]},
{v3_core,safe,2,[{file,"v3_core.erl"},{line,1593}]},
{v3_core,'-safe_list/2-anonymous-0-',2,
[{file,"v3_core.erl"},{line,1608}]},
{lists,foldr,3,[{file,"lists.erl"},{line,1276}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,652}]},
{v3_core,exprs,2,[{file,"v3_core.erl"},{line,512}]}]}}}
in function compile:'-select_passes/2-anonymous-2-'/2 (compile.erl, line 536)
in call from compile:'-internal_comp/4-anonymous-1-'/2 (compile.erl, line 321)
in call from compile:fold_comp/3 (compile.erl, line 347)
in call from compile:internal_comp/4 (compile.erl, line 331)
in call from compile:'-do_compile/2-anonymous-0-'/2 (compile.erl, line 179)
(stdlib) lists.erl:1338: :lists.foreach/2
(phoenix) expanding macro: Phoenix.Router.__before_compile__/1
web/router.ex:1: Hello.Router (module)
(elixir) lib/kernel/parallel_compiler.ex:117: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1
mix ecto.create 17.30s user 3.86s system 215% cpu 9.802 total
~/p/p/hello ❯❯❯ mix local.phoenix ⏎
Compiling 10 files (.ex)
== Compilation error on file web/router.ex ==
** (CompileError) web/router.ex: internal error in v3_core;
crash reason: {case_clause,
{'EXIT',
{badarg,
[{erl_anno,anno_info,[-1],[{file,"erl_anno.erl"},{line,360}]},
{v3_core,record_anno,2,[{file,"v3_core.erl"},{line,2410}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,539}]},
{v3_core,safe,2,[{file,"v3_core.erl"},{line,1593}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,528}]},
{v3_core,safe,2,[{file,"v3_core.erl"},{line,1593}]},
{v3_core,'-safe_list/2-anonymous-0-',2,
[{file,"v3_core.erl"},{line,1608}]},
{lists,foldr,3,[{file,"lists.erl"},{line,1276}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,538}]},
{v3_core,safe,2,[{file,"v3_core.erl"},{line,1593}]},
{v3_core,'-safe_list/2-anonymous-0-',2,
[{file,"v3_core.erl"},{line,1608}]},
{lists,foldr,3,[{file,"lists.erl"},{line,1276}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,538}]},
{v3_core,safe,2,[{file,"v3_core.erl"},{line,1593}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,528}]},
{v3_core,safe,2,[{file,"v3_core.erl"},{line,1593}]},
{v3_core,'-safe_list/2-anonymous-0-',2,
[{file,"v3_core.erl"},{line,1608}]},
{lists,foldr,3,[{file,"lists.erl"},{line,1276}]},
{v3_core,expr,2,[{file,"v3_core.erl"},{line,652}]},
{v3_core,exprs,2,[{file,"v3_core.erl"},{line,512}]}]}}}
in function compile:'-select_passes/2-anonymous-2-'/2 (compile.erl, line 536)
in call from compile:'-internal_comp/4-anonymous-1-'/2 (compile.erl, line 321)
in call from compile:fold_comp/3 (compile.erl, line 347)
in call from compile:internal_comp/4 (compile.erl, line 331)
in call from compile:'-do_compile/2-anonymous-0-'/2 (compile.erl, line 179)
(stdlib) lists.erl:1338: :lists.foreach/2
(phoenix) expanding macro: Phoenix.Router.__before_compile__/1
web/router.ex:1: Hello.Router (module)
(elixir) lib/kernel/parallel_compiler.ex:117: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment