alex9spiridonov

alex9spiridonov

I have a problem with compiling dependencies in my phoenix project.

defp deps do
    [
      # default phoenix deps
      {:phoenix, "~> 1.4.9"},
      {:phoenix_pubsub, "~> 1.1"},
      {:phoenix_ecto, "~> 4.0"},
      {:ecto_sql, "~> 3.1"},
      {:postgrex, ">= 0.0.0"},
      {:phoenix_html, "~> 2.11"},
      {:phoenix_live_reload, "~> 1.2", only: :dev},
      {:gettext, "~> 0.11"},
      {:jason, "~> 1.0"},
      {:plug_cowboy, "~> 2.0"},
      # deps for exometer
      {:elixometer, github: "pinterest/elixometer"},
      {:exometer_core, override: true},
      {:exometer, github: "PSPDFKit-labs/exometer", runtime: false}
    ]
  end

I have an error on compiling exometer.

mix deps.compile
===> Compiling setup
src/setup.erl:944: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace
src/setup.erl:1163: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace
src/setup.erl:1588: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace

===> Building escript...
===> Compiling bear
===> Compiling parse_trans
==> hut (compile)
Compiled src/hut.erl

11:06:45.120 [info]  Compiling file system watcher for Mac...

11:06:46.564 [info]  Done.
==> file_system
Compiling 7 files (.ex)
Generated file_system app
==> connection
Compiling 1 file (.ex)
Generated connection app
==> gettext
Compiling 1 file (.yrl)
Compiling 1 file (.erl)
Compiling 20 files (.ex)
Generated gettext app
===> Compiling ranch
===> Compiling telemetry
==> decimal
Compiling 1 file (.ex)
Generated decimal app
===> Compiling folsom
===> Compiling exometer_core
src/exometer_proc.erl:219: Warning: sys:get_debug/3: Deprecated function. Incorrectly documented and in fact only for internal use. Can often be replaced with sys:get_log/1.

===> Compiling exometer
===> Compiling src/exometer_app.erl failed
src/exometer_app.erl:none: undefined parse transform 'lager_transform'

==> little_phoenix
** (Mix) Could not compile dependency :exometer, "/Users/alex/.mix/rebar3 bare compile --paths "/Users/alex/Development/little_phoenix/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile exometer", update it with "mix deps.update exometer" or clean it with "mix deps.clean exometer"

But if I compile project in 2 steps:

  1. remove exometer and compile without it
mix deps.compile
===> Compiling setup
src/setup.erl:944: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace
src/setup.erl:1163: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace
src/setup.erl:1588: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace

===> Building escript...
===> Compiling bear
===> Compiling parse_trans
==> hut (compile)
Compiled src/hut.erl

11:18:44.667 [info]  Compiling file system watcher for Mac...

11:18:45.357 [info]  Done.
==> file_system
Compiling 7 files (.ex)
Generated file_system app
==> connection
Compiling 1 file (.ex)
Generated connection app
==> gettext
Compiling 1 file (.yrl)
Compiling 1 file (.erl)
Compiling 20 files (.ex)
Generated gettext app
===> Compiling ranch
===> Compiling telemetry
==> decimal
Compiling 1 file (.ex)
Generated decimal app
===> Compiling folsom
===> Compiling exometer_core
src/exometer_proc.erl:219: Warning: sys:get_debug/3: Deprecated function. Incorrectly documented and in fact only for internal use. Can often be replaced with sys:get_log/1.

==> jason
Compiling 8 files (.ex)
Generated jason app
===> Fetching rebar3_proper ({pkg,<<"rebar3_proper">>,<<"0.11.1">>})
===> Version cached at /Users/alex/.cache/rebar3/hex/default/packages/rebar3_proper-0.11.1.tar is up to date, reusing it
===> Compiling rebar3_proper
===> Compiling pobox
==> db_connection
Compiling 14 files (.ex)
Generated db_connection app
==> ecto
Compiling 54 files (.ex)
Generated ecto app
==> phoenix_pubsub
Compiling 13 files (.ex)
Generated phoenix_pubsub app
===> Compiling cowlib
===> Compiling cowboy
==> mime
Compiling 2 files (.ex)
Generated mime app
===> Compiling goldrush
===> Compiling lager
==> elixometer
Compiling 5 files (.ex)
Generated elixometer app
==> postgrex
Compiling 61 files (.ex)
Generated postgrex app
==> ecto_sql
Compiling 25 files (.ex)
Generated ecto_sql app
==> plug_crypto
Compiling 4 files (.ex)
Generated plug_crypto app
==> plug
Compiling 1 file (.erl)
Compiling 39 files (.ex)
warning: System.stacktrace/0 outside of rescue/catch clauses is deprecated. If you want to support only Elixir v1.7+, you must access __STACKTRACE__ inside a rescue/catch. If you want to support earlier Elixir versions, move System.stacktrace/0 inside a rescue/catch
  lib/plug/conn/wrapper_error.ex:23

