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
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted”
Version...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










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