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

Error printing for-loop scoping deprecation message #27870

Closed
mbauman opened this issue Jun 29, 2018 · 7 comments
Closed

Error printing for-loop scoping deprecation message #27870

mbauman opened this issue Jun 29, 2018 · 7 comments
Labels
deprecation This change introduces or involves a deprecation logging The logging framework

Comments

@mbauman
Copy link
Member

mbauman commented Jun 29, 2018

Didn't this use to print a nice warning or error about the need for a global i inside the for loop body?

julia> i = 1; for _ in 1:1; i += i; end
Exception handling log message: MethodError(print, (IOBuffer(data=UInt8[...], readable=true, writable=true, seekable=true, append=false, size=2, maxsize=Inf, ptr=3, mark=-1), nothing), 0xffffffffffffffff)
@mbauman mbauman added deprecation This change introduces or involves a deprecation logging The logging framework labels Jun 29, 2018
@mbauman
Copy link
Member Author

mbauman commented Jun 29, 2018

Likely culprit: #27829. cc: @JeffBezanson

@vtjnash
Copy link
Member

vtjnash commented Jun 29, 2018

Why is that throwing a MethodError? Are we miscompiling something? print should have at least some definition for all types.

@yuyichao
Copy link
Contributor

print should have at least some definition for all types.

Not anymore after #27829 .....

@JeffBezanson
Copy link
Member

It now throws a MethodError on nothing. We could change that to a different kind of error if we want though.

@JeffBezanson
Copy link
Member

What I really want to know is why some logging code is trying to print nothing.

@fredrikekre
Copy link
Member

What I really want to know is why some logging code is trying to print nothing.

The module argument sometimes becomes nothing, I guess when it can't be determined for some reason. Incidentally I opened #27792 before print(nothing) was removed. Perhaps that will help a bit here at least? Perhaps it might also be that the file argument becomes nothing?

@JeffBezanson
Copy link
Member

Fixed by #27792

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation This change introduces or involves a deprecation logging The logging framework
Projects
None yet
Development

No branches or pull requests

5 participants