-
Notifications
You must be signed in to change notification settings - Fork 742
Port tests for go to implementation and diff definitions tests #2130
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
...ata/baselines/reference/submodule/fourslash/goToType/goToTypeDefinition4.baseline.jsonc.diff
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.
Pull Request Overview
This PR ports baseline tests for "go to implementation" from the TypeScript fourslash test suite and adds baseline diffing support for go to definition, go to type definition, and go to implementation operations. Key changes include:
- Porting baseline go to implementation fourslash tests
- Adding baseline diffing for navigation features (go to definition, go to type definition, go to implementation)
- Including lib files in baselines with a fix to embed's
walkDir - Re-adding support for printing context spans (LocationLink's target range) in baselines
- Adding a method to mark fourslash tests as originally server tests to handle differences in context span behavior
Reviewed Changes
Copilot reviewed 300 out of 687 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/ls/findallreferences.go | Simplified context range calculation by using entry.context directly instead of computing contextNode |
| testdata/baselines/reference/submodule/fourslash/findRenameLocations/*.baseline.jsonc | Updated baseline files with corrected line numbers for skipped lines |
| testdata/baselines/reference/fourslash/goToType/*.baseline.jsonc | Removed baseline files (likely moved or consolidated) |
| testdata/baselines/reference/fourslash/goToDefinition/reallyLargeFile.baseline.jsonc | Removed baseline file |
| testdata/baselines/reference/fourslash/findAllReferences/*.baseline.jsonc | Updated baseline files with corrected line numbers for skipped lines |
| testdata/baselines/reference/fourslash/documentHighlights/*.baseline.jsonc | Updated baseline files with corrected line numbers for skipped lines |
| internal/fourslash/tests/gen/*_test.go | Added MarkTestAsStradaServer() calls to various test files to mark them as originally server tests |
In this PR:
walkDir)LocationLink's target range) in baselines.Note: I also added a method to fourslash tests in Corsa to mark them as originally server tests, because due to a bug in the fourslash server test harness, we don't include context spans in server tests, so I added the same special behavior (which we can remove later) to make diffing easier.