From 368e96f8c3f7b7430ff1b00056741a0d9c795198 Mon Sep 17 00:00:00 2001 From: Graham McInitre Date: Thu, 16 Jul 2026 09:49:43 -0500 Subject: [PATCH] fix: remove towerops_nif from auto-compilers list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Mix.Tasks.Compile.ToweropsNif module is part of the project source and isn't on the code path when Mix first resolves compilers in a fresh build — causes 'could not be found' in CI. NIF compilation is handled by: - nix/shell.nix shellHook for dev (make -C c_src) - nix/build.nix preBuild for CI/prod (injects towerops-nif package .so) Run 'mix compile.towerops_nif' manually when changing C source in dev. --- mix.exs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index 05ff30af..93d80c69 100644 --- a/mix.exs +++ b/mix.exs @@ -10,7 +10,13 @@ defmodule Towerops.MixProject do start_permanent: Mix.env() == :prod, aliases: aliases(), deps: deps(), - compilers: [:towerops_nif, :phoenix_live_view] ++ Mix.compilers(), + # NIF compiled by `make -C c_src` in dev shell (nix/shell.nix) and + # pre-built by `towerops-nif` Nix package in CI/prod. Not an auto-compiler + # because Mix.Tasks.Compile.ToweropsNif is part of the project source and + # isn't available on the code path when Mix first resolves the compilers + # list in a fresh build. Run `mix compile.towerops_nif` manually when + # changing C source between `mix compile` runs in dev. + compilers: [:phoenix_live_view] ++ Mix.compilers(), prune_code_paths: false, listeners: [Phoenix.CodeReloader], dialyzer: dialyzer(),