ariandanim
I try learn in Ecto Book Programming Ecto Build Database Apps in Elixir for Scalability and Performance 2019, but for the first time its showing error and warning like below :
warning: use Mix.Config is deprecated. Use the Config module instead
│
11 │ use Mix.Config
│ ~~~~~~~~~~~~~~
│
└─ config/config.exs:11
warning: Mix.Config.config/3 is deprecated. Use the Config module instead
│
32 │ config :music_db, :ecto_repos, [MusicDB.Repo]
│ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│
└─ config/config.exs:32
warning: Mix.Config.config/3 is deprecated. Use the Config module instead
│
34 │ config :music_db, MusicDB.Repo,
│ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│
└─ config/config.exs:34
warning: Mix.Config.import_config/1 is deprecated. Use the Config module instead
│
44 │ import_config "#{Mix.env}.exs"
│ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│
└─ config/config.exs:44
warning: use Mix.Config is deprecated. Use the Config module instead
│
9 │ use Mix.Config
│ ~~~~~~~~~~~~~~
│
└─ config/dev.exs:9
==> decimal
Compiling 4 files (.ex)
warning: using single-quoted strings to represent charlists is deprecated.
Use ~c"" if you indeed want a charlist or use "" instead.
You may run "mix format --migrate" to change all single-quoted
strings to use the ~c sigil and fix this warning.
│
1320 │ '0.' ++ :lists.duplicate(-diff, ?0) ++ list
│ ~
│
└─ lib/decimal.ex:1320:11
warning: using single-quoted strings to represent charlists is deprecated.
Use ~c"" if you indeed want a charlist or use "" instead.
You may run "mix format --migrate" to change all single-quoted
strings to use the ~c sigil and fix this warning.
│
1351 │ list = list ++ 'E'
│ ~
│
└─ lib/decimal.ex:1351:26
warning: using single-quoted strings to represent charlists is deprecated.
Use ~c"" if you indeed want a charlist or use "" instead.
You may run "mix format --migrate" to change all single-quoted
strings to use the ~c sigil and fix this warning.
│
1352 │ list = if exp >= 0, do: list ++ '+', else: list
│ ~
│
└─ lib/decimal.ex:1352:43
warning: using single-quoted strings to represent charlists is deprecated.
Use ~c"" if you indeed want a charlist or use "" instead.
You may run "mix format --migrate" to change all single-quoted
strings to use the ~c sigil and fix this warning.
│
1775 │ int = if int == [], do: '0', else: int
│ ~
│
└─ lib/decimal.ex:1775:31
warning: using single-quoted strings to represent charlists is deprecated.
Use ~c"" if you indeed want a charlist or use "" instead.
You may run "mix format --migrate" to change all single-quoted
strings to use the ~c sigil and fix this warning.
│
1776 │ exp = if exp == [], do: '0', else: exp
│ ~
│
└─ lib/decimal.ex:1776:31
Generated decimal app
==> jason
Compiling 10 files (.ex)
Generated jason app
==> ecto
Compiling 54 files (.ex)
warning: missing parentheses for expression following "do:" keyword. Parentheses are required to solve ambiguity inside keywords.
This error happens when you have function calls without parentheses inside keywords. For example:
function(arg, one: nested_call a, b, c)
function(arg, one: if expr, do: :this, else: :that)
In the examples above, we don't know if the arguments "b" and "c" apply to the function "function" or "nested_call". Or if the keywords "do" and "else" apply to the function "function" or "if". You can solve this by explicitly adding parentheses:
function(arg, one: if(expr, do: :this, else: :that))
function(arg, one: nested_call(a, b, c))
Ambiguity found at:
│
2640 │ raise ArgumentError, "cannot add constraint to changeset because it does not have a source, got: #{inspect data}"
│ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│
└─ lib/ecto/changeset.ex:2640
warning: atom ::: must be written between quotes, as in :"::", to avoid ambiguity
│
203 │ {:::, _, [left, _]} -> is_integer(left) or is_binary(left)
│ ~
│
└─ lib/ecto/query/builder.ex:203:8
warning: unknown compiler variable "__" (expected one of __MODULE__, __ENV__, __DIR__, __CALLER__, __STACKTRACE__)
│
853 │ def quoted_type({:datetime_add, _, [_, _, __]}, _vars), do: :naive_datetime
│ ~~
│
└─ lib/ecto/query/builder.ex:853:45: Ecto.Query.Builder.quoted_type/2
warning: unknown compiler variable "__" (expected one of __MODULE__, __ENV__, __DIR__, __CALLER__, __STACKTRACE__)
│
854 │ def quoted_type({:date_add, _, [_, _, __]}, _vars), do: :date
│ ~~
│
└─ lib/ecto/query/builder.ex:854:41: Ecto.Query.Builder.quoted_type/2
warning: missing parentheses for expression following "do:" keyword. Parentheses are required to solve ambiguity inside keywords.
This error happens when you have function calls without parentheses inside keywords. For example:
function(arg, one: nested_call a, b, c)
function(arg, one: if expr, do: :this, else: :that)
In the examples above, we don't know if the arguments "b" and "c" apply to the function "function" or "nested_call". Or if the keywords "do" and "else" apply to the function "function" or "if". You can solve this by explicitly adding parentheses:
function(arg, one: if(expr, do: :this, else: :that))
function(arg, one: nested_call(a, b, c))
Ambiguity found at:
│
520 │ do: raise ArgumentError, "a changeset with action #{inspect given} was given to #{inspect repo}.#{action}/2"
│ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│
└─ lib/ecto/repo/schema.ex:520
== Compilation error in file lib/ecto/query.ex ==
** (Kernel.TypespecError) lib/ecto/query.ex:400: type dynamic/0 is a built-in type and it cannot be redefined
(elixir 1.18.3) lib/kernel/typespec.ex:980: Kernel.Typespec.compile_error/2
(stdlib 6.2.2) lists.erl:2151: :lists.foldl_1/3
(elixir 1.18.3) lib/kernel/typespec.ex:226: Kernel.Typespec.translate_typespecs_for_module/2
could not compile dependency :ecto, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile ecto --force", update it with "mix deps.update ecto" or clean it with "mix deps.clean ecto"
I had make steps:
- mix ecto.setup
- mix compile
- mix deps.clean ecto
- mix deps.get
- mix deps.compile ecto
but still not working and showing error like above
Trending in Questions
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
Anyone here using Honeybadger?
My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of
Bandit.HTTPError...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 1- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
ariandanim
I am sorry, i have solved it
I just update my Dependency
mix deps.update --allthen
mix deps.compile ectoNow solved