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

Print filename and line number for deprecation warnings #11311

Merged
merged 1 commit into from
May 17, 2015

Conversation

yuyichao
Copy link
Contributor

Added one c global variable so #10421 needs to be updated accordingly.

@vtjnash
Fix #11050

@vtjnash
Copy link
Sponsor Member

vtjnash commented May 17, 2015

lgtm

@yuyichao
Copy link
Contributor Author

Hmm, somehow the backtrace printed is also longer now.

@yuyichao
Copy link
Contributor Author

Hmm, somehow the backtrace printed is also longer now.

Ahh, everything is fine... This happens because my system installation has debug symbol striped (into a debug package) while the version I am testing is not striped...

I bet it treat those functions as fromC when it fails to get the symbol name....

@yuyichao
Copy link
Contributor Author

So with a striped sys.so, this is the output of the script I had in #11050 .

WARNING: int32(x) is deprecated, use Int32(x) instead.
 in int32 at ./deprecated.jl:33
 in include_from_node1 at ./loading.jl:134
while loading /home/yuyichao/tmp/test_deprecated.jl, in expression starting on line 3
WARNING: int64(x) is deprecated, use Int64(x) instead.
 in int64 at ./deprecated.jl:33
 in f at /home/yuyichao/tmp/test_deprecated.jl:6
 in include_from_node1 at ./loading.jl:134
while loading /home/yuyichao/tmp/test_deprecated.jl, in expression starting on line 9
ERROR: LoadError: 
 in error at ./error.jl:22
 in include_from_node1 at ./loading.jl:134
while loading /home/yuyichao/tmp/test_deprecated.jl, in expression starting on line 11

@lindahua
Copy link
Contributor

+1

timholy added a commit that referenced this pull request May 17, 2015
Print filename and line number for deprecation warnings
@timholy timholy merged commit 937f79e into JuliaLang:master May 17, 2015
@timholy
Copy link
Sponsor Member

timholy commented May 17, 2015

This will be a very nice improvement!

@tkelman
Copy link
Contributor

tkelman commented May 17, 2015

this is great, thanks!

@tkelman
Copy link
Contributor

tkelman commented May 17, 2015

We should probably add a test for depwarn in test/misc.jl, I don't see one there yet

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.

Deprecation warning for global scope does not have filename/lineno info
5 participants