scoutapp / scout_apm_elixir

ScoutAPM Elixir Agent. Supports Phoenix and other frameworks.
https://scoutapm.com
Other
36 stars 20 forks source link

`deftiming/2` triggers a compile error when running tests #55

Closed itsderek23 closed 6 years ago

itsderek23 commented 6 years ago

A user reports that while deftiming/2 works fine normally, it triggers an error when running tests:

== Compilation error in file lib/... ==
** (CompileError) lib/...ex:90: undefined function deftiming/2

The user is on the latest version of the agent and has:

import ScoutApm.Tracing

...at the top of the module.

@mitchellhenke - mind investigating?

mitchellhenke commented 6 years ago

I wasn't able to reproduce :(

I have the following, which compiles and the test passes:

defmodule Testing do
  import ScoutApm.Tracing

  deftiming add(a, b) do
    a + b
  end
end

defmodule Testing.TestingTest do
  test "add/2 adds numbers" do
    assert Testing.add(1,2) == 3
  end
end

I assume the module had more going on, but I'm not sure what would cause the compilation error.

itsderek23 commented 6 years ago

☝️ @jonzlin95 - can you think of anything else that isn't represented in the above example? We haven't been able to reproduce yet.

itsderek23 commented 6 years ago

User was't able to reproduce. Closing.

itsderek23 commented 6 years ago

Thx @mitchellhenke !