Skip to content

Commit

Permalink
Merge pull request #67 from Nezteb/master
Browse files Browse the repository at this point in the history
Update docs and error message
  • Loading branch information
sasa1977 authored Sep 25, 2024
2 parents 58bdcd4 + 01a8da6 commit 59af044
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ defmodule MySystem.MixProject do

def project do
[
compilers: [:boundary, :phoenix, :gettext] ++ Mix.compilers(),
compilers: [:boundary] ++ Mix.compilers(),
# ...
]
end
Expand Down
2 changes: 1 addition & 1 deletion demos/my_system/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule MySystem.MixProject do
version: "0.1.0",
elixir: "~> 1.10",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:boundary, :phoenix, :gettext] ++ Mix.compilers(),
compilers: [:boundary, :phoenix] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
deps: deps()
]
Expand Down
4 changes: 3 additions & 1 deletion lib/boundary/mix/tasks/compile/boundary.ex
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ defmodule Mix.Tasks.Compile.Boundary do
warning: forbidden reference to MySystemWeb
(references from MySystem to MySystemWeb are not allowed)
lib/my_system/user.ex:3
See https://hexdocs.pm/boundary/Mix.Tasks.Compile.Boundary.html for details.
```
Since the compiler emits warnings, `mix compile` will still succeed, and you can normally start
Expand Down Expand Up @@ -314,7 +315,8 @@ defmodule Mix.Tasks.Compile.Boundary do
"(references from #{inspect(error.from_boundary)} to #{inspect(error.to_boundary)} are not allowed)"
end

message = "forbidden reference to #{inspect(error.reference.to)}\n #{reason}"
docs_link = "See https://hexdocs.pm/boundary/Mix.Tasks.Compile.Boundary.html for details."
message = "forbidden reference to #{inspect(error.reference.to)}\n #{reason}\n #{docs_link}"

diagnostic(message, file: Path.relative_to_cwd(error.reference.file), position: error.reference.line)
end
Expand Down

0 comments on commit 59af044

Please sign in to comment.