-
-
Notifications
You must be signed in to change notification settings - Fork 206
Modules #182
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
Modules #182
Conversation
test/event_test.exs
Outdated
@@ -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()) |
There was a problem hiding this comment.
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()`. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
Need to figure something out for handling the case that Travis is running into
Closes #181