Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote:
Ideally, modules dumped by Pike should be decoded by Pike's codec, not the Roxen one. Is there no support for switching codecs when resolving dependencies?
I'm not sure that this will fix the problem.
As far as my limited understanding of the problem thus far can tell me: - werror() appears to be a Pike builtin function. - Therefore it compiles into a different bytecode especially reserved for builtins. - Therefore, dumping a module at Pike install time (because it's a Pike lib) will cause the bytecode for builtins to be used. - Hence, any attempt to cause werror() to be overloaded with a different function (roxen_werror()) just by changing the load/link order will fail miserably, since it then needs an opcode that addresses a user-defined function instead of a builtin. - But, since this is in a Pike lib, we do *not* want to have to redump the module using a different dumper or recompile it. Pike should be able to be preinstalled on a system where you add Roxen/ChiliMoon later.
So, IMO, the simplest solution would be to do what C does to solve this: Create a _werror() which is the actual builtin, then use a normal werror() definition which simply calls _werror() in the standard lib, and allow this werror() to be overridden by roxen_werror().
Or is this a wrong/too simplistic account of situation?