fix(modules): count name characters without Intl.Segmenter (LSP crash on Fedora's Node) #312
No reviewers
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram!312
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/lint-no-intl-segmenter"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while running
editors/smoke/run.shfor the tree-sitter bump: in the smoke container (Fedora 43,nodejs-22.22.2-2.fc43, reduced ICU), the language server died with SIGSEGV on the first document it linted:Intl.Segmenter#segment()segfaults on that Node build, andSUSPECT_INGREDIENT_NAME(dev/1.6 only, nothing onmain) used it to count graphemes. A user on that Node would see the server crash on every file.characterCount(): code points, minus combining marks, variation selectors, skin-tone modifiers and ZWJ + joined emoji (regex property escapes, which work on that build). Close enough to graphemes for a 40-character threshold.Intl.Segmenterleft inpackages/*/src.Checks: modules / language-server tests, lint;
editors/smoke/run.sh(Neovim, Helix, Emacs) allok, combined with #313's bump. Unreleased dev/1.6 code: no changeset.