getodk / getodk/web-forms

Consider alternatives to tree-sitter

Open
#41 7 comments 0 reactions 0 assignees View on GitHub
needs discussion shelved tree-sitter
Dominant language
TypeScript
Stars
38
Forks
22
PR merge metrics
No merged PRs in 30d

Description

I’m filing quickly on mobile ahead of our check in, but briefly:

- tree-sitter adds a fair bit of tooling complexity
- And page weight
- It’s unclear that we benefit from its most compelling distinct features like incremental parsing
- While the grammar is stable, it’s a constant build time drag in CI
- Other tools might be better suited for eg TypeScript integration (as in type gen for aspects of the syntax we’re concerned with)

I briefly explored [Ohm](https://ohmjs.org/) over the weekend and it’s a pretty compelling alternative option (albeit with some reservations around maturity). Beyond its TS support, I was encouraged by how easy it was to build a cromulent XPath grammar, and how much more closely it matches the grammar from the spec.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names tree-sitter and Ohm but mentions no files, tests, or entry points. Start by mapping where tree-sitter affects tooling, page weight, CI, and TypeScript integration; done would require a decided replacement or documented conclusion.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, frontend, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.