oxc-project / oxc-project/backlog
Split `oxc_linter` into multiple crates to improve compile time
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 7
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
The linter compile time has gotten pretty long now with the number of lint rules that we support. One idea I had to potentially improve compile time is to reduce the number of crates that need to be compiled and the number of crates that could be compiled in parallel.
This is just a rough idea, but I think we could potentially split this up into a few phases:
- Phase 1: Split
oxc_linterintooxc_linter_coreandoxc_linter_rules.oxc_linter_corecontains essentially everything that isn't inoxc_linter/src/rules: config resolution, diagnostics, JS plugins, etc.oxc_linter_rulescontains all of the linter rules and generated code (rule runner impls, rule enum, etc.)- Once this phase is complete, we could at least re-compile
oxc_linter_rulesalone without needing to compileoxc_linter_coreif you're making changes to lint rules locally. Unfortunately, you'd still need to compile both crates asoxc_linter_ruleswould depend onoxc_linter_core.
- Phase 2: Split
oxc_linter_rulesinto several plugin-based crates:oxc_linter_rules_eslint,oxc_linter_rules_react, etc.- This way if you're only developing a rule in a single plugin, you don't need to recompile all rules crates at once. And when doing a full recompile, all of the linter rules can be compiled in parallel instead of serially.
This would be a significant re-architecture of the crates. I'm not even entirely sure if it's possible. Just wanted to write this idea down somewhere durable though.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by mapping the existing oxc_linter crate, especially oxc_linter/src/rules, and identify how config resolution, diagnostics, JS plugins, rules, and generated code are organized. Then assess whether the proposed oxc_linter_core and oxc_linter_rules split is feasible, followed by the plugin-based split. Done means the re-architecture is validated and compile-time improvements are demonstrated.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system, devtools
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100