-
Notifications
You must be signed in to change notification settings - Fork 756
Port document symbol tests + fixes #2207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| completionsAtIncompleteObjectLiteralProperty | ||
| completionsSelfDeclaring1 | ||
| completionsWithDeprecatedTag4 | ||
| navigationBarFunctionPrototype |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of those tests had .js files and needed // @allowJs: true to be added. Strada didn't need this because document symbol did not need to obtain the file from a program, it just obtained the file from a syntax cache (?). In Corsa, we try to get the requested file from the program, so these tests crashed. One thing I've been wanting to do is to use the same inferred project default settings for fourslash, but this would break a few import code fix tests, so I didn't do it in this PR.
testdata/baselines/reference/fourslash/documentSymbols/navbar01.baseline.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 166 out of 166 changed files in this pull request and generated 2 comments.
In Strada, the document symbol tests (i.e.
navigationTree) were not baseline tests. I initially ported those tests as they were in Strada, but some 40 tests failed, and mostly due to intentional differences, and so I just went through every failing test, fixed the most relevant differences, and re-ported the tests as baseline tests. Long term I think baseline tests are what we want for document symbol, and I think keeping diffs was going to be too noisy anyways.I had to add support in document symbol for expandos and some other missing things like name truncation.
Noticeable differences:
import *{} from 'foo'won't include an unnamed namespace import).Still missing:
Object.defineProperty(...)is missing because we still haven't added support for this construct yet in Corsa. SeenavigationBarFunctionPrototype_test.go. If we add support for it by reparsing it into something else, we'll just need to update thenewDocumentSymbolto allow that reparsed node, but that should be a quick change.If the baseline format is ok, I can add a similar baselining function for workspace symbols too, since it's likely we'll want to use that for new tests going forward.