Skip to content

Upgrade deps and fix all Elixir 1.19 compile errors/warnings#7

Merged
badubizzle merged 6 commits intomasterfrom
copilot/update-elixir-to-1-19
Mar 4, 2026
Merged

Upgrade deps and fix all Elixir 1.19 compile errors/warnings#7
badubizzle merged 6 commits intomasterfrom
copilot/update-elixir-to-1-19

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 4, 2026

The project was pinned to old dependency versions incompatible with Elixir 1.19, and the codebase had several errors and warnings introduced by Elixir 1.19's stricter type inference, protocol derivation rules, and removed/deprecated APIs.

Dependency updates (mix.exs + deleted mix.lock)

  • table_rex ~> 3.0.0~> 3.1 (removed patch-precision lock)
  • ecto_sql ~> 3.0~> 3.10
  • postgrex >= 0.0.0~> 0.17
  • jason ~> 1.2~> 1.4
  • libgraph ~> 0.7~> 0.13
  • libcluster ~> 3.2~> 3.3
  • credo ~> 1.5~> 1.7

Compile error fix

Elixir 1.19 raises ArgumentError when :__struct__ appears in @derive except/only lists — it is now an implicit field not subject to filtering:

# Before (error in 1.19)
@derive {Inspect, except: [:__struct__, :last_run, :handler]}
# After
@derive {Inspect, except: [:last_run, :handler]}

Type inference warnings (new in 1.19)

Elixir 1.19's type system flags struct updates where the variable isn't proven to be a struct at compile time. Fixed by adding pattern matches at binding sites:

# Before — type lost after Map.get/function call
task = Map.get(dag.tasks, task_id)
%DAGTask{task | status: status}

# After
%DAGTask{} = task = Map.get(dag.tasks, task_id)
%DAGTask{task | status: status}

Same pattern applied across dag.ex (update_graph/2, add_dependency/3, clear_failed_tasks_runs/1) and server.ex (multiple handle_* callbacks and start_workers/2). Function head patterns also tightened from %{status: status} to %DAG{status: status} = dag.

