Skip to content

Fix debugInitCall #1543

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

Merged
merged 1 commit into from
May 1, 2023
Merged

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Apr 14, 2023

I broke debugInitCall when I removed the custom mirrors for syntax nodes. Fix it again, also fixing some more issues along the way that previously caused us to generate Swift code that didn’t compile.

@ahoppen ahoppen force-pushed the ahoppen/fix-debuginitcall branch from 09f9c9b to f1f846b Compare April 15, 2023 20:56
@ahoppen ahoppen changed the title Fix debugInitCall 🚥 #1539 Fix debugInitCall Apr 15, 2023
@ahoppen
Copy link
Member Author

ahoppen commented Apr 15, 2023

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Apr 15, 2023

@swift-ci Please test Windows

1 similar comment
@ahoppen
Copy link
Member Author

ahoppen commented Apr 15, 2023

@swift-ci Please test Windows

@ahoppen ahoppen force-pushed the ahoppen/fix-debuginitcall branch from f1f846b to c017cfd Compare April 16, 2023 02:10
@ahoppen
Copy link
Member Author

ahoppen commented Apr 16, 2023

@swift-ci Please test

@kimdv
Copy link
Contributor

kimdv commented Apr 16, 2023

@swift-ci please test windows

Copy link
Contributor

@bnbarham bnbarham left a comment

Choose a reason for hiding this comment

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

I'd personally prefer not having the runtime hackery by making the assumption that SyntaxChildChoices is within a type and then:

  1. Not supporting printing SyntaxChildChoices directly (can override to print something to that effect)
  2. Pass down the parent type name when making the recursive call

But it's just a debug call and only in _SwiftSyntaxTestSupport so I don't feel super strongly about that. Any thoughts @rintaro?

I broke `debugInitCall` when I removed the custom mirrors for syntax nodes. Fix it again, also fixing some more issues along the way that previously caused us to generate Swift code that didn’t compile.
@ahoppen ahoppen force-pushed the ahoppen/fix-debuginitcall branch from c017cfd to 6017000 Compare April 29, 2023 01:11
@ahoppen
Copy link
Member Author

ahoppen commented Apr 29, 2023

I found a fairly elegant solution without calling into the runtime.

@ahoppen
Copy link
Member Author

ahoppen commented Apr 29, 2023

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented Apr 29, 2023

@swift-ci Please test Windows

@bnbarham
Copy link
Contributor

I found a fairly elegant solution without calling into the runtime.

Ah, I forgot we had parent :)

@ahoppen
Copy link
Member Author

ahoppen commented Apr 29, 2023

@swift-ci Please test Windows

@ahoppen
Copy link
Member Author

ahoppen commented Apr 29, 2023

@swift-ci Please test macOS

@ahoppen ahoppen merged commit 3c095d1 into swiftlang:main May 1, 2023
@ahoppen ahoppen deleted the ahoppen/fix-debuginitcall branch May 1, 2023 21:23
@ahoppen ahoppen mentioned this pull request May 1, 2023
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.

3 participants