jakearchibald / jakearchibald/streaming-include
Is reparenting a gotcha?
- Dominant language
- JavaScript
- Stars
- 28
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
In the common case, each `ParserChunk` will be addressing a new node, but in the event of a parser error a `ParserChunk` may be used to move an existing node.
I'm worried that developers won't code expecting this, and end up with weird bugs as a result.
We could add a boolean to the `ParserChunk` to indicate that the node isn't new. The idea is this will increase the likelihood that developers will handle that possibility.
Contributor guide
No contributing guide indexed for this repository
Research direction
Review the ParserChunk lifecycle and the parser-error path where an existing node may be moved. Decide whether a boolean indicating that the node is not new adequately communicates this behavior, and consider the API changes needed so developers can handle reparenting explicitly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100