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 trans macro #38

Merged
merged 1 commit into from
Dec 13, 2016
Merged

Fix trans macro #38

merged 1 commit into from
Dec 13, 2016

Conversation

andreasnoack
Copy link
Contributor

The macro behavior has been fixed in Julia master which broke the package.

@bicycle1885
Copy link
Member

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)
Copy link
Contributor

Choose a reason for hiding this comment

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

Also from and to.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@bicycle1885
Copy link
Member

Thank you, @yuyichao. Travis CI failed on Linux (Julia 0.4) but it is not relevant to this change.

@vtjnash
Copy link

vtjnash commented Dec 20, 2016

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 😄)

@bicycle1885
Copy link
Member

@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 😉

bicycle1885 pushed a commit to bicycle1885/Libz.jl that referenced this pull request Dec 20, 2016
bicycle1885 pushed a commit that referenced this pull request Dec 20, 2016
@bicycle1885
Copy link
Member

Tagged: JuliaLang/METADATA.jl#7361

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.

4 participants