Re: Updating a JavaScript module (jsm)

Axel <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xpfe
Message-ID <[email protected]>
This may help you : https://developer.mozilla.org/en/setting_up_extension_development_environment#Development_command_flags

However, I m still surprised by the way they "fixed" this problem : by adding another setting. There are already preferences for disabling the cache (JS preference), but they are not used for this use case, so they added another preference in another preference source (command line).
In my opinion this is not the way to go to create an efficient & developer-friendly software development platform :/

Le 23 août 2011 à 21:30, Michael Hofer a écrit :

> I'm having the same problem as Georg 2 years ago (see unanswered post below) since I upgraded from xulrunner 1.9.2 to 2.0.
> 
> I can't effectively update my JSM modules anymore. I'm importing the modules with
> 
>  Components.utils.import("resource://...")
> 
> from different places in my code (from xbl or regular js files). But the modules seem to be cached somewhere in between restarts of xulrunner (Where?). Changes in the JSM are ignored. I can even delete the .jsm-Files and everything still works. (Changing the resource file name in the import command to some unknown filename DOES give an error -> so the import statement is executed.)
> 
> "nglayout.debug.disable_xul_cache" and "nglayout.debug.disable_xul_fastload" are set to true.
> 
> (I'm on Mac OS X, installed via --install-app and replaced the Resources directory with a symlink to my development source. This setup worked fine before 2.0.)
> 
> Any ideas?
> 
> regards,
> Michael
> 
> Am 01.11.09 20:01, schrieb Georg Maaß:
>> Hi,
>> 
>> I'm not sure whether my Question belongs to the JavaScript engine or to
>> XulRunner.
>> 
>> When updating a JavaScript module (jsm file) of a XulRunner application
>> (not of XulRunner it self) what must be done to make it work? Is this
>> similar to components, where I have to touch a magic .autoreg file, or
>> is there an other mechanism for JavaScript modules?
>> 
>> Updating the file and just restarting the application is not enough. The
>> application still sees the old implementation of the JavaScript module.
>> So the cache seems to live longer than XulRunner is running. Touching
>> the .autoreg files does not help.
>> 
>> Updating the file and replacing XulRunner with a different nightly of
>> Xulrunner and then starting the application works, but this is probably
>> not the official way. So what is the official way to update a JavaScript
>> module?
>> 
>> How do you make your changes during development take effect?
>> _______________________________________________
>> dev-tech-xul mailing list
>> [email protected]
>> https://lists.mozilla.org/listinfo/dev-tech-xul
> 
> _______________________________________________
> dev-tech-xul mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-xul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.