Skip to content

Conversation

andrewbranch
Copy link
Member

@andrewbranch andrewbranch commented Aug 25, 2025

Copy link
Member

@sheetalkamat sheetalkamat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but fix the errors in tests ?

@Copilot Copilot AI review requested due to automatic review settings August 25, 2025 21:07
Copy link
Contributor

@Copilot 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 fixes two snapshot-related bugs in the TypeScript compiler port: an ATA caching issue that caused "No project found for file" errors when opening JS files in inferred projects, and a crash when a tsconfig.json extends a non-existent target.

  • Adds null safety checks for extended config handling to prevent crashes when config files don't exist
  • Fixes ATA cache invalidation by resetting commandLineWithTypingsFiles when command line changes
  • Adds comprehensive test coverage for both bug scenarios

Reviewed Changes

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

Show a summary per file
File Description
internal/tsoptions/tsconfigparsing.go Adds null safety check for extended config result handling
internal/project/projectcollectionbuilder.go Adds early returns for missing configs/projects and resets cached typing files
internal/project/extendedconfigcache.go Adds null safety for file handle hash calculation
internal/project/projectcollectionbuilder_test.go Adds test for config file registry cleanup scenario
internal/project/project_test.go Adds test for ATA cache invalidation bug
internal/project/configfilechanges_test.go Adds test for missing extended config creation scenario

@andrewbranch andrewbranch changed the title Fix two snapshots bugs Fix three snapshots bugs Aug 25, 2025
@andrewbranch andrewbranch added this pull request to the merge queue Aug 25, 2025
Merged via the queue into microsoft:main with commit a94299b Aug 25, 2025
22 checks passed
@andrewbranch andrewbranch deleted the snapshots/first-bugs branch August 25, 2025 22:03
zshannon pushed a commit to zshannon/typescript-go that referenced this pull request Oct 6, 2025
zshannon pushed a commit to zshannon/typescript-go that referenced this pull request Oct 6, 2025
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.

LSP - invalid memory address or nil pointer dereference - findOrCreateDefaultConfiguredProjectWorker
2 participants