Skip to content

Conversation

@gabritto
Copy link
Member

In this PR:

  • Port of baseline go to implementation fourslash tests.
  • Baseline diffing for go to definition, go to type definition, and go to implementation.
  • Include lib files in baselines (+ fix to embed's walkDir)
  • Re-add support for printing context spans (i.e. 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.

@gabritto gabritto marked this pull request as ready for review November 19, 2025 22:10
Copilot AI review requested due to automatic review settings November 19, 2025 22:10
Copy link
Contributor

Copilot AI left a 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

@gabritto gabritto requested a review from jakebailey November 19, 2025 22:24
@gabritto gabritto added this pull request to the merge queue Nov 20, 2025
Merged via the queue into main with commit 183d674 Nov 20, 2025
22 checks passed
@gabritto gabritto deleted the gabritto/testimpl branch November 20, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants