Upgrading elixir 1.9 broke circle ci deps compilatiion

I just upgraded elixir to 1.9 on circle ci and got this error on deps.get and compile step:
(on this part exactly - run: mix do deps.get, compile)

Generated benchee app
===> Compiling ranch
===> Compiling telemetry
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
** (Mix) Could not compile dependency :telemetry, "/home/circleci/.mix/rebar3 bare compile --paths="/home/circleci/haitracker-be/_build/test/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile telemetry", update it with "mix deps.update telemetry" or clean it with "mix deps.clean telemetry"
Exited with code 1

Tests were running successfully on ci before without any issues.

Any help or workaround how to solve this is really appreciated. thanks

1 Like

:wave:

Try clearing the cache, _build and deps in particular, it usually helps with that error.

I also used to get this error with elixir_ls, and deleting deps and _build before rebuilding worked there as well.

1 Like

I have tried but no luck

Can you run the command with this environment set so we can see the full stacktrace from rebar?

Is rebar up to date?

1 Like
#!/bin/bash -eo pipefail
mix do deps.get, compile DEBUG=1
Resolving Hex dependencies...
Dependency resolution completed:
Unchanged:
  artificery 0.4.1
  bamboo 1.2.0
  base64url 0.0.1
  bcrypt_elixir 2.0.2
  benchee 1.0.1
  benchee_csv 1.0.0
  bunt 0.2.0
  certifi 2.5.1
  combine 0.10.0
  comeonin 5.1.1
  connection 1.0.4
  cors_plug 2.0.0
  cowboy 2.6.3
  cowlib 2.7.3
  credo 0.10.2
  csv 2.3.1
  db_connection 2.1.0
  decimal 1.8.0
  deep_merge 1.0.0
  dialyxir 1.0.0-rc.6
  distillery 2.0.12
  earmark 1.3.2
  ecto 3.1.7
  ecto_sql 3.1.6
  edeliver 1.6.0
  elixir_make 0.5.2
  erlex 0.2.1
  ex_doc 0.20.2
  ex_machina 2.3.0
  faker 0.12.0
  file_system 0.2.6
  gettext 0.16.1
  guardian 1.2.1
  hackney 1.15.1
  idna 6.0.0
  jason 1.1.2
  jose 1.9.0
  logger_file_backend 0.0.10
  makeup 0.8.0
  makeup_elixir 0.13.0
  metrics 1.0.1
  mime 1.3.1
  mimerl 1.2.0
  mix_test_watch 0.9.0
  nimble_parsec 0.5.0
  parallel_stream 1.0.6
  parse_trans 3.3.0
  phoenix 1.4.3
  phoenix_ecto 4.0.0
  phoenix_html 2.13.2
  phoenix_live_reload 1.2.0
  phoenix_pubsub 1.1.2
  phoenix_swagger 0.8.1
  plug 1.8.0
  plug_cowboy 2.0.2
  plug_crypto 1.0.0
  poison 3.1.0
  postgrex 0.14.3
  ranch 1.7.1
  sendgrid 2.0.0
  sentry 7.0.6
  ssl_verify_fun 1.1.4
  telemetry 0.4.0
  temp 0.4.7
  tesla 1.2.1
  timex 3.5.0
  tzdata 0.5.20
  unicode_util_compat 0.4.1
==> temp
Compiling 3 files (.ex)
Generated temp app
==> faker
Compiling 68 files (.ex)
Generated faker app
===> Compiling parse_trans
==> logger_file_backend
Compiling 1 file (.ex)
warning: the GenEvent module is deprecated, see its documentation for alternatives
  lib/logger_file_backend.ex:5: LoggerFileBackend (module)

warning: GenEvent.__using__/1 is deprecated. Use one of the alternatives described in the documentation for the GenEvent module
  lib/logger_file_backend.ex:5

Generated logger_file_backend app
==> base64url (compile)
Compiled src/base64url.erl
===> Compiling mimerl
==> connection
Compiling 1 file (.ex)
Generated connection app
===> Compiling metrics
===> Compiling unicode_util_compat
===> Compiling idna
==> gettext
Compiling 1 file (.erl)
Compiling 20 files (.ex)
Generated gettext app
==> deep_merge
Compiling 2 files (.ex)
Generated deep_merge app
==> jose
Compiling 90 files (.erl)
Compiling 8 files (.ex)
Generated jose app
==> benchee
Compiling 39 files (.ex)
Generated benchee app
===> Compiling ranch
===> Compiling telemetry
===> Uncaught error in rebar_core. Run with DEBUG=1 to see stacktrace or consult rebar3.crashdump
===> When submitting a bug report, please include the output of `rebar3 report "your command"`
** (Mix) Could not compile dependency :telemetry, "/home/circleci/.mix/rebar3 bare compile --paths="/home/circleci/haitracker-be/_build/test/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile telemetry", update it with "mix deps.update telemetry" or clean it with "mix deps.clean telemetry"
Exited with code 1

There was cache issue. I had to forcefully build and it worked(and deleted _build and ssh folders by sshing to ci too)