ma
marcoroth
GitHub
herb
Workspace
GitHub
CI Pipeline Executions
Filtered
Runs
Demo
Insights
Compare tasks
Analytics
Sign in
Toggle sidebar
Overview
⌘K
herb
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Succeeded
slots/node-path
4204b91b Analysis: Number a node the way `SlotVisitor` and `SubtreeCompiler` do
by Marco Roth
M
Succeeded
slots/node-path
b22233c4 Analysis: Number a node the same way in all three languages The Ruby collector walked an element's `child_nodes`, which carries the open and close tag, so every element level shifted a path by one. The other two ports had their own version of the same thing. Rust walked the right children and then added the offset back, reproducing the shifted numbering deliberately (`child_index_offset`). Removing it makes the paths it prints from `herb actionview flow` the ones `SlotVisitor` and `SubtreeCompiler` mean. TypeScript walked `childNodes()` for every node type, so it had the shift and also numbered a conditional's and a block's children by a list that includes their delimiters. It now indexes an element's body, a conditional's statements and a block's body, and reports an attribute against the element carrying it, because a path does not descend into an open tag. TypeScript also never recorded a block at all, so a state that a loop iterates was reported nowhere. It is recorded the way Ruby records it. None of the three had a test that would have noticed. Ruby's was named for the agreement and only ever snapshotted one side of it, TypeScript asserted that a path was a non-empty list of integers, and Rust asserted nothing. All three now assert the same five paths, and each was confirmed to fail without its fix.
by Marco Roth
M
Previous
Next