Skip to content

Run/debug configs broken for Mix ExUnit on OTP 25 #3035

@leahgoldberg

Description

@leahgoldberg

Describe the bug
Since upgrading to OTP 25/Elixir 1.14, run/debug configurations no longer run in IntelliJ. They fail with the following error

** (BadArityError) #Function<0.82203088/3 in :elixir.eval_external_handler/1> with arity 3 called with 2 arguments ({Config, :config}, [:argon2_elixir, [parallelism: 2]])
    (stdlib 4.1.1) erl_eval.erl:689: :erl_eval.do_apply/6
    (stdlib 4.1.1) erl_eval.erl:123: :erl_eval.exprs/5
    (elixir 1.14.2) lib/code.ex:425: Code.validated_eval_string/3
    (elixir 1.14.2) lib/config.ex:288: Config.__eval__!/3
    (mix 1.14.2) lib/mix/tasks/loadconfig.ex:54: Mix.Tasks.Loadconfig.load_compile/1
    (mix 1.14.2) lib/mix/task.ex:421: anonymous fn/3 in Mix.Task.run_task/4

To Reproduce
Steps to reproduce the behavior:

  1. Install Elixir 1.14.2-otp-25 via asdf
  2. Use this as the project SDK
  3. Import apps as a Mix project, ensure Elixir 1.14.2-otp-25 is set as the module for each
  4. Try to run a mix test via the run/debug configuration

Expected behavior
Tests should run

Logs

** (BadArityError) #Function<0.82203088/3 in :elixir.eval_external_handler/1> with arity 3 called with 2 arguments ({Config, :config}, [:argon2_elixir, [parallelism: 2]])
    (stdlib 4.1.1) erl_eval.erl:689: :erl_eval.do_apply/6
    (stdlib 4.1.1) erl_eval.erl:123: :erl_eval.exprs/5
    (elixir 1.14.2) lib/code.ex:425: Code.validated_eval_string/3
    (elixir 1.14.2) lib/config.ex:288: Config.__eval__!/3
    (mix 1.14.2) lib/mix/tasks/loadconfig.ex:54: Mix.Tasks.Loadconfig.load_compile/1
    (mix 1.14.2) lib/mix/task.ex:421: anonymous fn/3 in Mix.Task.run_task/4

Desktop:

  • OS: macOS
  • Version: 13.1

Erlang:

  • Installer: asdf
  • Version: 25

Elixir:

  • Installer: asdf
  • Version: 1.14.2

Plugin:

  • Version: 14.0.0

IntelliJ:

  • Version: 2022.3.2

Additional context
This is not an issue with my local env since mix exunit tests run just fine in the terminal (whether it's iterm or the intelliJ terminal)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions