-
Notifications
You must be signed in to change notification settings - Fork 440
Improved diagnostics for misplaced AttributeList in variable declaration #1383
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
Improved diagnostics for misplaced AttributeList in variable declaration #1383
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, Felix. Just a few minor comments but overall this looks very good to me.
Und viele Grüße aus Cupertino an CocoaHeads Aachen 🎉
|
||
DeclSyntax( | ||
""" | ||
public init(arena: SyntaxArena? = nil) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I think it would be better if all nodes created by a SyntaxRewriter
live in the same SyntaxArena
. Creating a SyntaxArena
is fairly costly because it creates a new bump pointer allocator and it’s a waste to create a new one for every node. So, what I’m saying is that arena
can be non-optional and this could be
public init(arena: SyntaxArena? = nil) { | |
public init(arena: SyntaxArena = SyntaxArena()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that, but unfortunately the tests are failing. The MacroApplication
SyntaxRewriter crashes internally with Precondition failed: an arena can't have a new child once it's owned by other arenas
@swift-ci Please test |
ac1f92d
to
61a4c7d
Compare
@swift-ci Please test |
The SwiftSyntaxBuilder tests were failing, I fixed the part I could. They are still failing on my machine with some really weird error messages, but maybe this is already known? |
0af142b
to
de6735d
Compare
@swift-ci Please test |
de6735d
to
ee56a3b
Compare
Picking this up. Rebased on |
@swift-ci Please test |
ee56a3b
to
b6f45b7
Compare
@swift-ci Please test |
@swift-ci Please test Windows |
Previously the error messages for this code were quite bad. Now they are great!
Part of this PR are some minor changes:
Best regards from Cocoaheads 😉