How to locate cause of deprecation warning?

119 views
Skip to first unread message

Josef Sachs

unread,
Jun 16, 2016, 6:56:32 AM6/16/16
to julia...@googlegroups.com
What is the easiest way for me to locate in the source code
the cause of a depraction warning? Some deprecation warnings
actually give the file name and line number.

AWS-Sachs-Ubuntu$ usr/bin/julia -e "using Gallium"
INFO: Recompiling stale cache file /home/sachs/.julia/lib/v0.5/Gallium.ji for module Gallium.

WARNING: deprecated syntax "[a=>b for (a,b) in c]".
Use "Dict(a=>b for (a,b) in c)" instead.

daycaster

unread,
Jun 16, 2016, 10:42:36 AM6/16/16
to julia-users
Have you discovered the joys of Lint.jl ? (https://github.com/tonyhffong/Lint.jl). I've found it pretty useful in the past, although I don't know how up to date it is at the moment.

Josef Sachs

unread,
Jun 16, 2016, 11:17:40 AM6/16/16
to julia...@googlegroups.com
>>>>> On Thu, 16 Jun 2016 04:34:36 -0700 (PDT), <dayc...@icloud.com> said:

> Have you discovered the joys of Lint.jl ? (https://github.com/tonyhffong/Lint.jl). I've found it pretty useful in the past, although I don't know how up to date it is at the moment.

I've been meaning to try it, but didn't get around to it until now.

It appears that Lint.jl does not currently support v0.5.
Too early to submit a GitHub issue for that?

I should probably submit a feature request (GitHub issue) for
syntax deprecations to report file names and line numbers.

Tony Kelman

unread,
Jun 16, 2016, 1:30:11 PM6/16/16
to julia-users, sa...@cyb.org
Deprecation warnings are supposed to be reporting filename and line number, I think anywhere they don't is likely a bug.

Tim Holy

unread,
Jun 16, 2016, 2:48:18 PM6/16/16
to julia...@googlegroups.com
Many of them do already, but there are still some holes. If you have a clear
example where it fails to print a line number, that would make a great issue.

In some circumstances https://github.com/timholy/
DebuggingUtilities.jl#test_showline might be helpful?

--Tim
Reply all
Reply to author
Forward
0 new messages