maildev@lists.thunderbird.net

Thunderbird email developers

View all threads

Workflow for reloading extensions in TB68 ?

CL
Christopher Leidigh
Fri, Apr 5, 2019 2:55 AM

I'm trying to understand the correct way to reload an extension under
development.  Under the nightly build, something looks like it's cached
when I reload and see the old version output.  I've tried deleting the
extension from the profile directory which appears to work sometimes.  I'm
not sure about the consistency though.

Is there a correct and efficient way to do this?

Thanks
Christopher

I'm trying to understand the correct way to reload an extension under development. Under the nightly build, something looks like it's cached when I reload and see the old version output. I've tried deleting the extension from the profile directory which appears to work sometimes. I'm not sure about the consistency though. Is there a correct and efficient way to do this? Thanks Christopher
JK
Jörg Knobloch
Fri, Apr 5, 2019 7:28 AM

On 05/04/2019 04:55, Christopher Leidigh wrote:

I'm trying to understand the correct way to reload an extension under
development.  Under the nightly build, something looks like it's
cached when I reload and see the old version output.  I've tried
deleting the extension from the profile directory which appears to
work sometimes.  I'm not sure about the consistency though.

Is there a correct and efficient way to do this?

Hmm, the issue of so-called side-loading has some up multiple times and
we're going around in circles answering the same questions over and
over. Here a quote from dev-apps-thunderbird@lists.mozilla.org:

On 16/12/2018 09:45, Jörg Knobloch wrote:

On 16/12/2018 06:44, opto wrote:

Didn't work on addons for a few months. I seem to remember that I
only had to restart TB to pick up code changes.

Side-loading has changed. I will only pick up the changes if you touch
install.rdf.

https://bugzilla.mozilla.org/show_bug.cgi?id=1389189#c4

Also: https://bugzilla.mozilla.org/show_bug.cgi?id=1389741

And from a recent IRC conversation:

i touch rdf and the reference. For some reason i have to do both,
though touching just the rdf file worked for a while (and then i
discovered that it doesn't)

I don't know what that person meant by "touching the reference".

Jörg.

On 05/04/2019 04:55, Christopher Leidigh wrote: > I'm trying to understand the correct way to reload an extension under > development.  Under the nightly build, something looks like it's > cached when I reload and see the old version output.  I've tried > deleting the extension from the profile directory which appears to > work sometimes.  I'm not sure about the consistency though. > > Is there a correct and efficient way to do this? Hmm, the issue of so-called side-loading has some up multiple times and we're going around in circles answering the same questions over and over. Here a quote from dev-apps-thunderbird@lists.mozilla.org: On 16/12/2018 09:45, Jörg Knobloch wrote: > On 16/12/2018 06:44, opto wrote: >> Didn't work on addons for a few months. I seem to remember that I >> only had to restart TB to pick up code changes. > > Side-loading has changed. I will only pick up the changes if you touch > install.rdf. > > https://bugzilla.mozilla.org/show_bug.cgi?id=1389189#c4 > > Also: https://bugzilla.mozilla.org/show_bug.cgi?id=1389741 And from a recent IRC conversation: i touch rdf *and* the reference. For some reason i have to do both, though touching *just* the rdf file worked for a while (and then i discovered that it doesn't) I don't know what that person meant by "touching the reference". Jörg.
GL
Geoff Lankow
Fri, Apr 5, 2019 8:07 AM

These are some of the things I do. Most of it is old-school tricks that
don't get mentioned because Firefox doesn't have real extensions any more.

  • Set the pref nglayout.debug.disable_xul_cache to true. There's no
    default, so you'll have to create it. I'm not totally convinced this
    does as much as it used to, but it's still mentioned in the code.
  • Start with the --purgecaches flag if something appears to be cached.
  • Develop my extension outside the profile directory and link it to
    the profile extensions directory. Basically, create a file at
    [profile directory]/extensions/[add-on id] and in the file put the
    full path to the directory where the code is. This has a handy
    side-effect of preventing the whole thing being deleted when the
    add-on manager decides it doesn't like something and just deletes
    it. Just replace the link file.

In general it works okay. There have been annoyances in the last year
but they seem to have been ironed out.

For webextensions and bootstrapped extensions, you can go to Tools >
Developer Tools > Debug Add-Ons and click Load Temporary Add-On, which
is quite good because it gives you a reload button, and the add-on is
removed at shutdown.

GL

On 5/04/19 15:55, Christopher Leidigh wrote:

I'm trying to understand the correct way to reload an extension under
development.  Under the nightly build, something looks like it's
cached when I reload and see the old version output.  I've tried
deleting the extension from the profile directory which appears to
work sometimes.  I'm not sure about the consistency though.

Is there a correct and efficient way to do this?

Thanks
Christopher


Maildev mailing list
Maildev@lists.thunderbird.net
http://lists.thunderbird.net/mailman/listinfo/maildev_lists.thunderbird.net

These are some of the things I do. Most of it is old-school tricks that don't get mentioned because Firefox doesn't have real extensions any more. * Set the pref nglayout.debug.disable_xul_cache to true. There's no default, so you'll have to create it. I'm not totally convinced this does as much as it used to, but it's still mentioned in the code. * Start with the --purgecaches flag if something appears to be cached. * Develop my extension outside the profile directory and link it to the profile extensions directory. Basically, create a file at [profile directory]/extensions/[add-on id] and in the file put the full path to the directory where the code is. This has a handy side-effect of preventing the whole thing being deleted when the add-on manager decides it doesn't like something and just deletes it. Just replace the link file. In general it works okay. There have been annoyances in the last year but they seem to have been ironed out. For webextensions and bootstrapped extensions, you can go to Tools > Developer Tools > Debug Add-Ons and click Load Temporary Add-On, which is quite good because it gives you a reload button, and the add-on is removed at shutdown. GL On 5/04/19 15:55, Christopher Leidigh wrote: > I'm trying to understand the correct way to reload an extension under > development.  Under the nightly build, something looks like it's > cached when I reload and see the old version output.  I've tried > deleting the extension from the profile directory which appears to > work sometimes.  I'm not sure about the consistency though. > > Is there a correct and efficient way to do this? > > Thanks > Christopher > > _______________________________________________ > Maildev mailing list > Maildev@lists.thunderbird.net > http://lists.thunderbird.net/mailman/listinfo/maildev_lists.thunderbird.net