Other fixes

  • tracker.ex: handle_call/3 was returning {:noreply, state} (caller would hang forever) → {:reply, :ok, state}
  • file_store.ex: added missing @impl true on get_dag/2; silenced unused rescue variable e_
  • dag.ex: removed duplicate @status_init :init module attribute
  • server.ex: removed dead @registry DAGRegister attribute

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.hex.pm
    • Triggering command: /usr/bin/curl curl -sv --max-time 5 REDACTED t/erlang/27/lib/erlang ebin /bin/sh APP=common_test TESTROOT=/opt/er--norc update /bin/sh -c \ if test -f vsn.mk; theninfo/diameter_info.erl /otp_src_27.3/bootstrap/lib/erl_/opt/erlang/27/lib/erlang/lib/diameter-2.4.1/src/info /autoconf/config.sub ang/27/lib/erlan/opt/erlang/27/lib/erlang/erts-15.2.3/bin/erlexec strap/lib/wx//eb-noshell e /autoconf/config/opt/elixir/1.19.5/bin/../lib (dns block)
  • binaries2.erlang-solutions.com
    • Triggering command: /usr/bin/curl curl -fsSO REDACTED (dns block)
  • builds.hex.pm
    • Triggering command: /usr/bin/curl curl -sL --max-time 10 REDACTED -o /tmp/otp_test2.tar.gz k/_temp/ghcca-node/node/bin/git (dns block)
    • Triggering command: /usr/bin/curl curl -sv --max-time 10 REDACTED (dns block)
    • Triggering command: /opt/erlang/27/lib/erlang/erts-15.2.3/bin/inet_gethost 4 (dns block)
  • cdn.hex.pm
    • Triggering command: /usr/bin/getent getent hosts cdn.hex.pm /autoconf/config/opt/erlang/27/lib/erlang/lib/dialyzer-5.3.1/ebin -c src" /opt/erlang/27/lib/erlang/lib/co../ebin/ssl_session_cache_api.beam (dns block)
  • cloudflare-dns.com
    • Triggering command: /usr/bin/curl curl -sL --max-time 5 REDACTED -H accept: application/dns-json /usr/bin/installerl /usr/libexec/gccdirname e_tools//ebin/ob/opt/erlang/27/bin/erl e t.beam ../ebin/eto_erl -c 4004_mip.dia ..typer ypto-5.5.3/priv/escript e beam ../ebin/cdvbash hdlt_client.erl hdlt_logger.erl /bin/sh (dns block)
  • dns.google
    • Triggering command: /usr/bin/curl curl -sL --max-time 5 REDACTED /lib/erlang/lib/ssl-11.2.9/examples"; tar xf -)) /tmp/otp-build/orelease_spec /tmp/otp-build/otp_src_27.3/make/autoconf/config.sub /usr/bin/g++ e_tools//ebin/ru-noshell e /tmp/otp-build/o/opt/elixir/1.19.5/bin/../lib x86_�� otp_test_engine./opt/elixir/1.19.5/bin/../lib/elixir/ebin ypto-5.5.3/priv/-s tp_src_27.3/makeelixir ttpd_acceptor.erbash _test//ebin/ct_m--norc .sub tp_src_27.3/makelocal.hex (dns block)
  • hex.pm
    • Triggering command: /usr/bin/curl curl -s --max-time 5 REDACTED untu4.6_amd64.deb (dns block)
    • Triggering command: /usr/bin/getent getent hosts hex.pm tp_src_27.3/make644 gnu h_connect.hrl ss../ebin/dialyzer.beam 644 (dns block)
  • hexdocs.pm
    • Triggering command: /usr/bin/curl curl -sv --max-time 5 REDACTED -c -d "/opt/erlang/27/lib/erlang/lib/edoc-1.3.2/priv" rm /autoconf/config.sub /tmp/otp-build/obash ebin/snmpc_mib_t--norc /usr/bin/mkdir transport.erl transport/diamete -c ver_defs.hrl crashdump_viewer.hrl etop_defs.hrl "/opt/erlang/27/lib/erlang/lib/observer-2.17/srcbash /opt/erlang/27/lib/erlang/lib/inets-9.3.2/ebin tp_src_27.3/make/autoconf/config.sub 3/src" /ebin/xmerl_rege4 /usr/bin/find tp_src_27.3/make/autoconf/config.sub (dns block)
  • https://api.github.com/
    • Triggering command: /usr/bin/curl curl -s --max-time 5 -I REDACTED (http block)
  • https://api.github.com/repos/elixir-lang/elixir/releases
    • Triggering command: /usr/bin/curl curl -s --max-time 10 REDACTED (http block)
  • packages.erlang-solutions.com
    • Triggering command: /usr/bin/wget wget -q --timeout=5 REDACTED -O /tmp/esl.asc (dns block)
    • Triggering command: /usr/bin/wget wget -q -O /usr/share/keyrings/erlang-solutions.asc REDACTED (dns block)
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)
  • registry.hex.pm
    • Triggering command: /usr/bin/curl curl -sv --max-time 5 REDACTED t/erlang/27/lib/erlang/releases/27" ; \ if test ! -f "/opt/erlang/27/lib/erlang/releases/27/inerl_child_setup /tmp/otp-build/o/opt/erlang/27/lib/erlang/erts-15.2.3/include/internal/gcc /usr/bin/make rlang/27/lib/erlbash strap/lib/wx//eb--norc ib/erlang/lib/ed--noprofile make rele�� /src" ples /usr/bin/sed g/releases/27/in/usr/bin/git strap/lib/wx//eb--git-dir=.git e sed (dns block)
  • repo.hex.pm
    • Triggering command: /usr/lib/erlang/erts-13.2.2.5/bin/inet_gethost 4 (dns block)
    • Triggering command: /opt/erlang/27/lib/erlang/erts-15.2.3/bin/inet_gethost 4 (dns block)
    • Triggering command: /usr/bin/curl curl -sv --max-time 5 REDACTED t/erlang/27/lib/erlang/releases/27" ; \ if test ! -f "/opt/erlang/27/lib/erlang/releases/27/inbash /opt/erlang/27/lib/erlang/lib/common_test-1.27.7../ebin/int.beam (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: badubizzle <1519511+badubizzle@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Elixir to version 1.19 in project and CI Update Elixir to 1.19 Mar 4, 2026
Co-authored-by: badubizzle <1519511+badubizzle@users.noreply.github.com>
Copilot AI changed the title Update Elixir to 1.19 ci: upgrade deprecated actions/cache and actions/checkout from v2 to v4 Mar 4, 2026
Co-authored-by: badubizzle <1519511+badubizzle@users.noreply.github.com>
Copilot AI changed the title ci: upgrade deprecated actions/cache and actions/checkout from v2 to v4 ci: fix OTP install failure by upgrading deprecated GitHub Actions Mar 4, 2026
Copilot AI and others added 2 commits March 4, 2026 04:29
Co-authored-by: badubizzle <1519511+badubizzle@users.noreply.github.com>
Co-authored-by: badubizzle <1519511+badubizzle@users.noreply.github.com>
Copilot AI changed the title ci: fix OTP install failure by upgrading deprecated GitHub Actions Upgrade deps and fix all Elixir 1.19 compile errors/warnings Mar 4, 2026
@badubizzle badubizzle marked this pull request as ready for review March 4, 2026 04:46
@badubizzle badubizzle merged commit 54d33ed into master Mar 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants