Order symbols before slicing, and say when the list was cut - #82
Merged
Conversation
flattenNavTree 의 정렬은 한 파일 안에서만 돈다. 파일 가로질러 모은 다음 상한에서 자르는데, 앞쪽 파일이 부분 일치를 잔뜩 내면 정확히 그 이름인 정의가 잘려나간다. 그러면 find_references 가 "정의를 못 찾았습니다" 라고 답한다. 있는데도. 자르기 전에 전체를 다시 세운다. orderSymbols 로 빼서 테스트. find_symbol 이 잘랐다는 말도 안 하고 있었다. 목록이 전부인 줄 알기 딱 좋다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two more in the family from #80 and #81.
The exact match could be sliced away
flattenNavTreeranks exact matches first, but only within one file. The merged list across files was ordered by nothing but test-vs-non-test before being cut at the limit, so a file scanned early producing many partial matches could push the exact definition past the cut.find_referencesthen answered "정의를 못 찾았습니다" for a symbol that exists — the worst possible answer, since it reads as "this doesn't exist" rather than "I stopped looking".Ordering now runs across the whole merged list before slicing: exact name, then prefix, then the rest, with test files behind within each band. Extracted as
orderSymbolswith 7 tests; the first one is this defect — searchingfoowherefooBarBazandfooBarQuxcome from earlier files and the realfoofrom a later one.The slice was silent
find_symbolprinted a truncated list with no indication it was truncated, so the list reads as complete. It now says when it was cut.1115 unit tests passing (7 new). Real-app symbol probe still 5/5.
npm run typecheckandnpm run buildclean.