Skip to content

Conversation

@sheetalkamat
Copy link
Member

No description provided.

@sheetalkamat sheetalkamat requested review from andrewbranch, Copilot and jakebailey and removed request for andrewbranch and Copilot June 17, 2025 21:55
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 refactors various layers of the codebase to use the new DocumentStore directly, replacing previous ScriptInfo getter methods and document registry calls. Key changes include:

  • Updating test files and service methods to use DocumentStore().GetScriptInfoByPath and serviceToPath.
  • Refactoring numerous functions in service.go, project.go, and api.go to delegate document management to DocumentStore.
  • Removing outdated GetScriptInfo and DocumentRegistry interfaces and associated helper methods.

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/project/util_test.go Introduces serviceToPath and updates config file existence checks for DocumentStore usage
internal/project/service_test.go Replaces GetScriptInfo calls with DocumentStore equivalents
internal/project/service.go Refactors file operations to use DocumentStore methods instead of deprecated ones
internal/project/scriptinfo.go Updates symlink handling to call DocumentStore.AddRealpathMapping
internal/project/projectreferencesprogram_test.go Replaces GetScriptInfo calls in test cases with DocumentStore calls
internal/project/projectlifetime_test.go Updates tests to use serviceToPath and DocumentStore for file and project assertions
internal/project/project.go Refactors document handling by replacing DocumentRegistry with DocumentStore
internal/compiler/fileloader.go Uses a new variable (optionsForFile) in place of the previous computed options
internal/api/api.go Removes deprecated API helper methods and updates ProjectHost implementations
Comments suppressed due to low confidence (1)

internal/compiler/fileloader.go:385

  • Ensure that 'optionsForFile' is defined in this context and correctly computed, as it replaces the previous inline call to 'module.GetCompilerOptionsWithRedirect'.
			mode := getModeForUsageLocation(file.FileName(), meta, entry, optionsForFile)

@sheetalkamat sheetalkamat added this pull request to the merge queue Jun 18, 2025
Merged via the queue into main with commit 86d2109 Jun 18, 2025
22 checks passed
@sheetalkamat sheetalkamat deleted the documentStoreRefactor branch June 18, 2025 17:15
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.

4 participants