diff --git a/.dialyzer_ignore.exs b/.dialyzer_ignore.exs index 09650548..e15f6c80 100644 --- a/.dialyzer_ignore.exs +++ b/.dialyzer_ignore.exs @@ -1,3 +1,4 @@ [ - {"lib/next_ls/lsp_supervisor.ex", :exact_eq} + {"lib/next_ls/lsp_supervisor.ex", :exact_eq}, + {"lib/next_ls/runtime.ex", :exact_eq} ] diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 780a09f9..cbf6525d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -44,7 +44,7 @@ jobs: run: rm -rf tmp - name: Run Tests - run: mix test + run: elixir --erl '-kernel prevent_overlapping_partitions false' -S mix test formatter: runs-on: ubuntu-latest diff --git a/lib/next_ls/runtime.ex b/lib/next_ls/runtime.ex index d38cdc33..c71065f5 100644 --- a/lib/next_ls/runtime.ex +++ b/lib/next_ls/runtime.ex @@ -2,6 +2,8 @@ defmodule NextLS.Runtime do @moduledoc false use GenServer + @env Mix.env() + def start_link(opts) do GenServer.start_link(__MODULE__, opts) end @@ -91,18 +93,24 @@ defmodule NextLS.Runtime do {~c"RELEASE_SYS_CONFIG", false}, {~c"PATH", String.to_charlist(new_path)} ], - args: [ - System.find_executable("elixir"), - "--no-halt", - "--sname", - sname, - "--cookie", - Node.get_cookie(), - "-S", - "mix", - "loadpaths", - "--no-compile" - ] + args: + [System.find_executable("elixir")] ++ + if @env == :test do + ["--erl", "-kernel prevent_overlapping_partitions false"] + else + [] + end ++ + [ + "--no-halt", + "--sname", + sname, + "--cookie", + Node.get_cookie(), + "-S", + "mix", + "loadpaths", + "--no-compile" + ] ] )