Hi,
I wonder what this error mean. What is exactly the name of a program ? Could I set it in a sort of automatic way if it's not set ?
Thank you for your answer.
/ David Gourdelier
It probably means that the function nameof() in the encoder failed to find the name of the program you tried to encode.
/ Marcus Agehall (Scanian)
Previous text:
2004-04-07 12:25: Subject: Can't encode value: Failed to find name of program
Hi,
I wonder what this error mean. What is exactly the name of a program ? Could I set it in a sort of automatic way if it's not set ?
Thank you for your answer.
/ David Gourdelier
/ Brevbäraren
Actually my problem is:
program p = compile_file("/home/david/scripts/wrap_lines.pike"); p;
(7) Result: wrap_lines.pike
master()->Codec()->nameof(p);
Failed to find name of program inherit.pike. /usr/local/pike/7.5.23/lib/master.pike:3908: master()->Codec()->nameof(inherit.pike,0)
While this works with previous version of Pike (below 7.5)
Marcus Agehall (Scanian) @ Pike (-) developers forum wrote:
It probably means that the function nameof() in the encoder failed to find the name of the program you tried to encode.
/ Marcus Agehall (Scanian)
Previous text:
2004-04-07 12:25: Subject: Can't encode value: Failed to find name of program
Hi,
I wonder what this error mean. What is exactly the name of a program ? Could I set it in a sort of automatic way if it's not set ?
Thank you for your answer.
/ David Gourdelier
/ Brevbäraren
Actually the problem is that:
program p = compile_file("/home/david/scripts/inherit.pike"); master()->Codec()->nameof(p);
Failed to find name of program inherit.pike. /usr/local/pike/7.5.23/lib/master.pike:3908: master()->Codec()->nameof(inherit.pike,0)
While the same works with Pike < 7.5.
Marcus Agehall (Scanian) @ Pike (-) developers forum wrote:
It probably means that the function nameof() in the encoder failed to find the name of the program you tried to encode.
/ Marcus Agehall (Scanian)
Previous text:
2004-04-07 12:25: Subject: Can't encode value: Failed to find name of program
Hi,
I wonder what this error mean. What is exactly the name of a program ? Could I set it in a sort of automatic way if it's not set ?
Thank you for your answer.
/ David Gourdelier
/ Brevbäraren
I get this in 7.4:
Pike v7.4 release 45 running Hilfe v3.5 (Incremental Pike Frontend)
program p = compile_file("/home/mast/foo.pike"); master()->Codec()->nameof(p);
(1) Result: "_static_modules.system"
That result is entirely bogus, so I wouldn't say that it works there.
It's not strange that the codec in 7.5 can't find the name of that program. When you use compile_file, you don't make it known to the standard resolver system. You either need to do that (say, by using a cast instead), or extend the codec to look for your program.
/ Martin Stjernholm, Roxen IS
Previous text:
2004-04-07 13:47: Subject: Re: Can't encode value: Failed to find name of program
Actually the problem is that:
program p = compile_file("/home/david/scripts/inherit.pike"); master()->Codec()->nameof(p);
Failed to find name of program inherit.pike. /usr/local/pike/7.5.23/lib/master.pike:3908: master()->Codec()->nameof(inherit.pike,0)
While the same works with Pike < 7.5.
Marcus Agehall (Scanian) @ Pike (-) developers forum wrote:
It probably means that the function nameof() in the encoder failed to find the name of the program you tried to encode.
/ Marcus Agehall (Scanian)
Previous text:
2004-04-07 12:25: Subject: Can't encode value: Failed to find name of program
Hi,
I wonder what this error mean. What is exactly the name of a program ? Could I set it in a sort of automatic way if it's not set ?
Thank you for your answer.
/ David Gourdelier
/ Brevbäraren
/ Brevbäraren
Speaking of compile_file() and cast_to_program(), how does this work in pike?
Where is the caching of programs done when casting and can the caching be "undone" so that a new version of a program may be loaded?
/ Marcus Agehall (Scanian)
Previous text:
2004-04-08 13:44: Subject: Re: Can't encode value: Failed to find name of program
I get this in 7.4:
Pike v7.4 release 45 running Hilfe v3.5 (Incremental Pike Frontend)
program p = compile_file("/home/mast/foo.pike"); master()->Codec()->nameof(p);
(1) Result: "_static_modules.system"
That result is entirely bogus, so I wouldn't say that it works there.
It's not strange that the codec in 7.5 can't find the name of that program. When you use compile_file, you don't make it known to the standard resolver system. You either need to do that (say, by using a cast instead), or extend the codec to look for your program.
/ Martin Stjernholm, Roxen IS
compile_file doesn't cache (I think). Caching is done in the master.
/ Martin Nilsson (provokatör)
Previous text:
2004-04-08 14:18: Subject: Re: Can't encode value: Failed to find name of program
Speaking of compile_file() and cast_to_program(), how does this work in pike?
Where is the caching of programs done when casting and can the caching be "undone" so that a new version of a program may be loaded?
/ Marcus Agehall (Scanian)
That is right, compile_file() does not cache. If caching is done in the master, I have to check my code to see why it doesn't work.. Probably missed to clear the program from some mapping...
/ Marcus Agehall (Scanian)
Previous text:
2004-04-08 14:22: Subject: Re: Can't encode value: Failed to find name of program
compile_file doesn't cache (I think). Caching is done in the master.
/ Martin Nilsson (provokatör)
In the mapping "programs", to be precise.
Note that the reverse lookup code assumes that mapping never shrinks, so if elements are removed it's necessary to fix rev_programs too. The best way is of course to add a function to the master that handles this.
/ Martin Stjernholm, Roxen IS
Previous text:
2004-04-08 14:22: Subject: Re: Can't encode value: Failed to find name of program
compile_file doesn't cache (I think). Caching is done in the master.
/ Martin Nilsson (provokatör)
pike-devel@lists.lysator.liu.se