KronicDeth / intellij-elixir

Elixir plugin for JetBrain's IntelliJ Platform (including Rubymine)
Other
1.84k stars 154 forks source link

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

Open leahgoldberg opened 1 year ago

leahgoldberg commented 1 year ago

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:

Erlang:

Elixir:

Plugin:

IntelliJ:

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)

leahgoldberg commented 8 months ago

hello wanted to check in here and see if there's been any update! I'm still experiencing this issue on IntelliJ v2023.3.5 and plugin v17.0.0. thanks 🙏