Skip to content

Conversation

mitchellhenke
Copy link
Contributor

Need to figure something out for handling the case that Travis is running into

Closes #181

@mitchellhenke mitchellhenke requested a review from jeregrine July 5, 2017 18:51
@@ -124,4 +124,16 @@ defmodule Sentry.EventTest do
},
]} == event.stacktrace
end

test "transforms mix deps to map of modules" do
modify_env(:sentry, modules: Mix.Dep.cached())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I don't know how I like this because it will fail whenever the deps change.

docs/config.rst Outdated
@@ -97,6 +97,10 @@ Optional settings

Expects a list of modules that is used to distinguish among stacktrace frames that belong to your app and ones that are part of libraries or core Elixir. This is used to better display the significant part of stacktraces. The logic is greedy, so if your app's root module is ``MyApp`` and your setting is ``[MyApp]``, that module as well as any submodules like ``MyApp.Submodule`` would be considered part of your app. Defaults to ``[]``.

.. describe:: modules

Expects a map or a list of `%Mix.Dep{}` to report the loaded dependencies. To include all Mix dependencies, it can be set to `Mix.Dep.cached()`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need to say that it expects the modules to be in the same format as Mix.Dep.cached. I would almost prefer for us to call Mix.Dep.cached() at runtime to this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately cannot call Mix.Dep.cached at runtime as a deployed application may be running without Mix

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we do a macro instead?

Also we could match on the type that Mix.Dep.cached returns and transform it, if it doesn't match just pass through?

@mitchellhenke mitchellhenke merged commit 598e59b into master Jul 6, 2017
@mitchellhenke mitchellhenke deleted the modules branch July 6, 2017 14:51
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

Successfully merging this pull request may close these issues.

2 participants