🤖 Cherry-pick PR #34513 into release-3.7#34800
Merged
andrewbranch merged 1 commit intomicrosoft:release-3.7from Nov 11, 2019
Merged
🤖 Cherry-pick PR #34513 into release-3.7#34800andrewbranch merged 1 commit intomicrosoft:release-3.7from
andrewbranch merged 1 commit intomicrosoft:release-3.7from
Conversation
Component commits: 62aad54 Fix a crash when transforming functions in modules. When transforming a module declaration and block, parse tree nodes contained in the module block have their parent pointers reset due to `shouldEmitModuleDeclaration` calling into `isInstantiatedModule`, which needs to set parent pointers to operate. That causes a crash when later transforming any nodes within the module, as retrieving their source file in `getSourceFileOfNode` (via `getOrCreateEmitNode`) fails, due to their new synthesized parent nodes not being in a source file. This change avoids the issue by using the parse tree node in `ts.ts` to decide whether a module declaration should be emitted (i.e. whether the module contains values). This means transformers cannot add values to modules that previously did not contain any. Fixes microsoft#34644.
Contributor
|
@andrewbranch any plans to get this in? |
Member
|
Thanks @patrickszmucer, almost forgot about this 😅 It will be in 3.7.3. |
Contributor
|
Thanks @andrewbranch! Do you know when 3.7.3 is going to be released? |
Member
|
The current plan is sometime this week. We have some more bugs to fix and throw in there first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This cherry-pick was triggerd by a request on #34513
Please review the diff and merge if no changes are unexpected.
You can view the cherry-pick log here.
cc @andrewbranch