http://helma.org/bugs/show_bug.cgi?id=654 Summary: Extension on repository object gets lost after recompile
of code
Product: Helma
Version: CVS trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P1
Component: Generic/Other
AssignedTo:
helma-dev@...
ReportedBy:
interface@...
I have the following (condensed) code in one of my apps:
Global.js
---------
app.addRepository("modules/helma/Mail.js");
helma.Mail.foo = function() {
return "bar";
}
Root.prototype.main_action = function() {
res.debug(helma.Mail.foo);
res.debug(app.repositories.join("<br />"));
}
Loading the URL /test/main in the browser right after (re)start of the
application I get:
function () { return "bar"; }
FileRepository[/Users/tobi/Projects/helma/./apps/test/repositories]
SingleFileRepository[/Users/tobi/Projects/helma/modules/helma/Mail.js]
SingleFileRepository[/Users/tobi/Projects/helma/modules/helma/File.js]
I then (edit and) save the Global.js and after Helma recompiling its code I get
for the same URL:
undefined
FileRepository[/Users/tobi/Projects/helma/./apps/test/repositories]
SingleFileRepository[/Users/tobi/Projects/helma/modules/helma/Mail.js]
SingleFileRepository[/Users/tobi/Projects/helma/modules/helma/File.js]
Thus, the extension of helma.Mail with the "foo" method got lost.
This is particularly annoying when updating running installations with version
control because one simple change in a global file causes ugly errors and a
restart of the application is required.
As I spotted this behaviour just recently (it hardly would have happened
unnoticed as I in fact do subversion updates all the time) I suspect this must
be related to a recent change, e.g. in revision 9305 [1].
Is there a chance to solve the issue revision 9305 was committed for *and* make
the code above working reliably again?
--
[1]
http://dev.helma.org/trac/helma/changeset/9305--
Configure bugmail:
http://helma.org/bugs/userprefs.cgi?tab=email------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev