Skip to content

Commit 94b37b5

Browse files
Merge pull request #464 from getsentry/sources-recompile
update documentation for compiling with source code
2 parents ca5999f + 157a42a commit 94b37b5

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ config :sentry,
232232

233233
Sentry's server supports showing the source code that caused an error, but depending on deployment, the source code for an application is not guaranteed to be available while it is running. To work around this, the Sentry library reads and stores the source code at compile time. This has some unfortunate implications. If a file is changed, and Sentry is not recompiled, it will still report old source code.
234234

235-
The best way to ensure source code is up to date is to recompile Sentry itself via `mix deps.compile sentry --force`. It's possible to create a Mix Task alias in `mix.exs` to do this. The example below allows one to run `mix sentry_recompile` which will compile any uncompiled or changed parts of the application, and then force recompilation of Sentry so it has the newest source:
235+
The best way to ensure source code is up to date is to recompile Sentry itself via `mix deps.compile sentry --force`. It's possible to create a Mix Task alias in `mix.exs` to do this. The example below allows one to run `mix sentry_recompile && mix compile` which will compile any uncompiled or changed parts of the application, and then force recompilation of Sentry so it has the newest source. The second `mix compile` is required due to Mix only invoking the same task once in an alias.
236236

237237
```elixir
238238
# mix.exs

lib/sentry/sources.ex

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ defmodule Sentry.Sources do
3636
### Source code storage
3737
3838
The file contents are saved when Sentry is compiled, which can cause some
39-
complications. If a file is changed, and Sentry is not recompiled,
39+
complications. If a file is changed, and Sentry is not recompiled,
4040
it will still report old source code.
4141
4242
The best way to ensure source code is up to date is to recompile Sentry
4343
itself via `mix deps.compile sentry --force`. It's possible to create a Mix
4444
Task alias in `mix.exs` to do this. The example below would allow one to
45-
run `mix.sentry_recompile` which will force recompilation of Sentry so
46-
it has the newest source and then compile the project:
45+
run `mix.sentry_recompile && mix compile` which will force recompilation of Sentry so
46+
it has the newest source and then compile the project. The second `mix compile`
47+
is required due to Mix only invoking the same task once in an alias.
4748
4849
defp aliases do
4950
[sentry_recompile: ["compile", "deps.compile sentry --force"]]

0 commit comments

Comments
 (0)