Commit c7d948f
fix: skip references when counting total symbols in TopSymbolsCtx
The total_symbols count was massively inflated because
flatten_namespace resolves references (re-exports), causing the same
symbol to be counted once per module that re-exports it. Instead,
count symbols by walking namespace children directly and skipping
reference nodes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 2fee83a commit c7d948f
1 file changed
Lines changed: 35 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
854 | 854 | | |
855 | 855 | | |
856 | 856 | | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
857 | 892 | | |
858 | 893 | | |
859 | 894 | | |
| |||
864 | 899 | | |
865 | 900 | | |
866 | 901 | | |
867 | | - | |
868 | | - | |
869 | | - | |
870 | | - | |
871 | | - | |
872 | | - | |
873 | 902 | | |
874 | 903 | | |
875 | 904 | | |
| |||
0 commit comments