There is at least one issue with the new warning (refering to the discussion going on here:
viewtopic.php?f=2&t=20928&p=172636)
Setup a custom column with a script like this:
Code: Select all
include_once 'lib.inc.xys';
return f1();
The
lib.inc.xys-file:
Run the following script-file:
test.xys (e.g. by passing
::load 'test.xys'
in the address-bar)
Suprisingly copying this code into Scripting > Run Script does not trigger the warning
Code: Select all
include_once "lib.inc.xys";
"Test"
f1();
#1001; //refresh
The Column as such is working as expected, but when the list gets refreshed by the
#1001;
it looks like the column script is run in the context of test.xys-file, complaining about the allready defined function.
The Warning pops multiple times (the same amount as files are in the list):
- xy-function-warning.png (3.94 KiB) Viewed 2249 times
It would really help debugging when there is some kind of stack-trace/include-tree in the warning to locate the redefinition and source-definition. (took me some time to figure out that the warning was raised from a column-script)
There may be a really simple solution to decide when to raise the warning that covers all include/load scenarios:
Compare the function-definition and silently ignore later definitions if they are equal, as honoring them would make no difference either.