Robert J. Budzynski triggerd the following error when loading a pmod file:
Pike v7.7 release 34 running Hilfe v3.5 (Incremental Pike Frontend)
object foo =Local.PiXPull();
Compiler Error: 1:Error looking up 'PiXPull' in module 'Local'. Compiler Exception: Cast "/local/users/mbaehr/tomoyo/pike_modules/PiXPull" to program failed in "/local/users/mbaehr/tomoyo/src/pike/Pike-7.7/lib/modules/Local.pmod". src/pike/Pike-7.7/lib/master.pike:1175: master()->cast_to_program("/local/users/mbaehr/tomoyo/pike_modules/PiXPull ","/local/users/mbaehr/tomoyo/src/pike/Pike-7.7/lib/modules/Local.pmod",UN DEFINED) src/pike/Pike-7.7/lib/modules/Local.pmod:34: Local->`[]("PiXPull")
i found a fix, which i hope is right, commited to 7.7
however the error is also present in 7.6, so someone with the confidence to make changes to the stable tree, please backport it.
greetings, martin.
The backtrace should probably not be hidden. Instead you should stat the file and then try to compile it I think.
but that requires the assumption that .pike is the extension.
which is of course right almost all the time but someone could overload the master and add a different extension (like i did with nessie), and then the stat would fail, while the cast to program would still work.
but you are right, just hiding the error is not nice either, should selectively handle the lookup error, and rethrow any others
greetings, martin.
pike-devel@lists.lysator.liu.se