From b0778feae6b6d61048d29da22ff52ead4c09aeca Mon Sep 17 00:00:00 2001 From: Christian Koch Date: Mon, 22 Aug 2022 21:45:06 -0500 Subject: [PATCH] docs(update docs and comments) --- lib/ex_factor/traces.ex | 3 ++- mix.exs | 1 + support/trace_task.ex | 5 ++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/ex_factor/traces.ex b/lib/ex_factor/traces.ex index 9233353..6cce81f 100644 --- a/lib/ex_factor/traces.ex +++ b/lib/ex_factor/traces.ex @@ -1,6 +1,7 @@ defmodule ExFactor.Traces do def setup do - Code.compiler_options(debug_info: true, parser_options: [columns: true, token_metadata: true]) + Code.compiler_options(warnings_as_errors: false, debug_info: true, parser_options: [columns: true, token_metadata: true]) + ExFactor.Server = Code.ensure_loaded!(ExFactor.Server) ExFactor.Tracer = Code.ensure_loaded!(ExFactor.Tracer) diff --git a/mix.exs b/mix.exs index 99031a7..6a6f4e9 100644 --- a/mix.exs +++ b/mix.exs @@ -1,3 +1,4 @@ +# Compile Exfactor.Tracer so the compilation tracer is available when it's needed Code.compile_file("support/tracer.ex") defmodule ExFactor.MixProject do diff --git a/support/trace_task.ex b/support/trace_task.ex index 2c2e0d6..988ece0 100644 --- a/support/trace_task.ex +++ b/support/trace_task.ex @@ -1,6 +1,7 @@ defmodule Mix.Tasks.ExFactorRunner do @moduledoc """ - In order to run ExFactor on ExFactor, we need to make some files available "outside of" ExFactor, or more precisely along side of ExFactor. + In order to run ExFactor on ExFactor, we need to make some files available "outside of" + ExFactor, or more precisely along side of ExFactor. We need to have a process running during compilation that can run the `ExFactor.Server` Agent. Additionally we need the setup from `ExFactor.Traces`, we could replicate this here, but why @@ -14,8 +15,6 @@ defmodule Mix.Tasks.ExFactorRunner do Mix.raise("Elixir v1.13+ is required!") end - Code.compiler_options(debug_info: true, parser_options: [columns: true, token_metadata: true]) - Code.compile_file("./lib/ex_factor/server.ex", File.cwd!()) :timer.sleep(20)