Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building Phoenix Live Dashboard fails for undefined ScoutApm.Instruments.EExEngine.compile/2 #118

Open
simedw opened this issue Jan 7, 2021 · 1 comment

Comments

@simedw
Copy link

simedw commented Jan 7, 2021

I have been using scout apm for a while now, and recently added phoenix live dashboard to one of my projects, however when compiling the dependencies from scratch (rm -rf _build && mix deps.compile) phoenix_live_dashboard gets compiled before scoutapm. This causes it to crash since it's trying to use ScoutApm.Instruments.EExEngine.compile which is not yet defined.

Here is the rough output

...
==> phoenix_live_dashboard
Compiling 36 files (.ex)

== Compilation error in file lib/phoenix/live_dashboard/layout_view.ex ==
** (UndefinedFunctionError) function ScoutApm.Instruments.EExEngine.compile/2 is undefined (module ScoutApm.Instruments.EExEngine is not available)
    ScoutApm.Instruments.EExEngine.compile("lib/phoenix/live_dashboard/templates/layout/dash.html.eex", "dash.html")
    (phoenix 1.5.7) lib/phoenix/template.ex:351: Phoenix.Template.compile/3
    (phoenix 1.5.7) lib/phoenix/template.ex:166: anonymous fn/4 in Phoenix.Template."MACRO-__before_compile__"/2
    (elixir 1.10.4) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3
    (phoenix 1.5.7) expanding macro: Phoenix.Template.__before_compile__/1
    lib/phoenix/live_dashboard/layout_view.ex:1: Phoenix.LiveDashboard.LayoutView (module)
could not compile dependency :phoenix_live_dashboard, "mix compile" failed. You can recompile this dependency with "mix deps.compile phoenix_live_dashboard", update it with "mix deps.update phoenix_live_dashboard" or clean it with "mix deps.clean phoenix_live_dashboard"

After a quick search I found that someone opened it as an issue on the Phoenix Live Dashboard repo, but it got closed: phoenixframework/phoenix_live_dashboard#60

@cschneid
Copy link
Contributor

cschneid commented Jan 7, 2021

Did either of the workarounds work for this? Either moving the order of deps around, or doing the custom compiler defmodule Mix.Tasks.Compile.ScoutAppTemplates do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants