Commit 533909c
* fix(cli): erase clears all builder-owned files (crash marker + hash tmp) (#349, #350)
erase left .graph_increment_in_progress and .graph_hashes.json.tmp on disk
because _cmd_erase hardcoded only .graph_hashes.json. The surviving crash
marker then forced the next increment into a silent full rebuild (explained
only under --verbose); the .tmp was orphan cruft. Export the builder-owned
filenames from build_ast_graph.BUILDER_OWNED_INDEX_FILES and have erase clear
all of them from one list, so erase and the builder cannot drift.
Co-Authored-By: Claude <noreply@anthropic.com>
* perf(cli): lazy-import build_ast_graph in _cmd_erase
The top-level `from build_ast_graph import BUILDER_OWNED_INDEX_FILES`
pulled numpy/ladybug/pyarrow/tree_sitter on every CLI invocation (~54ms;
measured via -X importtime: cli cumulative import went 44ms -> 98ms),
including `--help` -- violating this file's own lazy-import invariant.
The three filenames are only needed on the erase path, so move the
import into _cmd_erase. After the move, build_ast_graph is no longer
imported at cli import time and cumulative import is back to ~39ms.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 9ac7da1 commit 533909c
3 files changed
Lines changed: 74 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
475 | 491 | | |
476 | 492 | | |
477 | 493 | | |
478 | | - | |
| 494 | + | |
479 | 495 | | |
480 | 496 | | |
481 | 497 | | |
| |||
491 | 507 | | |
492 | 508 | | |
493 | 509 | | |
494 | | - | |
| 510 | + | |
495 | 511 | | |
496 | 512 | | |
497 | 513 | | |
| |||
3811 | 3827 | | |
3812 | 3828 | | |
3813 | 3829 | | |
3814 | | - | |
| 3830 | + | |
3815 | 3831 | | |
3816 | 3832 | | |
3817 | 3833 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
608 | | - | |
609 | | - | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
610 | 615 | | |
611 | 616 | | |
612 | 617 | | |
| |||
643 | 648 | | |
644 | 649 | | |
645 | 650 | | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
652 | 659 | | |
653 | 660 | | |
654 | | - | |
| 661 | + | |
| 662 | + | |
655 | 663 | | |
656 | 664 | | |
657 | 665 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
141 | 177 | | |
142 | 178 | | |
143 | 179 | | |
| |||
0 commit comments