Skip to content

Set impliedNodeFormat on sourceFile we get from host to ensure the field is set correctly#50977

Merged
sheetalkamat merged 8 commits intomainfrom
tsBuildImpliedNodeFormat
Oct 31, 2022
Merged

Set impliedNodeFormat on sourceFile we get from host to ensure the field is set correctly#50977
sheetalkamat merged 8 commits intomainfrom
tsBuildImpliedNodeFormat

Conversation

@sheetalkamat
Copy link
Copy Markdown
Member

This fixes issue with using same source file between two programs when impliedNodeFormat was different in tsbuild mode.
Fixes #50872

@typescript-bot typescript-bot added the For Milestone Bug PRs that fix a bug with a specific milestone label Sep 27, 2022
Comment thread src/harness/virtualFileSystemWithWatch.ts
Comment thread src/testRunner/unittests/tsbuild/moduleResolution.ts
@sheetalkamat sheetalkamat changed the title Use impliedNodeFormat as key during caching sourceFiles Set impliedNodeFormat on sourceFile we get from host to ensure the field is set correctly Sep 28, 2022
Comment thread src/compiler/program.ts Outdated
Comment thread src/compiler/program.ts Outdated
Comment thread src/compiler/program.ts Outdated
@sheetalkamat sheetalkamat merged commit 7c58011 into main Oct 31, 2022
@sheetalkamat sheetalkamat deleted the tsBuildImpliedNodeFormat branch October 31, 2022 18:26
@DanielRosenwasser
Copy link
Copy Markdown
Member

@typescript-bot cherry-pick this to release-4.9

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Oct 31, 2022

Heya @DanielRosenwasser, I've started to run the task to cherry-pick this into release-4.9 on this PR at 4bd8b9b. You can monitor the build here.

@typescript-bot
Copy link
Copy Markdown
Collaborator

Hey @DanielRosenwasser, I've opened #51363 for you.

typescript-bot pushed a commit to typescript-bot/TypeScript that referenced this pull request Oct 31, 2022
Component commits:
05d739b Add test that fails

c8ebfb8 Handle impliedNodeFormat when handling sourceFileCache Fixes microsoft#50872

5c98b9c Revert the fix

651a47f Make sure impliedNodeFormat is set for the sourceFile

2c22989 Revert "Make sure impliedNodeFormat is set for the sourceFile"
This reverts commit 651a47f.

92bf32d Revert "Revert the fix"
This reverts commit 5c98b9c.

5f7bc05 Merge branch 'main' into tsBuildImpliedNodeFormat

4bd8b9b Swap the keys for map
@DanielRosenwasser
Copy link
Copy Markdown
Member

I don't know if this will work after-the-fact but

@typescript-bot user test tsserver
@typescript-bot test tsserver top100

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Oct 31, 2022

Heya @DanielRosenwasser, I've started to run the diff-based user code test suite (tsserver) on this PR at 4bd8b9b. You can monitor the build here.

@typescript-bot
Copy link
Copy Markdown
Collaborator

typescript-bot commented Oct 31, 2022

Heya @DanielRosenwasser, I've started to run the diff-based top-repos suite (tsserver) on this PR at 4bd8b9b. You can monitor the build here.

DanielRosenwasser pushed a commit that referenced this pull request Oct 31, 2022
Component commits:
05d739b Add test that fails

c8ebfb8 Handle impliedNodeFormat when handling sourceFileCache Fixes #50872

5c98b9c Revert the fix

651a47f Make sure impliedNodeFormat is set for the sourceFile

2c22989 Revert "Make sure impliedNodeFormat is set for the sourceFile"
This reverts commit 651a47f.

92bf32d Revert "Revert the fix"
This reverts commit 5c98b9c.

5f7bc05 Merge branch 'main' into tsBuildImpliedNodeFormat

4bd8b9b Swap the keys for map

Co-authored-by: Sheetal Nandi <[email protected]>
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Jan 12, 2023