-
Notifications
You must be signed in to change notification settings - Fork 20
Enhancement: stabilize LiveDebugger behavior on recompilation #873
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
5755e53
Add filesystem dep
kraleppa 3058978
Removed trace after recompile option
kraleppa b2efde0
Changed spec
kraleppa eddc8ad
Working, needs polish
kraleppa a00b64e
Removed dbg
kraleppa 5f92e23
Extracted live_module? function to ModuleAPI
kraleppa 4ac0c25
Changed name of all_paths function
kraleppa 9b0d63c
Better error handling in all_callbacks function
kraleppa 092ae2a
Better specs
kraleppa ab579b0
Cleanup in TracingManager
kraleppa cbbb504
Split functions
kraleppa 11efa9d
Removed obsolete tests
kraleppa 96b94af
Removed obsolete handler test
kraleppa 0e671c3
Cleanup in tracing_manager_test
kraleppa 1e48478
Wrapped FileSystem library and added mock for it
kraleppa cb16706
Added tests for paths
kraleppa e473f07
Added tests for all_callbacks/1
kraleppa 5636807
Add tests for live_module? function
kraleppa 607dfac
Added tests for refresh_tracing/1
kraleppa 8f57d13
Add test for monitor recompilation
kraleppa f337209
Added case for file_event
kraleppa fb12f7c
Fix settings e2e test
kraleppa 1c7368b
Installation of inotify-tools
kraleppa f1c0641
Updated version in README
kraleppa 13a3dae
Updated docs with new version
kraleppa 7aa9cab
Revert "Updated docs with new version"
kraleppa 04df40d
Revert "Updated version in README"
kraleppa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,9 @@ jobs: | |
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install inotify-tools | ||
| run: sudo apt-get update && sudo apt-get install -y inotify-tools | ||
|
|
||
| - name: Set up Elixir | ||
| uses: erlef/[email protected] | ||
| with: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,9 @@ jobs: | |
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install inotify-tools | ||
| run: sudo apt-get update && sudo apt-get install -y inotify-tools | ||
|
|
||
| - name: Set up Elixir | ||
| uses: erlef/[email protected] | ||
| with: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| defmodule LiveDebugger.API.System.FileSystem do | ||
| @moduledoc """ | ||
| API for interacting with file system monitoring functionalities. | ||
|
|
||
| This module wraps the `FileSystem` library to allow for easier testing and mocking. | ||
| """ | ||
|
|
||
| @callback start_link(opts :: keyword()) :: GenServer.on_start() | ||
| @callback subscribe(name :: atom()) :: :ok | ||
|
|
||
| @doc """ | ||
| Starts a FileSystem monitor process with the given options. | ||
|
|
||
| Options: | ||
| - `:dirs` - list of directories to monitor | ||
| - `:name` - name to register the process under | ||
| """ | ||
| @spec start_link(keyword()) :: GenServer.on_start() | ||
| def start_link(opts), do: impl().start_link(opts) | ||
|
|
||
| @doc """ | ||
| Subscribes the current process to file system events from the named monitor. | ||
|
|
||
| The subscribing process will receive messages in the format: | ||
| `{:file_event, pid, {path, events}}` | ||
| """ | ||
| @spec subscribe(atom()) :: :ok | ||
| def subscribe(name), do: impl().subscribe(name) | ||
|
|
||
| defp impl() do | ||
| Application.get_env( | ||
| :live_debugger, | ||
| :api_file_system, | ||
| __MODULE__.Impl | ||
| ) | ||
| end | ||
|
|
||
| defmodule Impl do | ||
| @moduledoc false | ||
| @behaviour LiveDebugger.API.System.FileSystem | ||
|
|
||
| @impl true | ||
| def start_link(opts) do | ||
| FileSystem.start_link(opts) | ||
| end | ||
|
|
||
| @impl true | ||
| def subscribe(name) do | ||
| FileSystem.subscribe(name) | ||
| end | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.