-
Notifications
You must be signed in to change notification settings - Fork 80
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
Introduce debug snapshotting like Swift has #612
Merged
Merged
Conversation
This file contains 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
zach-klippenstein
changed the title
Zachklipp/debug snapshots
Introduce debug snapshotting like Swift has
Sep 14, 2019
zach-klippenstein
force-pushed
the
zachklipp/debug-snapshots
branch
4 times, most recently
from
September 16, 2019 23:25
3ef7590
to
40e7e73
Compare
...flow-runtime/src/main/java/com/squareup/workflow/debugging/WorkflowHierarchyDebugSnapshot.kt
Outdated
Show resolved
Hide resolved
...flow-runtime/src/main/java/com/squareup/workflow/debugging/WorkflowHierarchyDebugSnapshot.kt
Outdated
Show resolved
Hide resolved
...in/workflow-runtime/src/main/java/com/squareup/workflow/debugging/WorkflowUpdateDebugInfo.kt
Outdated
Show resolved
Hide resolved
...in/workflow-runtime/src/main/java/com/squareup/workflow/debugging/WorkflowUpdateDebugInfo.kt
Outdated
Show resolved
Hide resolved
kotlin/workflow-runtime/src/main/java/com/squareup/workflow/internal/RealRenderContext.kt
Show resolved
Hide resolved
kotlin/workflow-runtime/src/main/java/com/squareup/workflow/internal/SubtreeManager.kt
Outdated
Show resolved
Hide resolved
kotlin/workflow-runtime/src/main/java/com/squareup/workflow/internal/SubtreeManager.kt
Outdated
Show resolved
Hide resolved
kotlin/workflow-runtime/src/main/java/com/squareup/workflow/internal/WorkflowId.kt
Show resolved
Hide resolved
kotlin/workflow-runtime/src/main/java/com/squareup/workflow/internal/WorkflowNode.kt
Outdated
Show resolved
Hide resolved
kotlin/workflow-runtime/src/main/java/com/squareup/workflow/WorkflowSession.kt
Outdated
Show resolved
Hide resolved
zach-klippenstein
force-pushed
the
zachklipp/debug-snapshots
branch
from
September 17, 2019 13:12
40e7e73
to
7f16250
Compare
Pushed to address some of my own comments. |
rjrjr
approved these changes
Sep 19, 2019
kotlin/samples/tictactoe/app/src/main/java/com/squareup/sample/mainactivity/MainActivity.kt
Outdated
Show resolved
Hide resolved
kotlin/workflow-runtime/src/main/java/com/squareup/workflow/debugging/LazyString.kt
Outdated
Show resolved
Hide resolved
...flow-runtime/src/main/java/com/squareup/workflow/debugging/WorkflowHierarchyDebugSnapshot.kt
Outdated
Show resolved
Hide resolved
kotlin/workflow-runtime/src/main/java/com/squareup/workflow/debugging/WorkflowDebugInfo.kt
Outdated
Show resolved
Hide resolved
...in/workflow-runtime/src/main/java/com/squareup/workflow/debugging/WorkflowUpdateDebugInfo.kt
Outdated
Show resolved
Hide resolved
...in/workflow-runtime/src/main/java/com/squareup/workflow/debugging/WorkflowUpdateDebugInfo.kt
Outdated
Show resolved
Hide resolved
kotlin/workflow-runtime/src/main/java/com/squareup/workflow/internal/SubtreeManager.kt
Outdated
Show resolved
Hide resolved
…tead of individual parameters.
zach-klippenstein
force-pushed
the
zachklipp/debug-snapshots
branch
2 times, most recently
from
September 20, 2019 16:32
7f05f31
to
5976800
Compare
All feedback addressed, merging on green. |
…on about the workflow tree. Partial implementation of #343.
zach-klippenstein
force-pushed
the
zachklipp/debug-snapshots
branch
from
September 20, 2019 18:14
5976800
to
29bae34
Compare
zach-klippenstein
added a commit
that referenced
this pull request
Sep 27, 2019
The workflow runtime supports registering a single `WorkflowDiagnosticListener` at initialization that will receive events for all kinds of significant events in the runtime. This still supports the debug snapshotting and update information that Swift currently has, but also supports reporting much finer-grained profiling data. This supersedes #612.
zach-klippenstein
added a commit
that referenced
this pull request
Sep 27, 2019
The workflow runtime supports registering a single `WorkflowDiagnosticListener` at initialization that will receive events for all kinds of significant events in the runtime. This still supports the debug snapshotting and update information that Swift currently has, but also supports reporting much finer-grained profiling data. This supersedes #612.
zach-klippenstein
added a commit
that referenced
this pull request
Sep 27, 2019
The workflow runtime supports registering a single `WorkflowDiagnosticListener` at initialization that will receive events for all kinds of significant events in the runtime. This still supports the debug snapshotting and update information that Swift currently has, but also supports reporting much finer-grained profiling data. This supersedes #612, and closes #343 again.
zach-klippenstein
added a commit
that referenced
this pull request
Oct 1, 2019
The workflow runtime supports registering a single `WorkflowDiagnosticListener` at initialization that will receive events for all kinds of significant events in the runtime. This still supports the debug snapshotting and update information that Swift currently has, but also supports reporting much finer-grained profiling data. This supersedes #612, and closes #343 again.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
3 commits, recommend reviewing individually. First one cleans up the
launchWorkflowIn
API to prepare to add another stream, then state snapshots are introduced, and finally update info.This PR introduces a new stream to the function passed to
launchWorkflowIn
, one that emits a tuple of two things on every render pass:WorkflowHierarchyDebugInfo
– A simple tree data structure that mirrors the workflow tree and, at each node, describes the type of the workflow at that node and the state of that workflow at the time of that render pass.WorkflowUpdateDebugInfo
– A description of a path down the tree that indicates which workflow triggered the render pass and why. Includes information about which nodes up the tree executedWorkflowAction
s as part of the update. Null for the first render pass, since it is not triggered by any update.See the kdoc on those types for more information.
Closes #343.