Mix deps.update downgrades ecto_sql and telemetry

Hi there,

I just tried to upgrade my dependencies via mix deps.update --all. That lead to this message:

Downgraded:
  ecto_sql 3.0.5 => 3.0.0
  telemetry 0.3.0 => 0.2.0

I can’t figure out why ecto_sql and telemetry got dowgraded. mix deps.tree doesn’t say anything about it:

termitool
├── exldap ~> 0.6 (Hex package)
├── gettext >= 0.0.0 (Hex package)
├── cachex ~> 3.1 (Hex package)
│   ├── eternal ~> 1.2 (Hex package)
│   ├── jumper ~> 1.0 (Hex package)
│   ├── sleeplocks ~> 1.1 (Hex package)
│   └── unsafe ~> 1.0 (Hex package)
├── jason ~> 1.0 (Hex package)
│   └── decimal ~> 1.0 (Hex package)
├── porcelain ~> 2.0 (Hex package)
├── bcrypt_elixir ~> 1.0 (Hex package)
│   └── elixir_make ~> 0.4 (Hex package)
├── comeonin ~> 4.0 (Hex package)
│   └── bcrypt_elixir ~> 0.12.1 or ~> 1.0 (Hex package)
├── csv ~> 2.2.0 (Hex package)
│   └── parallel_stream ~> 1.0.4 (Hex package)
├── timex ~> 3.1 (Hex package)
│   ├── combine ~> 0.10 (Hex package)
│   ├── gettext ~> 0.10 (Hex package)
│   └── tzdata ~> 0.1.8 or ~> 0.5 (Hex package)
│       └── hackney ~> 1.0 (Hex package)
│           ├── certifi 2.5.1 (Hex package)
│           │   └── parse_trans ~>3.3 (Hex package)
│           ├── idna 6.0.0 (Hex package)
│           │   └── unicode_util_compat 0.4.1 (Hex package)
│           ├── metrics 1.0.1 (Hex package)
│           ├── mimerl ~>1.1 (Hex package)
│           └── ssl_verify_fun 1.1.4 (Hex package)
├── icalendar ~> 0.7 (Hex package)
│   └── timex ~> 3.4 (Hex package)
├── arc ~> 0.11 (Hex package)
│   ├── hackney ~> 1.0 (Hex package)
│   ├── poison ~> 2.2 or ~> 3.1 (Hex package)
│   └── sweet_xml ~> 0.6 (Hex package)
├── ex_phone_number ~> 0.1 (Hex package)
│   └── sweet_xml ~> 0.6.5 (Hex package)
├── arc_ecto ~> 0.11 (Hex package)
│   ├── arc ~> 0.11.0 (Hex package)
│   └── ecto ~> 2.1 or ~> 3.0 (Hex package)
│       ├── decimal ~> 1.6 (Hex package)
│       ├── jason ~> 1.0 (Hex package)
│       └── poison ~> 2.2 or ~> 3.0 (Hex package)
├── dataloader ~> 1.0.0 (Hex package)
│   └── ecto >= 0.0.0 (Hex package)
├── phoenix_pubsub ~> 1.0 (Hex package)
├── postgrex >= 0.0.0 (Hex package)
│   ├── connection ~> 1.0 (Hex package)
│   ├── db_connection ~> 2.0 (Hex package)
│   │   └── connection ~> 1.0.2 (Hex package)
│   ├── decimal ~> 1.5 (Hex package)
│   └── jason ~> 1.0 (Hex package)
├── ecto_sql ~> 3.0.0 (Hex package)
│   ├── db_connection ~> 2.0 (Hex package)
│   ├── ecto ~> 3.0.0 (Hex package)
│   ├── postgrex ~> 0.14.0 (Hex package)
│   └── telemetry ~> 0.2.0 (Hex package)
├── distillery ~> 2.0 (Hex package)
│   └── artificery ~> 0.2 (Hex package)
├── edeliver >= 1.6.0 (Hex package)
│   └── distillery ~> 2.0 (Hex package)
├── plug ~> 1.7 (Hex package)
│   ├── mime ~> 1.0 (Hex package)
│   └── plug_crypto ~> 1.0 (Hex package)
├── plug_cowboy ~> 2.0 (Hex package)
│   ├── cowboy ~> 2.5 (Hex package)
│   │   ├── cowlib ~> 2.7.0 (Hex package)
│   │   └── ranch ~> 1.7.1 (Hex package)
│   └── plug ~> 1.7 (Hex package)
├── phoenix ~> 1.4.0 (Hex package)
│   ├── jason ~> 1.0 (Hex package)
│   ├── phoenix_pubsub ~> 1.1 (Hex package)
│   ├── plug ~> 1.7 (Hex package)
│   └── plug_cowboy ~> 1.0 or ~> 2.0 (Hex package)
├── guardian ~> 1.0 (Hex package)
│   ├── jose ~> 1.8 (Hex package)
│   │   └── base64url ~> 0.0.1 (Hex package)
│   ├── phoenix ~> 1.3 (Hex package)
│   └── plug ~> 1.3.3 or ~> 1.4 (Hex package)
├── absinthe_plug ~> 1.4.6 (Hex package)
│   ├── absinthe ~> 1.4.11 (Hex package)
│   │   ├── dataloader ~> 1.0.0 (Hex package)
│   │   └── decimal ~> 1.0 (Hex package)
│   └── plug ~> 1.3.2 or ~> 1.4 (Hex package)
├── absinthe_phoenix ~> 1.4.3 (Hex package)
│   ├── absinthe ~> 1.4.0 (Hex package)
│   ├── absinthe_plug ~> 1.4.0 (Hex package)
│   ├── decimal ~> 1.0 (Hex package)
│   ├── phoenix ~> 1.2 (Hex package)
│   ├── phoenix_pubsub ~> 1.0 (Hex package)
│   └── poison ~> 2.0 or ~> 3.0 (Hex package)
├── bamboo ~> 1.2 (Hex package)
│   ├── hackney >= 1.13.0 (Hex package)
│   ├── plug ~> 1.0 (Hex package)
│   └── poison >= 1.5.0 (Hex package)
├── bamboo_smtp ~> 1.6.0 (Hex package)
│   ├── bamboo ~> 1.0 (Hex package)
│   └── gen_smtp ~> 0.12.0 (Hex package)
├── appsignal ~> 1.0 (Hex package)
│   ├── decorator ~> 1.2.3 (Hex package)
│   ├── hackney ~> 1.6 (Hex package)
│   ├── phoenix >= 1.2.0 (Hex package)
│   ├── plug >= 1.1.0 (Hex package)
│   └── poison >= 1.3.0 (Hex package)
└── phoenix_ecto ~> 4.0 (Hex package)
    ├── ecto ~> 3.0 (Hex package)
    └── plug ~> 1.0 (Hex package)

When I change the {:ecto_sql, "~> 3.0.0"} to {:ecto_sql, ">= 3.0.1"} it upgrades to ecto_sql to 3.0.1, when I change it to {:ecto_sql, ">= 3.0.5"} it upgrades ecto_sql to 3.0.5 and telemetry to 0.3.0:

  ecto_sql 3.0.0 => 3.0.5
  telemetry 0.2.0 => 0.3.0

Am I doing something wrong?

Best regards,
CK

1 Like

You are probably not doing anything wrong. The dependency resolution in Hex takes some shortcuts to avoid spending too much time which can lead to edge cases like this.

If you share your mix.exs and mix.lock from before updating your dependencies we can look into it and check if it is a bug.

I can :slight_smile:

I created a gist with both files: https://gist.github.com/ckruse/8d3ed8ce5e76598b9994f0a4ea95623e

I have a similar issue (Why does mix deps.update downgrades absinthe and nimble_parsec?).

Did you find the reason for your downgraded dependencies?