-
Notifications
You must be signed in to change notification settings - Fork 191
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
Continue on with error-recovery infra refresh #1649
Conversation
4127f11
to
22e4216
Compare
94e4b50
to
82e3457
Compare
b79845d
to
a9717f3
Compare
0fde5c8
to
f0a6f79
Compare
Move curried types to constants Improvements to the local debug output Further clean up metadata and fragment infra Improve symbols - Test `@names` in the debugger - Consolidate symbol names in multiple places - Rename "eval" names (a holdover from the partial days) to "debug" names. Future work could include further consolidating symbol names to rationalize lexical scope so that lexical names work in the debugger. Trace log cleanup This commit is mostly focused on changing the internals so that we can create complete trace logs without having to pass in the entire VM. Mostly finished implementing improved logging. More trace log improvements Fix lints
f0a6f79
to
35817f7
Compare
There are still a number of places that could benefit from further improvements to their trace log representation, but this PR creates a strong foundation to build on and is, itself a significant improvement to the status quo. I ran the benchmarks locally and this PR didn't affect performance. This is to be expected since virtually all of the changes happened inside of |
perf test shows no difference 🎉 |
|
||
function describeBlock( | ||
block: AppendingBlock, | ||
type: 'block:simple' | 'block:remote' | 'block:resettable' |
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.
simple blocks were renamed to appending blocks, yeah?
what determines simple vs remote vs resettable?
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.
- Appending: A block that will never be cleared. However, since it's possible to append a block to an Appending Block, the boundaries of an Appending Block can change. See
FirstNode
/LastNode
for details on how this works. - Resettable: A block that can be reset (i.e. cleared). When a block is reset, its contents are cleared and it produces a new cursor to render a block into. This is used for constructs like
{{#if}}
/{{else}}
, which clear and rerender the block whenever the boolean value changes. - Remote: A block that represents a remote element. When the block is destroyed, the nodes rendered into the remote element are removed.
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.
yay oklch!
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.
Do we need / want to inline @glimmer/debug-util
so that it's stripped during the build?
Yep, we do that |
This PR focuses on bringing in the improvements to local logging and debug infrastructure.
The code is a little bit elaborate, but it does a good job of making the debug trace logs for VM operations clear and comprehensible.
Here are some examples of improved output:
Notable:
%d
,%o
, etc.) are used for inline values with a built-in inline representation...x items
followed by a representation of push and pop operations.In addition, it's possible to enable "subtle" mode, which shows all values rather than just changes.
Unchanged values are generally greyed out, so turning on subtle mode can be useful to get the full VM state for a change in normal trace logging mode, while still retaining the ability to identify changes.
Internally, there are two parts of this change:
join
to join a list of fragments with a separator). When combined, the new fragment has natural subtle behavior (e.g. a list made entirely of subtle valuesjoin
ed with,
is subtle).