Generated plug app
==> phoenix_html
Compiling 8 files (.ex)
Generated phoenix_html app
==> plug_cowboy
Compiling 6 files (.ex)
Generated plug_cowboy app
==> phoenix
Compiling 67 files (.ex)
Generated phoenix app
==> phoenix_live_reload
Compiling 4 files (.ex)
Generated phoenix_live_reload app
==> phoenix_ecto
Compiling 6 files (.ex)
Generated phoenix_ecto app
  1. add exometer and compile it
mix deps.compile
===> Compiling setup
===> Building escript...
===> Compiling bear
===> Compiling parse_trans
==> hut (compile)
===> Compiling ranch
===> Compiling telemetry
===> Compiling folsom
===> Compiling exometer_core
===> Compiling exometer
===> Compiling pobox
===> Compiling cowlib
===> Compiling cowboy
===> Compiling goldrush
===> Compiling lager

all is well

How can I change the compilation order?
I think I should compile a lager before of the exometer.

Deps compiled in the following order:

Mix.Dep.load_and_cache |> Enum.map(fn(x) -> IO.puts Map.get(x, :app) end)
setup
bear
parse_trans
hut
file_system
connection
gettext
ranch
telemetry
decimal
folsom
exometer_core
exometer
jason
pobox
db_connection
ecto
phoenix_pubsub
cowlib
cowboy
mime
goldrush
lager
elixometer
postgrex
ecto_sql
plug_crypto
plug
phoenix_html
plug_cowboy
phoenix
phoenix_live_reload
phoenix_ecto

Deps tree:

mix deps.tree
little_phoenix
├── gettext ~> 0.11 (Hex package)
├── exometer_core (Hex package) *override*
│   ├── folsom 0.8.7 (Hex package)
│   │   └── bear 0.8.7 (Hex package)
│   ├── hut 1.2.1 (Hex package)
│   ├── parse_trans 3.3.0 (Hex package)
│   └── setup 2.0.2 (Hex package)
├── exometer (https://github.com/PSPDFKit-labs/exometer.git)
│   └── exometer_core ~r/.*/ (git://github.com/PSPDFKit-labs/exometer_core.git) *override*
├── jason ~> 1.0 (Hex package)
│   └── decimal ~> 1.0 (Hex package)
├── phoenix_pubsub ~> 1.1 (Hex package)
├── elixometer (https://github.com/pinterest/elixometer.git)
│   ├── lager >= 3.2.1 (Hex package)
│   │   └── goldrush 0.1.9 (Hex package)
│   ├── exometer_core ~> 1.5 (Hex package)
│   └── pobox ~> 1.2 (Hex package)
├── postgrex >= 0.0.0 (Hex package)
│   ├── connection ~> 1.0 (Hex package)
│   ├── db_connection ~> 2.1 (Hex package)
│   │   └── connection ~> 1.0.2 (Hex package)
│   ├── decimal ~> 1.5 (Hex package)
│   └── jason ~> 1.0 (Hex package)
├── ecto_sql ~> 3.1 (Hex package)
│   ├── db_connection ~> 2.0 (Hex package)
│   ├── ecto ~> 3.1.0 (Hex package)
│   │   ├── decimal ~> 1.6 (Hex package)
│   │   └── jason ~> 1.0 (Hex package)
│   ├── postgrex ~> 0.14.0 or ~> 0.15.0 (Hex package)
│   └── telemetry ~> 0.4.0 (Hex package)
├── phoenix_html ~> 2.11 (Hex package)
│   └── plug ~> 1.5 (Hex package)
│       ├── mime ~> 1.0 (Hex package)
│       ├── plug_crypto ~> 1.0 (Hex package)
│       └── telemetry ~> 0.4 (Hex package)
├── plug_cowboy ~> 2.0 (Hex package)
│   ├── cowboy ~> 2.5 (Hex package)
│   │   ├── cowlib ~> 2.7.3 (Hex package)
│   │   └── ranch ~> 1.7.1 (Hex package)
│   └── plug ~> 1.7 (Hex package)
├── phoenix ~> 1.4.9 (Hex package)
│   ├── jason ~> 1.0 (Hex package)
│   ├── phoenix_pubsub ~> 1.1 (Hex package)
│   ├── plug ~> 1.8.1 or ~> 1.9 (Hex package)
│   ├── plug_cowboy ~> 1.0 or ~> 2.0 (Hex package)
│   └── telemetry ~> 0.4 (Hex package)
├── phoenix_live_reload ~> 1.2 (Hex package)
│   ├── file_system ~> 0.2.1 or ~> 0.3 (Hex package)
│   └── phoenix ~> 1.4 (Hex package)
└── phoenix_ecto ~> 4.0 (Hex package)
    ├── ecto ~> 3.0 (Hex package)
    ├── phoenix_html ~> 2.9 (Hex package)
    └── plug ~> 1.0 (Hex package)

Showing Posts 1 to 2

NobbZ

NobbZ

You can not alter the order of compilation, it is determined automatically and make sure that dependencies are compiled before their dependants. Sadly exometer uses lager but hasn’t specified it as a dependency. Please file a bug report on their repository.

alex9spiridonov

alex9spiridonov OP

Thank you for a good idea!
I made exometer fork, added a dependency. Everything works!

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews