-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Deprecation warning doesn't show line number #13457
Comments
Here is another example: I'm trying to fix these deprecation warnings for ExcelReaders.jl. I have removed all use of pure |
I think there might be a real bug hidden in this as well, not just an inconvenience. When I checkout the errordiag branch from the ExcelReaders package, and then run the test suite, I get this output:
The relevant code that prints the diagnostic info is this: println("file is of type $(typeof(file))")
println("filename is of type $(typeof(filename))")
println("STEP 1")
for f in [file, filename]
println("STEP 2") So somehow the for loop line here seems to trigger the deprecation warning, which makes no sense to me. Am I missing something very obvious here, or is there some real bug hidden here somewhere? But in any case, this whole situation makes it almost impossible to fix these deprecation warnings, since one hardly stands a chance to find the root cause. @StefanKarpinski Can we add this to the 0.4.0 milestone for now? I think this should be at least investigated/decided before a 0.4 is released. |
A quick hack ( which doesn't get you the line number but does get you the Julia source file )
Then when you do |
@mdcfrancis When I execute your code on the REPL as written I get
I also tried it without the type annotation for But then, ExcelReaders is just one file, so I'm not sure this is the right strategy. |
Yes that's correct - this is 'Monkey patching' the routine which julia uses for loading data - you will see no output for modules which are pre-compiled. But for example I get the following with Logging
|
I deleted the This seems like an issue that a lot of package devs will run into, and probably a better way around this is to just make this warning spit out a filename and a line number, right? |
100% agree, especially given that so many packages have not been updated. What you will find though is that once you have the file with the depricated it is quick to find the line with a grep. So in the example above sll those warnings come from the one file, in the multiple file case the warnings will be located with each file. |
Try |
@jiahao that sounds good, but also does nothing on my machine. Still same warnings, no errors thrown. |
Windows?
|
@ihnorton Yes, I posted the full |
By looking at a recent travis log it appears that many of these AbstractString errors are coming from the DataArrays package so maybe do a PR to get that fixed? I noticed quite a few from |
Hmmm on master/OSX |
@davidanthoff I made you a list using #13462 😄 https://gist.github.com/ihnorton/3a9ff6bf210028264532 |
Fixed by #13462. |
Thanks! |
I have an existing project, and when I run it on julia 0.4 RC4 I just get lots and lots of
messages with no indication where that is occurring. Very difficult to find the real culprit in that case.
I did dig a lot now, and here is the minimal repo case:
Pkg.add("Mimi")
using Mimi
Now, I will obviously fix this in Mimi, but the complete lack of line numbers in the deprecation warning here is not ideal.
This is on RC4,
versioninfo()
:The text was updated successfully, but these errors were encountered: