-
Notifications
You must be signed in to change notification settings - Fork 17
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 trans macro #38
Fix trans macro #38
Conversation
Thank you, @andreasnoack. I'd like to merge this today if no objections. |
@assert t.head == :(=>) | ||
from, to = t.args | ||
quote | ||
if $(obj).state == $(from) | ||
$(obj).state = $(to) | ||
if $(esc(obj)).state == $(from) |
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.
Also from
and to
.
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'll adjust but just to help my understanding, do you mind explaining why this version is not erroring?
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.
They are referring to globals in the macro's module instead of locals/globals in the caller scope. These happens to be the same.
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.
Thanks. I've updated the PR.
Thank you, @yuyichao. Travis CI failed on Linux (Julia 0.4) but it is not relevant to this change. |
Will there be a new METADATA release soon with this fix? (FYI, in case you haven't seen it, if you turn on AttoBot, making a release is as easy as making a GitHub tag 😄) |
@vtjnash Yeah, I will do soon. Give me a moment; now I'm writing a script to run a long-running program on a server 😉 |
Tagged: JuliaLang/METADATA.jl#7361 |
The macro behavior has been fixed in Julia master which broke the package.