After rebasing on the latest changes on master, the Makefile/Dockerfile is broken with this error.
...
==> spandex_phoenix
Compiling 5 files (.ex)
== Compilation error in file lib/spandex_phoenix/instrumenter.ex ==
** (RuntimeError) You must configure a :tracer for :spandex_phoenix
lib/spandex_phoenix/instrumenter.ex:21: (module)
could not compile dependency :spandex_phoenix, "mix compile" failed. You can recompile this dependency with "mix deps.compile spandex_phoenix", update it with "mix deps.update spandex_phoenix" or clean it with "mix deps.clean spandex_phoenix"
The command '/bin/sh -c mix do deps.get, deps.compile' returned a non-zero code: 1
Makefile:55: recipe for target 'build' failed
make: *** [build] Error 1
elixir -version): Docker bitwalker/alpine-elixir-phoenix:latestmastercd dockermake startMakefile completes with success and docker containers start.
Makefile errors with spandex_phoenix error.
@zachdaniel Can you please assist here?
In your apps/block_scout_web/config/config.exs do you see
config :spandex_phoenix, tracer: BlockScoutWeb.Tracer
anywhere? If not, place that there and you should be good to go.
Seems it's because spandex_phoenix dependency needs BlockScoutWeb.Tracer module for compiling. But Dockerfile describes to compile dependencies first and copy all other files after that, so they are not available during compilation.
Worked when I added ADD . . here and removed all other ADD commands.
Interesting. Using those other ADD commands are an optimization to not require dep compilation when unrelated files change. Try adding ADD apps/block_scout_web/config ./apps/block_scout_web. I should see if I can't loosen this up on Spandex's side, but for now that ought to work.
Most helpful comment
Seems it's because
spandex_phoenixdependency needsBlockScoutWeb.Tracermodule for compiling. ButDockerfiledescribes to compile dependencies first and copy all other files after that, so they are not available during compilation.Worked when I added
ADD . .here and removed all otherADDcommands.