Bump linesweeper to 0.4#4273
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the linesweeper dependency from version 0.3 to 0.4, allowing the removal of a workaround that reversed subpaths. It also implements the of_tag method for WindingNumber to support the updated API. The review feedback highlights a potential out-of-bounds panic in the new of_tag implementation when indexing self.elems[tag], suggesting a defensive check using .get(tag) instead.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Thanks! What's the |
There was a problem hiding this comment.
1 issue found across 3 files
Confidence score: 3/5
- In
node-graph/nodes/path-bool/src/lib.rs, indexingself.elems[tag]can panic whenself.elemsis shorter thantag + 1(such as default/shorter initialization), which could crash graph execution at runtime for valid inputs—switch to bounds-safe access like.get(tag).copied().unwrap_or(0)before merging.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
It's an annoying consequence of the fact that linesweeper abstracts over the definition of winding numbers. So there's a
Since Graphite supports n-ary set ops, the winding number type has dynamic length and |
|
I see, thanks for the explanation. And yes, we try to avoid crashing the app if a bug occurs, since broken behavior with a console error ( |
As linesweeper 0.4 reversed the path direction, this removes the temporary reversal.