You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's a contrived example that demonstrates this. Let's say I have a file called log with the following:
#
#
parse("#\n;rand(3,1)[1:]")
If I run julia log I get this warning:
WARNING: deprecated syntax "x[i:]" at /home/dluu/dev/dump/fuzz/sandbox/parse-eval/log:2.
Use "x[i:end]" instead.
It says this happens on line 2 instead of line 3 of log because it's line 2 of the parse block, and I happen to be running the file log. It's pretty easy to figure out what happened in this contrived case, but that may not be true for larger cases.
Also, this is happening when I run a script that does eval(parse(...)) on random functions, without ever explicitly indexing into anything. It seems that parsing a function that produces an error/warning with parse inside log points to log instead of whatever file the bad function is defined in. I'm not 100% sure that's what's happening, but I suppose I can write a couple of functions to check this pretty easily.
I can see an argument for not specify the file that's the root cause of the error, but I believe it makes tracking down this type of thing more difficult a lot of the time.
The text was updated successfully, but these errors were encountered:
My reading of this issue is that you would want the line location of the parse method call to be propagated in the warning when calling the parse method at runtime. I don't see a reasonable way to do this so I'm going to close this issue.
Here's a contrived example that demonstrates this. Let's say I have a file called
log
with the following:If I run
julia log
I get this warning:It says this happens on line 2 instead of line 3 of log because it's line 2 of the parse block, and I happen to be running the file
log
. It's pretty easy to figure out what happened in this contrived case, but that may not be true for larger cases.Also, this is happening when I run a script that does
eval(parse(...))
on random functions, without ever explicitly indexing into anything. It seems that parsing a function that produces an error/warning withparse
insidelog
points tolog
instead of whatever file the bad function is defined in. I'm not 100% sure that's what's happening, but I suppose I can write a couple of functions to check this pretty easily.I can see an argument for not specify the file that's the root cause of the error, but I believe it makes tracking down this type of thing more difficult a lot of the time.
The text was updated successfully, but these errors were encountered: