yak(boundary-repo-as-sibling-boundary-web-repo-forbidden-tgrc): boundary: Repo as sibling boundary, web->Repo forbidden
This commit is contained in:
+14
-1
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user