yak(boundary-repo-as-sibling-boundary-web-repo-forbidden-tgrc): boundary: Repo as sibling boundary, web->Repo forbidden

This commit is contained in:
Willem van den Ende
2026-10-29 10:08:56 +00:00
parent 3ef38bc8fc
commit 13e3186f58
8 changed files with 163 additions and 1 deletions
+14 -1
View File
@@ -11,7 +11,7 @@ defmodule Firehose.MixProject do
aliases: aliases(),
deps: deps(),
test_coverage: test_coverage(),
compilers: [:phoenix_live_view] ++ Mix.compilers(),
compilers: extra_compilers(Mix.env()) ++ [:phoenix_live_view] ++ Mix.compilers(),
listeners: [Phoenix.CodeReloader]
]
end
@@ -44,6 +44,14 @@ defmodule Firehose.MixProject do
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# The boundary compiler must be listed *before* `:elixir`: it enforces by
# registering an `after_compiler(:elixir, ...)` callback, so a later position
# would look wired and report nothing. It stays out of `:prod` on boundary's
# own advice (a violation must not be able to fail a release build); `:dev`
# and `:test` are where code is written.
defp extra_compilers(env) when env in [:dev, :test], do: [:boundary]
defp extra_compilers(_), do: []
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
@@ -81,6 +89,11 @@ defmodule Firehose.MixProject do
{:microprints,
git: "https://gitea.apps.sustainabledelivery.com/QWAN/microprints-phoenix.git",
branch: "main"},
# Compile-time boundary enforcement (Firehose / FirehoseWeb / Firehose.Repo).
# Declared directly even though `ex_crap` already pulls it in transitively:
# dropping a test-only metric tool must not silently take the boundary
# compiler with it.
{:boundary, "~> 0.11", runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:ex_crap, "~> 0.1.1", only: [:dev, :test], runtime: false},
{:muex, "~> 0.12", only: [:dev, :test], runtime: false},