Commit 2082fb3
authored
fix(native): skip unsupported-extension files in detect_removed_files (#1070)
The Rust file_collector only collects files whose extension is recognized
by `LanguageKind::from_extension` or listed in `SUPPORTED_EXTENSIONS`.
The JS LANGUAGE_REGISTRY is broader — Clojure, Gleam, Julia, F# files
exist in `file_hashes` because the JS-side WASM backfill writes them
(#1068), but Rust's narrower collector never sees them.
Before this fix, `detect_removed_files` flagged every such file as
"removed" on every incremental rebuild because they were absent from
`current` (the just-collected file list). The orchestrator's purge step
then deleted their `nodes` and `file_hashes` rows, and the JS-side
`backfillNativeDroppedFiles` (now running on every pass per #1069)
re-parsed them with WASM and re-inserted the rows — the ~2s 1-file
rebuild floor reported in #1066.
Add `is_supported_extension` to `file_collector` (exposing the same
predicate used by `collect_files`) and apply it as a pre-filter in
`detect_removed_files`. Files outside Rust's capability are now left
alone: their absence from `current` is a capability boundary, not a
deletion. Rows owned by the JS layer persist across incremental
rebuilds and the backfill's missing-file early-return at
`pipeline.ts:811` finally fires.
Refs #1066
Impact: 3 functions changed, 4 affected1 parent 8fcdb86 commit 2082fb3
2 files changed
Lines changed: 72 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
132 | 141 | | |
133 | 142 | | |
134 | 143 | | |
| |||
143 | 152 | | |
144 | 153 | | |
145 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
146 | 158 | | |
147 | 159 | | |
148 | 160 | | |
| |||
759 | 771 | | |
760 | 772 | | |
761 | 773 | | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
762 | 815 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
41 | 60 | | |
42 | 61 | | |
43 | 62 | | |
| |||
0 commit comments