Repository navigation
Find names with Unicode letters under the cursor again, keep Find References on a program call to the program and on a local to its own program, find locals an autoloaded ado sets, and drop programs at clear all - #433
Merged
Conversation
…es on a program call to the program, keep credited locals to the read's program frame, find locals an autoloaded ado sets, and drop programs at clear all
…e workspace-coverage mock indexer its symbols
…d helpers in the providers
Contributor
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 52 minutes. View limit details
|
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.
A cold review of #430 and #431 before the release found navigation regressions on main. After #430 the lexer reads
caféas one word, but Go to Definition, Hover and Find References still scanned the word under the cursor as ASCII, so they returned nothing on it. After #431, Find References on a call to a program that sets a caller local withc_localreturned the local's read in place of the program's references. It also pooled same-named locals across programs and missed locals that an autoloaded ado sets.Now the providers read the word under the cursor the way the lexer reads a name. Find References uses the same credited writes as Go to Definition, keeps them to the read's program frame, and leaves a literal
c_localout of the word-under-cursor check.Fixed
uni-nav: Go to Definition, Hover and Find References on a variable, local macro or program name with Unicode letters (café,`année',résumé). The scanners in definition, hover, references and completion, and macro completion (`anné,$café), now use the name characters fromsrc/utils/stata-name.ts. The outline's program-name selection no longer relies on\b(which misses the end ofcafé). A cursor past the end of a line still walks back to the last word, as before.up: Find References onmakeflagreturns the declaration and both calls (lines 1, 4, 5). A literalc_localwrite spans the whole call, so it no longer takes over from the program under the cursor. The read ofdonestill finds both calls.fr: Find References from the read ofdoneinfirstreturns lines 5 and 6.second's separate local (line 9) is no longer included.checked: Find References from the read and from the argument both return lines 3 and 4. They now get the workspace symbols Go to Definition uses, so they findsetter.ado.acmoves the same way (same cause, now matching Go to Definition and 9f94055).cond: inif 1 version 18: save l.dta,dtais no longer a use of a variable. The file-name check now sees throughversion N:after a one-lineif.clearall:clear alldrops programs from memory, so a later call autoloads the ado. The undefined-macro warning goes away and navigation finds the argument. (program drop _allalready worked.)Not fixed
clearfile: aprogram droprun by a child do-file does not carry back to the caller. That needs cross-file state, not a few lines.uncalled: aruninside a program body that is never called still counts as loaded. Telling apart called and uncalled bodies is more than a few lines.checked/ac(setter result) still return nothing. 9f94055 returned them. This is outside the listed cases.l.dtaincondstill report variabledta. Only Find References was in scope.local x : word count …), the option prefix after a comma, and the command word at line start.Proof: each fixed case has a focused test that fails on origin/main and passes here (10 tests). The review's
repro.shoutputs before and after show only the cases above changed (clearfile,uncalled,braced,fmtdrift,optionare byte-identical). The base-ado corpus check shows nothing added or removed (30118 records).check:line-endings,typecheck,bun test ./tests(10348 pass),lintandtest:ciall pass, each run separately.