Skip to content
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

fix #34080, regression in printing qualified macro calls #34081

Merged
merged 1 commit into from
Dec 12, 2019

Conversation

JeffBezanson
Copy link
Sponsor Member

fix #34080

@JeffBezanson JeffBezanson added bugfix This change fixes an existing bug display and printing Aesthetics and correctness of printed representations of objects. backport 1.3 labels Dec 12, 2019
Copy link
Member

@c42f c42f left a comment

Choose a reason for hiding this comment

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

Looks great to me.

print(io, arg1.args[1])
print(io, ").")
m = arg1.args[1]
if m isa Symbol || m isa GlobalRef || is_expr(m, :(.), 2)
Copy link
Member

Choose a reason for hiding this comment

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

Very minor: should we also allow m isa Module here in case people interpolate a module into the AST?

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

The previous version of the code parenthesized Modules, but I'm not sure why. I guess we'd need $ to be super accurate about it.

Copy link
Member

Choose a reason for hiding this comment

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

Good point, it would be nice to generally show the difference between purely symbolic ASTs vs ASTs which have "unusual" objects interpolated into them. Especially for things like modules which show the same way as symbols.

@KristofferC
Copy link
Sponsor Member

Doesn't backport cleanly.

@c42f
Copy link
Member

c42f commented Dec 18, 2019

@KristofferC what's the procedure to do a complex backport? PR against the backports branch?

@JeffBezanson
Copy link
Sponsor Member Author

Yes, a PR against the backports branch should be fine. Thanks for handling this!! ❤️

@KristofferC
Copy link
Sponsor Member

Can also just push directly to the backports branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug display and printing Aesthetics and correctness of printed representations of objects.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Behavior change in v1.3.0 regarding Symbol in a QuoteNode
3 participants