Skip to content

Conversation

sheetalkamat
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings August 15, 2025 04:52
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 issues identified during the porting of TypeScript's tsc --composite tests to the Go-based TypeScript compiler port. The changes include adding comprehensive test coverage for composite scenarios and fixing a null pointer dereference bug in the checker.

  • Added extensive test cases covering composite option behavior with various command-line argument combinations
  • Fixed a potential null pointer dereference in the external module resolution code
  • Added test baselines covering JSX synthetic imports, module conversion scenarios, and composite option edge cases

Reviewed Changes

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

File Description
testdata/baselines/reference/tsc/composite/*.js New baseline files for composite test scenarios
internal/execute/tsc_test.go Added TestTscComposite function with comprehensive test cases
internal/checker/checker.go Fixed null pointer dereference by adding nil check for ImportClause

commandLineArgs: []string{"--composite", "false"},
},
{
subScenario: "when setting composite false on command line but has tsbuild info in config",
Copy link

Copilot AI Aug 15, 2025

Choose a reason for hiding this comment

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

This test case has an identical subScenario name to the previous test case (line 173). This will cause confusion and potentially interfere with test identification. Each test case should have a unique subScenario name.

Suggested change
subScenario: "when setting composite false on command line but has tsbuild info in config",
subScenario: "when setting composite false on command line but has tsbuild info in config (variant 2)",

Copilot uses AI. Check for mistakes.

commandLineArgs: []string{"--composite", "false"},
},
{
// !!! sheetal null is not reflected in final options
Copy link

Copilot AI Aug 15, 2025

Choose a reason for hiding this comment

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

The comment contains what appears to be a personal name 'sheetal' which seems out of place in a code comment. This should be removed or clarified.

Suggested change
// !!! sheetal null is not reflected in final options
// Setting composite to null on the command line is not reflected in final options

Copilot uses AI. Check for mistakes.

@sheetalkamat
Copy link
Member Author

This was cherry pick from #1484 but given there are more tests that were fixed as part of tsc -b work, closing this

@sheetalkamat sheetalkamat deleted the compositeTests branch August 15, 2025 06:41
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.

1 participant