-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Printer incorrectly adding line break when emitting node list with non-synthesized nodes as of TS 4.3 #44068
Labels
Fix Available
A PR has been opened for this issue
Needs Investigation
This issue needs a team member to investigate its status.
Milestone
Comments
devversion
changed the title
Printer incorrectly adding line break when emitting node list as of TS 4.3
Printer incorrectly adding line break when emitting node list with non-synthesized nodes as of TS 4.3
May 13, 2021
devversion
added a commit
to devversion/TypeScript
that referenced
this issue
May 13, 2021
…mitting node list As of 3c32f6e, a line separator is added between nodes if the nodes are not synthetic and on separate lines. This is wrong and previously only happened if the non-synthetic nodes were on different lines but had the same parent. Fixes microsoft#44068.
devversion
added a commit
to devversion/TypeScript
that referenced
this issue
May 13, 2021
…mitting node list As of 3c32f6e, a line separator is added between nodes if the nodes are not synthetic and on separate lines. This is wrong and previously only happened if the non-synthetic nodes were on different lines but had the same parent. Fixes microsoft#44068.
devversion
added a commit
to devversion/TypeScript
that referenced
this issue
May 13, 2021
…mitting node list As of 3c32f6e, a line separator is added between nodes if the nodes are not synthetic and on separate lines. This is wrong and previously only happened if the non-synthetic nodes were on different lines but had the same parent. Fixes microsoft#44068.
devversion
added a commit
to devversion/TypeScript
that referenced
this issue
May 13, 2021
…mitting node list As of 3c32f6e, a line separator is added between nodes if the nodes are not synthetic and on separate lines. This is wrong and previously only happened if the non-synthetic nodes were on different lines but had the same parent. Fixes microsoft#44068.
devversion
added a commit
to devversion/TypeScript
that referenced
this issue
May 13, 2021
…mitting node list As of 3c32f6e, a line separator is added between nodes if the nodes are not synthetic and on separate lines. This is wrong and previously only happened if the non-synthetic nodes were on different lines but had the same parent. Fixes microsoft#44068.
devversion
added a commit
to devversion/TypeScript
that referenced
this issue
May 13, 2021
…mitting node list As of 3c32f6e, a line separator is added between nodes if the nodes are not synthetic and on separate lines. This it push s wrong and previously only happened if the non-synthetic nodes were on different lines but had the same parent. Fixes microsoft#44068.
RyanCavanaugh
added
the
Needs Investigation
This issue needs a team member to investigate its status.
label
May 13, 2021
devversion
added a commit
to devversion/TypeScript
that referenced
this issue
May 14, 2021
…mitting node list As of 3c32f6e, a line separator is added between nodes if the nodes are not synthetic and on separate lines. This it push s wrong and previously only happened if the non-synthetic nodes were on different lines but had the same parent. Fixes microsoft#44068.
devversion
added a commit
to devversion/TypeScript
that referenced
this issue
May 14, 2021
…mitting node list As of 3c32f6e, a line separator is added between nodes if the nodes are not synthetic and on separate lines. This it push s wrong and previously only happened if the non-synthetic nodes were on different lines but had the same parent. Fixes microsoft#44068.
devversion
added a commit
to devversion/TypeScript
that referenced
this issue
May 14, 2021
…mitting node list As of 3c32f6e, a line separator is added between nodes if the nodes are not synthetic and on separate lines. This it push s wrong and previously only happened if the non-synthetic nodes were on different lines but had the same parent. Fixes microsoft#44068.
typescript-bot
pushed a commit
to typescript-bot/TypeScript
that referenced
this issue
May 20, 2021
Component commits: d192080 Do not incorrectly add line separators for non-synthetic nodes when emitting node list As of 3c32f6e, a line separator is added between nodes if the nodes are not synthetic and on separate lines. This it push s wrong and previously only happened if the non-synthetic nodes were on different lines but had the same parent. Fixes microsoft#44068.
DanielRosenwasser
pushed a commit
that referenced
this issue
Jun 16, 2021
Component commits: d192080 Do not incorrectly add line separators for non-synthetic nodes when emitting node list As of 3c32f6e, a line separator is added between nodes if the nodes are not synthetic and on separate lines. This it push s wrong and previously only happened if the non-synthetic nodes were on different lines but had the same parent. Fixes #44068. Co-authored-by: Paul Gschwendtner <paulgschwendtner@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Fix Available
A PR has been opened for this issue
Needs Investigation
This issue needs a team member to investigate its status.
Bug Report
🔎 Search Terms
printer, line break, ts 4.3, beta, for non-synthesized nodes, line separator, new line.
🕗 Version & Regression Information
Started as of v4.3-dev.
⏯ Playground Link
Specific to the compiler API; not reproduce in the playground.
💻 Code
Reproduction repository: https://github.com/devversion/ts-4.3-emitter-node-list-line-breaks
Consider an input file as the followed:
Assume we have the AST for this source file and have access to these variables. i.e.
firstVarNode
andsecondVarNode
. If we construct a new array literal containing the names of these variables and print the array literal, the array literal will be multi-line.the output will be:
while I'd expect it to be
[FirstSymbol, SecondSymbol]
unless I specifymultiLine = true
for the array literal expression.Additional information
This seems to have changed with 3c32f6e. The printer now checks if the non-synthesized nodes are on the same line, even if they do not have the same parent.
The text was updated successfully, but these errors were encountered: