Skip to content

Commit

Permalink
feat: replace deps.compile with deps.loadpaths
Browse files Browse the repository at this point in the history
deps.loadpaths will noop if the deps are already compiled, instead of
analyzing every Erlang app (which rebar3 seems to do).
  • Loading branch information
mhanberg committed Jun 6, 2023
1 parent 7737d4b commit 870a254
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions priv/monkey/_credo_language_server_private_compiler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ defmodule :_credo_language_server_private_compiler do
# keep stdout on this node
Process.group_leader(self(), Process.whereis(:user))

Mix.Task.run("deps.compile")
Mix.Task.run("compile")
# load the paths for deps and compile them
# will noop if they are already compiled
# The mix cli basically runs this before any mix task
# we have to rerun because we already ran a mix task
# (mix run), which called this, but we also passed
# --no-compile, so nothing was compiled, but the
# task was not re-enabled it seems
Mix.Task.rerun("deps.loadpaths")
Mix.Task.rerun("compile")

:ok
rescue
Expand Down

0 comments on commit 870a254

Please sign in to comment.