ariandanim

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:

  1. mix ecto.setup
  2. mix compile
  3. mix deps.clean ecto
  4. mix deps.get
  5. mix deps.compile ecto

but still not working and showing error like above

Showing Posts 1 to 1

ariandanim

ariandanim OP

I am sorry, i have solved it
I just update my Dependency
mix deps.update --all
then
mix deps.compile ecto

Now solved

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
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
nseaSeb
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
kpanic
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
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
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
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
ryanwinchester
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 Top

JesseHerrick
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
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
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
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
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

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews