Hey,
Inside Caudium 1.3, I have some code like this :
Caudium.pmod/HTTP.pmod
the top level directory where Caudium.pmod is added to Pike Module Path
Inside HTTP.pmod I have :
string make_html_doc_string () { return "foo"; }
Somewhere in this code I have
string plonk () { return Caudium.HTTP.make_html_doc_string(); }
On Pike 7.4.10 this works like a charm. On 7.4.14 and more this fails with :
Loading Caudium ... error: /${PIKE_MODULE_PATH}/Caudium.pmod/HTTP.pmod:205 Error: Index 'make_htmldoc_string' not present in module 'HTTP'.
I really suspect a bug somewhere inside the Pike 7.4 code but I cannot find where it is located.
Any clues ???
Note that reverting to Pike 7.4.10 fixes the problem....
/Xavier
-- Xavier Beaudouin - Unix System Administrator & Projects Leader. Please visit http://caudium.net/, home of Caudium & Camas projects O ascii ribbon campaign against html email |\ and Microsoft attachments
It'd be really nice if you could isolate the problem into a self-contained test case.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-03-04 22:49: Subject: Pike 7.4.10 vs Pike >= 7.4.14
Hey,
Inside Caudium 1.3, I have some code like this :
Caudium.pmod/HTTP.pmod
the top level directory where Caudium.pmod is added to Pike Module Path
Inside HTTP.pmod I have :
string make_html_doc_string () { return "foo"; }
Somewhere in this code I have
string plonk () { return Caudium.HTTP.make_html_doc_string(); }
On Pike 7.4.10 this works like a charm. On 7.4.14 and more this fails with :
Loading Caudium ... error: /${PIKE_MODULE_PATH}/Caudium.pmod/HTTP.pmod:205 Error: Index 'make_htmldoc_string' not present in module 'HTTP'.
I really suspect a bug somewhere inside the Pike 7.4 code but I cannot find where it is located.
Any clues ???
Note that reverting to Pike 7.4.10 fixes the problem....
/Xavier
-- Xavier Beaudouin - Unix System Administrator & Projects Leader. Please visit http://caudium.net/, home of Caudium & Camas projects O ascii ribbon campaign against html email |\ and Microsoft attachments
/ Brevbäraren
Le mardi, 4 mar 2003, à 22:55 Europe/Paris, Martin Stjernholm, Roxen IS @ Pike developers forum a écrit :
It'd be really nice if you could isolate the problem into a self-contained test case.
No problems.
kiwi@blackmagic:~/tmp/test$ pike --version Pike v7.4 release 10 Copyright © 1994-2002 Linköping University Pike comes with ABSOLUTELY NO WARRANTY; This is free software and you are welcome to redistribute it under certain conditions; Read the files COPYING and COPYRIGHT in the Pike distribution for more details. kiwi@blackmagic:~/tmp/test$ pike -M. t.pike Pof.id "Test1" Pof.Plonk.bingo("1") "1-pof" Pof.Plonk.pof() ""
kiwi@kiwi:~/tmp/test$ pike --version Pike v7.4 release 15 Copyright © 1994-2002 Linköping University Pike comes with ABSOLUTELY NO WARRANTY; This is free software and you are welcome to redistribute it under certain conditions; Read the files COPYING and COPYRIGHT in the Pike distribution for more details. kiwi@kiwi:~/tmp/test$ pike -M. t.pike Pof.pmod/Plonk.pmod:2:Index 'bingo' not present in module 'Plonk'. Pof.pmod/Plonk.pmod:16:Index 'zorgl' not present in module 'Plonk'. t.pike:6:Index 'Plonk' not present in module 'Pof'. t.pike:8:Index 'Plonk' not present in module 'Pof'. Pike: Failed to compile script: Compilation failed.
Source code :
kiwi@kiwi:~/tmp/test$ cat t.pike
int main() {
write("Pof.id %O\n",Pof.id);
write("Pof.Plonk.bingo("1") %O\n",Pof.Plonk.bingo("1"));
write("Pof.Plonk.pof() %O\n",Pof.Plonk.pof());
return 0; }
kiwi@kiwi:~/tmp/test$ cat Pof.pmod/module.pmod
constant id="Test1";
kiwi@kiwi:~/tmp/test$ cat Pof.pmod/Plonk.pmod string pof() { return Pof.Plonk.bingo(""); }
string zorgl(string test) {
return test + "-pof";
}
string bingo (string test2) {
if(test2=="1") return Pof.Plonk.zorgl(test2);
return "";
}
So it seems we have a bug...
On pike 7.4.10, it resolv the function Pof.Plonk.bingo() that is defined *after* it calls, but on 7.4.15 it doesn't.
Notice that using the internal name fixes that (temporaly) but it seems that either 7.4.10 or 7.4.15 has some differents way to handle that.
What do you think of that ?
/Xavier -- Xavier Beaudouin - Unix System Administrator & Projects Leader. Please visit http://caudium.net/, home of Caudium & Camas projects O ascii ribbon campaign against html email |\ and Microsoft attachments
Thanks. I've minimized it a bit more and added it to the testsuite. I suspect however that it might be a "mistake" that it ever worked (it doesn't in 7.2).
/ Martin Stjernholm, Roxen IS
Previous text:
2003-03-04 23:40: Subject: Re: Pike 7.4.10 vs Pike >= 7.4.14
Le mardi, 4 mar 2003, à 22:55 Europe/Paris, Martin Stjernholm, Roxen IS @ Pike developers forum a écrit :
It'd be really nice if you could isolate the problem into a self-contained test case.
No problems.
kiwi@blackmagic:~/tmp/test$ pike --version Pike v7.4 release 10 Copyright © 1994-2002 Linköping University Pike comes with ABSOLUTELY NO WARRANTY; This is free software and you are welcome to redistribute it under certain conditions; Read the files COPYING and COPYRIGHT in the Pike distribution for more details. kiwi@blackmagic:~/tmp/test$ pike -M. t.pike Pof.id "Test1" Pof.Plonk.bingo("1") "1-pof" Pof.Plonk.pof() ""
kiwi@kiwi:~/tmp/test$ pike --version Pike v7.4 release 15 Copyright © 1994-2002 Linköping University Pike comes with ABSOLUTELY NO WARRANTY; This is free software and you are welcome to redistribute it under certain conditions; Read the files COPYING and COPYRIGHT in the Pike distribution for more details. kiwi@kiwi:~/tmp/test$ pike -M. t.pike Pof.pmod/Plonk.pmod:2:Index 'bingo' not present in module 'Plonk'. Pof.pmod/Plonk.pmod:16:Index 'zorgl' not present in module 'Plonk'. t.pike:6:Index 'Plonk' not present in module 'Pof'. t.pike:8:Index 'Plonk' not present in module 'Pof'. Pike: Failed to compile script: Compilation failed.
Source code :
kiwi@kiwi:~/tmp/test$ cat t.pike
int main() {
write("Pof.id %O\n",Pof.id);
write("Pof.Plonk.bingo("1") %O\n",Pof.Plonk.bingo("1"));
write("Pof.Plonk.pof() %O\n",Pof.Plonk.pof());
return 0; }
kiwi@kiwi:~/tmp/test$ cat Pof.pmod/module.pmod
constant id="Test1";
kiwi@kiwi:~/tmp/test$ cat Pof.pmod/Plonk.pmod string pof() { return Pof.Plonk.bingo(""); }
string zorgl(string test) {
return test + "-pof";
}
string bingo (string test2) {
if(test2=="1") return Pof.Plonk.zorgl(test2);
return "";
}
So it seems we have a bug...
On pike 7.4.10, it resolv the function Pof.Plonk.bingo() that is defined *after* it calls, but on 7.4.15 it doesn't.
Notice that using the internal name fixes that (temporaly) but it seems that either 7.4.10 or 7.4.15 has some differents way to handle that.
What do you think of that ?
/Xavier
Xavier Beaudouin - Unix System Administrator & Projects Leader. Please visit http://caudium.net/, home of Caudium & Camas projects O ascii ribbon campaign against html email |\ and Microsoft attachments
/ Brevbäraren
Why wouldn't it work? Because of the self-reference?
It works nicely enough in my 7.5...
/ Mirar
Previous text:
2003-03-05 00:34: Subject: Re: Pike 7.4.10 vs Pike >= 7.4.14
Thanks. I've minimized it a bit more and added it to the testsuite. I suspect however that it might be a "mistake" that it ever worked (it doesn't in 7.2).
/ Martin Stjernholm, Roxen IS
Le mercredi, 5 mar 2003, à 08:20 Europe/Paris, Mirar @ Pike developers forum a écrit :
Why wouldn't it work? Because of the self-reference?
It works nicely enough in my 7.5...
I am asking myself why it doesn't... It had worked on my 7.4.10, but on recent pikes it doesn't. BTW the pikefarm show us that it has stopped to works...
/Xavier
Yes, it seems to have stopped working recently. I have a few weeks old Pike installed. In the most recent it does no longer work.
What was the "mistake" and what is the reason it shouldn't work?
/ Mirar
Previous text:
2003-03-05 11:14: Subject: Re: Pike 7.4.10 vs Pike >= 7.4.14
Le mercredi, 5 mar 2003, à 08:20 Europe/Paris, Mirar @ Pike developers forum a écrit :
Why wouldn't it work? Because of the self-reference?
It works nicely enough in my 7.5...
I am asking myself why it doesn't... It had worked on my 7.4.10, but on recent pikes it doesn't. BTW the pikefarm show us that it has stopped to works...
/Xavier
/ Brevbäraren
Note the quotes around "mistake". It's just that I don't think any conscious effort ever has been done to handle absolute references in a module to itself. It just happened to start working because of some other change. Maybe the cyclic check got more relaxed than is really healthy somewhere in 7.3 and when that was fixed this case stopped working again. I don't really know; I haven't yet had the time to look into it.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-03-05 08:18: Subject: Re: Pike 7.4.10 vs Pike >= 7.4.14
Why wouldn't it work? Because of the self-reference?
It works nicely enough in my 7.5...
/ Mirar
pike-devel@lists.lysator.liu.se