Closed
Bug 955009
Opened 11 years ago
Closed 11 years ago
Ship libpurple as an add-on and get Instantbird nightlies building off comm-central
Categories
(Chat Core :: General, enhancement)
Chat Core
General
Tracking
(Not tracked)
RESOLVED
FIXED
1.6
People
(Reporter: clokep, Assigned: clokep)
References
Details
Attachments
(15 files, 21 obsolete files)
3.79 MB,
application/octet-stream
|
Details | |
983 bytes,
patch
|
florian
:
review+
|
Details | Diff | Splinter Review |
6.95 KB,
patch
|
clokep
:
review+
|
Details | Diff | Splinter Review |
10.63 KB,
patch
|
florian
:
review+
|
Details | Diff | Splinter Review |
10.35 KB,
patch
|
florian
:
review+
|
Details | Diff | Splinter Review |
5.06 KB,
patch
|
florian
:
review+
|
Details | Diff | Splinter Review |
3.88 KB,
patch
|
florian
:
review+
|
Details | Diff | Splinter Review |
5.07 KB,
patch
|
florian
:
review+
|
Details | Diff | Splinter Review |
7.35 KB,
patch
|
florian
:
review+
|
Details | Diff | Splinter Review |
26.25 KB,
patch
|
florian
:
review+
|
Details | Diff | Splinter Review |
3.39 KB,
patch
|
clokep
:
review+
|
Details | Diff | Splinter Review |
7.13 KB,
patch
|
clokep
:
review+
|
Details | Diff | Splinter Review |
8.24 KB,
patch
|
clokep
:
review+
|
Details | Diff | Splinter Review |
6.02 KB,
patch
|
florian
:
review+
|
Details | Diff | Splinter Review |
7.88 KB,
patch
|
jcranmer
:
feedback-
|
Details | Diff | Splinter Review |
*** Original post on bio 1579 at 2012-07-11 18:36:00 UTC ***
We don't depend on libpurple anymore, GTalk, Facebook, IRC and (kind of) XMPP can be used without it. Eventually we'd like the build system to be changed to build libpurple as an add-on (or at least to disable it). This should allow an MPL 2 only build of Instantbird. (And would allow Thunderbird to take an add-on implementing libpurple.)
Comment 1•11 years ago
|
||
*** Original post on bio 1579 as attmnt 1832 at 2012-08-23 14:25:00 UTC was without comment, so any subsequent comment numbers will be shifted ***
Comment 2•11 years ago
|
||
*** Original post on bio 1579 as attmnt 1833 at 2012-08-23 17:52:00 UTC ***
This builds, but the libpurple file isn't loaded before libpurplexpcom and can't be loaded automatically because it's not in the folder of the main executable.
Comment 3•11 years ago
|
||
Comment on attachment 8353591 [details] [diff] [review]
WIP1
*** Original change on bio 1579 attmnt 1832 at 2012-08-23 17:52:14 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353591 -
Attachment is obsolete: true
Comment 4•11 years ago
|
||
*** Original post on bio 1579 as attmnt 1859 at 2012-08-27 17:56:00 UTC ***
This works on Mac.
With an amount of hacks that makes me wonder if this approach is worth pursuing.
Comment 5•11 years ago
|
||
Comment on attachment 8353592 [details] [diff] [review]
WIP2
*** Original change on bio 1579 attmnt 1833 at 2012-08-27 17:56:02 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353592 -
Attachment is obsolete: true
Comment 6•11 years ago
|
||
*** Original post on bio 1579 as attmnt 1864 at 2012-08-28 13:42:00 UTC ***
Same as WIP3 but with an additionnal mozilla patch that I forgot to hg add before making the previous diff.
I think I'm going to hold off on this, as I think the downsides of this patch (have to rerun configure to update changed makefiles in purple/ as for some reason the makefile update script fails when entering the directory; complicated and confusing build order of the various folders; various hacks in the makefiles that will be a pain to maintain and will break each time our build system gets out of sync with the mozilla/ one, ...) far outweight the (limited) benefits.
Comment 7•11 years ago
|
||
Comment on attachment 8353618 [details] [diff] [review]
WIP3
*** Original change on bio 1579 attmnt 1859 at 2012-08-28 13:42:48 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353618 -
Attachment is obsolete: true
Comment 8•11 years ago
|
||
*** Original post on bio 1579 at 2012-08-28 13:49:40 UTC ***
Pasting here what I just said on IRC:
I think a way better solution would be to put the whole purple/ folder in a separate repository, and have the folder layout for it match what's done for venkman and DOM i, and checkout that repository from client.py.
In our current situation having 2 separates code repositories for the same application would be painful, so I think that approach would be worth it only if we get the greenlight for integrating instantbird/ in comm-central.
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Florian Quèze [:florian] [:flo] from comment #8)
> In our current situation having 2 separates code repositories for the same
> application would be painful, so I think that approach would be worth it
> only if we get the greenlight for integrating instantbird/ in comm-central.
Now that this was done in bug 956609, I started looking at this a bit. I started with the same procedure as bug 956609: copying the purple/ directory from Instantbird (I assume we'd want to eventually hg convert the history) and applying patches to get things building. I'm going to attach my current WIPs.
Assignee | ||
Comment 10•11 years ago
|
||
Before trying these patches you'll need to copy the current purple source (which is too big to attach to Bugzilla):
cp -r ../instantbird/purple mozilla/extensions && cd mozilla/extensions/purple && hg init && hg add . && hg commit -m "Importing initial purple/ folder."
Assignee | ||
Comment 11•11 years ago
|
||
Assignee | ||
Comment 12•11 years ago
|
||
This patch is definitely a WIP and it does NOT work yet, but it does some of the basic porting (CSRCS to SOURCES, etc.)
Comment 13•11 years ago
|
||
Bundle resulting of hg converting the purple/ history (also renaming to get rid of the "purple" folder and have the content of the current purple's folder directly at the top of the repository).
Assignee | ||
Comment 14•11 years ago
|
||
Assignee: nobody → clokep
Attachment #8358974 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8369227 -
Flags: review?(florian)
Assignee | ||
Comment 15•11 years ago
|
||
This gets glib and xml2 to build, looks like there's a few commented out lines of code which we can remove (hence f? instead of r?).
Attachment #8358973 -
Attachment is obsolete: true
Attachment #8369228 -
Flags: feedback?(florian)
Assignee | ||
Comment 16•11 years ago
|
||
Attachment #8358975 -
Attachment is obsolete: true
Attachment #8369229 -
Flags: review?(florian)
Assignee | ||
Comment 17•11 years ago
|
||
Currently nothing is built as a static prpl since configure doesn't work.
Attachment #8369230 -
Flags: feedback?(florian)
Assignee | ||
Comment 18•11 years ago
|
||
Attachment #8369231 -
Flags: review?(florian)
Assignee | ||
Comment 19•11 years ago
|
||
This patch was provided by Florian and I've reviewed it. It seems to build, although I haven't tested it in a running Instantbird yet.
Attachment #8369232 -
Flags: review+
Assignee | ||
Comment 20•11 years ago
|
||
This ports Bug 956493, I had to modify the script it used already, but it's pretty straightforward.
Attachment #8369233 -
Flags: review?(florian)
Assignee | ||
Comment 21•11 years ago
|
||
This ports bug 910989 for purplexpcom.
Attachment #8369234 -
Flags: review?(florian)
Assignee | ||
Comment 22•11 years ago
|
||
This copies version.h from my current Instantbird build. I think we could still dynamically generate this if we played with moz.build/Makefile.in a bit (and with help from #build). I'd probably prefer that solution, but it doesn't really upset me to check this in.
Attachment #8369235 -
Flags: review?(florian)
Assignee | ||
Updated•11 years ago
|
Attachment #8353622 -
Attachment is patch: true
Attachment #8353622 -
Attachment mime type: application/octet-stream → text/plain
Updated•11 years ago
|
Attachment #8369227 -
Flags: review?(florian) → review+
Assignee | ||
Comment 23•11 years ago
|
||
This will run configure from mozilla/extension/purple (and is a patch for c-c, not for the purple/ repo as everything else is).
Attachment #8369237 -
Flags: review?(florian)
Assignee | ||
Comment 24•11 years ago
|
||
This just grabs the old configure rules from Instantbird and puts them into a patch for purple.
Things left to do:
- Figure out how to actually get configure to run for purple/.
- Ensure static purples are built.
- Ensure everything compiles properly on all platforms.
I'd appreciate some help looking at the configure stuff as I'm unsure of where to go next with getting configure to run properly.
Comment 25•11 years ago
|
||
Comment on attachment 8369228 [details] [diff] [review]
3.2 - Update Makefile.in and moz.build for glib and xml2
Review of attachment 8369228 [details] [diff] [review]:
-----------------------------------------------------------------
Seems good.
::: libraries/glib/moz.build
@@ +175,5 @@
> +FINAL_LIBRARY = 'purplexpcom'
> +
> +LIBRARY_NAME = 'glib'
> +
> +#FORCE_SHARED_LIB = True
Remove this line.
::: libraries/xml2/moz.build
@@ +60,5 @@
> +FINAL_LIBRARY = 'purplexpcom'
> +
> +LIBRARY_NAME = 'xml2'
> +
> +#FORCE_SHARED_LIB = True
and this one.
Attachment #8369228 -
Flags: feedback?(florian) → feedback+
Comment 26•11 years ago
|
||
Comment on attachment 8369229 [details] [diff] [review]
4.2 - Update Makefile.in and moz.build for libpurple
Review of attachment 8369229 [details] [diff] [review]:
-----------------------------------------------------------------
::: libpurple/Makefile.in
@@ +17,5 @@
> ifeq (,$(filter WINNT Darwin,$(OS_ARCH)))
> LOCAL_INCLUDES = $(GLIB_CFLAGS) $(LIBXML2_CFLAGS)
> else
> LOCAL_INCLUDES = -I$(DIST)/include/glib
> +#SHARED_LIBRARY_LIBS += $(foreach lib,glib xml2,../libraries/$(lib)/$(LIB_PREFIX)$(lib).$(LIB_SUFFIX))
Remove this.
::: libpurple/moz.build
@@ +141,5 @@
> +FINAL_LIBRARY = 'purplexpcom'
> +
> +LIBRARY_NAME = 'purple'
> +
> +#FORCE_STATIC_LIB = True
Remove this.
Attachment #8369229 -
Flags: review?(florian)
Attachment #8369229 -
Flags: review-
Attachment #8369229 -
Flags: feedback+
Comment 27•11 years ago
|
||
Comment on attachment 8369230 [details] [diff] [review]
5 - Convert prpl-rules.mk to prpl.py for use in moz.build
Review of attachment 8369230 [details] [diff] [review]:
-----------------------------------------------------------------
::: libpurple/protocols/prpl.py
@@ +1,5 @@
> +# This Source Code Form is subject to the terms of the Mozilla Public
> +# License, v. 2.0. If a copy of the MPL was not distributed with this
> +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
> +
> +if CONFIG['STATIC_PRPLS'] and protocol in CONFIG['STATIC_PRPLS']:
This test checks that you are in the 'statically linked prpl' case...
@@ +2,5 @@
> +# License, v. 2.0. If a copy of the MPL was not distributed with this
> +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
> +
> +if CONFIG['STATIC_PRPLS'] and protocol in CONFIG['STATIC_PRPLS']:
> + SOURCES += ['xpcomModule.cpp']
but this is a file you need to make the prpl a dynamically loaded xpcom component.
@@ +4,5 @@
> +
> +if CONFIG['STATIC_PRPLS'] and protocol in CONFIG['STATIC_PRPLS']:
> + SOURCES += ['xpcomModule.cpp']
> +
> + FORCE_STATIC_LIB = True
I think this isn't needed any more, and we use FINAL_LIBRARY = 'purplexpcom' instead?
@@ +9,5 @@
> +
> +LIBRARY_NAME = protocol
> +
> +if CONFIG['PURPLEXPCOM']:
> + FORCE_SHARED_LIB = True
Here is where you should add the xpcomModule.cpp file I guess.
@@ +11,5 @@
> +
> +if CONFIG['PURPLEXPCOM']:
> + FORCE_SHARED_LIB = True
> +
> +IS_COMPONENT = True
This is also something you need only when building a dynamically loaded xpcom component. Statically linked prpls aren't xpcom components.
Attachment #8369230 -
Flags: feedback?(florian) → feedback-
Comment 28•11 years ago
|
||
Comment on attachment 8369231 [details] [diff] [review]
6 - Update Makefile.in and moz.build for purplexpcom
Review of attachment 8369231 [details] [diff] [review]:
-----------------------------------------------------------------
::: purplexpcom/src/Makefile.in
@@ +15,3 @@
> #NO_DIST_INSTALL = 1
>
> +#SHARED_LIBRARY_LIBS += ../../libpurple/$(LIB_PREFIX)purple.$(LIB_SUFFIX)
Remove this please. And the 2 commented out lines above can go too.
::: purplexpcom/src/moz.build
@@ +41,5 @@
> +EXTRA_COMPONENTS += ['prpl.manifest']
> +
> +IS_COMPONENT = True
> +
> +#FINAL_LIBRARY = 'purplexpcom'
Remove this.
Attachment #8369231 -
Flags: review?(florian)
Attachment #8369231 -
Flags: review-
Attachment #8369231 -
Flags: feedback+
Updated•11 years ago
|
Attachment #8369233 -
Flags: review?(florian) → review+
Comment 29•11 years ago
|
||
Comment on attachment 8369235 [details] [diff] [review]
10 - Copy version.h from current Instantbird
Review of attachment 8369235 [details] [diff] [review]:
-----------------------------------------------------------------
I'm OK with doing this, but I think we need to handle generating this file in the libpurple update script. If you don't do it now, I think you should at least add an |echo| line reminding the user of the script that this needs to be done by hand for now.
Attachment #8369235 -
Flags: review?(florian)
Attachment #8369235 -
Flags: review-
Attachment #8369235 -
Flags: feedback+
Comment 30•11 years ago
|
||
Comment on attachment 8369237 [details] [diff] [review]
A - Run purple's configure from Instantbird
Review of attachment 8369237 [details] [diff] [review]:
-----------------------------------------------------------------
This would break building c-c with --enable-application=im without checking out libpurple.
I think we will want to add the purple extension through a line in our default mozconfigs, rather than in confvars.sh
Attachment #8369237 -
Flags: review?(florian) → review-
Assignee | ||
Comment 31•11 years ago
|
||
(In reply to Florian Quèze [:florian] [:flo] from comment #25)
> Comment on attachment 8369228 [details] [diff] [review]
> 3.2 - Update Makefile.in and moz.build for glib and xml2
>
> Review of attachment 8369228 [details] [diff] [review]:
I removed the commented out lines.
Attachment #8369228 -
Attachment is obsolete: true
Attachment #8370400 -
Flags: review?(florian)
Assignee | ||
Comment 32•11 years ago
|
||
(In reply to Florian Quèze [:florian] [:flo] from comment #26)
> Comment on attachment 8369229 [details] [diff] [review]
> 4.2 - Update Makefile.in and moz.build for libpurple
>
> Review of attachment 8369229 [details] [diff] [review]:
> -----------------------------------------------------------------
I removed the commented out lines.
Attachment #8370402 -
Flags: review?(florian)
Assignee | ||
Comment 33•11 years ago
|
||
(In reply to Florian Quèze [:florian] [:flo] from comment #28)
> Comment on attachment 8369231 [details] [diff] [review]
> 6 - Update Makefile.in and moz.build for purplexpcom
>
> Review of attachment 8369231 [details] [diff] [review]:
> -----------------------------------------------------------------
I also removed the commented out lines from here.
Attachment #8370404 -
Flags: review?(florian)
Assignee | ||
Comment 34•11 years ago
|
||
(In reply to Florian Quèze [:florian] [:flo] from comment #29)
> Comment on attachment 8369235 [details] [diff] [review]
> 10 - Copy version.h from current Instantbird
>
> Review of attachment 8369235 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> I'm OK with doing this, but I think we need to handle generating this file
> in the libpurple update script. If you don't do it now, I think you should
> at least add an |echo| line reminding the user of the script that this needs
> to be done by hand for now.
I added a statement at the end of upgrade-libpurple.sh that says to update version.h, but does not say how to do it. This can probably be scripted easily, I'll add it when I do bug 964828.
Attachment #8369229 -
Attachment is obsolete: true
Attachment #8369231 -
Attachment is obsolete: true
Attachment #8369235 -
Attachment is obsolete: true
Attachment #8370407 -
Flags: review?(florian)
Assignee | ||
Comment 35•11 years ago
|
||
(In reply to Florian Quèze [:florian] [:flo] from comment #30)
> Comment on attachment 8369237 [details] [diff] [review]
> A - Run purple's configure from Instantbird
>
> Review of attachment 8369237 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> This would break building c-c with --enable-application=im without checking
> out libpurple.
>
> I think we will want to add the purple extension through a line in our
> default mozconfigs, rather than in confvars.sh
OK, so I added --enable-extension=purple in im/configs/mozconfigs/*. Is this OK?
Attachment #8369237 -
Attachment is obsolete: true
Attachment #8370414 -
Flags: review?(florian)
Updated•11 years ago
|
Attachment #8370400 -
Flags: review?(florian) → review+
Updated•11 years ago
|
Attachment #8370402 -
Flags: review?(florian) → review+
Updated•11 years ago
|
Attachment #8370404 -
Flags: review?(florian) → review+
Updated•11 years ago
|
Attachment #8370407 -
Flags: review?(florian) → review+
Comment 36•11 years ago
|
||
Comment on attachment 8370414 [details] [diff] [review]
A.2 - Build purple extension in mozconfigs
Review of attachment 8370414 [details] [diff] [review]:
-----------------------------------------------------------------
--enable-extensions, not --enable-extension
Attachment #8370414 -
Flags: review?(florian) → review-
Assignee | ||
Comment 37•11 years ago
|
||
(In reply to Florian Quèze [:florian] [:flo] from comment #36)
> Comment on attachment 8370414 [details] [diff] [review]
> A.2 - Build purple extension in mozconfigs
>
> Review of attachment 8370414 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> --enable-extensions, not --enable-extension
Sorry, I copied this out of my .mozconfig wrong.
Attachment #8370414 -
Attachment is obsolete: true
Attachment #8370709 -
Flags: review?(florian)
Updated•11 years ago
|
Attachment #8370709 -
Flags: review?(florian) → review+
Assignee | ||
Comment 38•11 years ago
|
||
This is an updated version of prpl.py that fixes the logic in the review comments.
Things to do at this point are:
- configure
- packaging
- Figure out how to get dynamic prpls to compile after libpurple
Attachment #8369230 -
Attachment is obsolete: true
Comment 39•11 years ago
|
||
Comment on attachment 8369232 [details] [diff] [review]
7 - Fix up purplexpcom's memory reporters
># HG changeset patch
># User Florian Quèze <florian@instantbird.org>
># Date 1391034663 18000
># Wed Jan 29 17:31:03 2014 -0500
># Node ID e7aadccc1aa9b9eb4be02cc0dc69d3900ced33de
># Parent be70c165e9d591ba4c480a5b628ec9d7f65e624f
>Bug 955009 - Ship libpurple as an add-on / allow it to be disabled in configure, Rewrite purplexpcom memory reporters for interface changes, r=clokep.
hg import didn't like this attachment:
abort: decoding near 'Florian Qu?ze <flori': 'utf8' codec can't decode byte 0xe8 in position 10: invalid continuation byte!
Assignee | ||
Comment 40•11 years ago
|
||
With help from aleth and Florian, not requesting review on this yet.
Assignee | ||
Comment 41•11 years ago
|
||
This seems to run, but I don't see any output configure file. Just uploading this here to get us all on the same page.
Attachment #8369240 -
Attachment is obsolete: true
Assignee | ||
Comment 42•11 years ago
|
||
This uses GENERATED_SOURCES instead of SOURCES for static_proto_init.c.
Attachment #8370402 -
Attachment is obsolete: true
Attachment #8379222 -
Flags: review?(florian)
Updated•11 years ago
|
Attachment #8379222 -
Flags: review?(florian) → review+
Comment 43•11 years ago
|
||
Comment on attachment 8379191 [details] [diff] [review]
11.2 - Add configure.in to purple
Review of attachment 8379191 [details] [diff] [review]:
-----------------------------------------------------------------
::: configure.in
@@ +4,5 @@
> +dnl License, v. 2.0. If a copy of the MPL was not distributed with this
> +dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
> +
> +dnl Get version of libpurple from the version files.
> +PURPLE_MAJOR_VERSION=`cat $topsrcdir/extensions/purple/config/version.txt |cut -d '.' -f 1`
I think I would vaguely prefer:
purpledir=$topsrcdir/extensions/purple
PURPLE_MAJOR_VERSION=`cat $purpledir/config/version.txt |cut -d '.' -f 1`
But this is fine either way :-).
Attachment #8379191 -
Flags: review+
Comment 44•11 years ago
|
||
Attachment #8379190 -
Attachment is obsolete: true
Attachment #8379364 -
Flags: review?(clokep)
Comment 45•11 years ago
|
||
Attachment #8379366 -
Flags: review?(clokep)
Assignee | ||
Comment 46•11 years ago
|
||
Comment on attachment 8379364 [details] [diff] [review]
B.2 - Call purple's subconfigure from im/configure.in, and packaging changes
Review of attachment 8379364 [details] [diff] [review]:
-----------------------------------------------------------------
This looks fine, I'm testing this on Windows now. Do we want some way to automatically download the purple repository (once we figure out where that lives...?)
Attachment #8379364 -
Flags: review?(clokep) → review+
Assignee | ||
Comment 47•11 years ago
|
||
Carrying this review forward, it adds the purpledir variable, as requested.
Attachment #8379191 -
Attachment is obsolete: true
Attachment #8379382 -
Flags: review+
Assignee | ||
Comment 48•11 years ago
|
||
Comment on attachment 8379366 [details] [diff] [review]
12 - Fix building prpls
Review of attachment 8379366 [details] [diff] [review]:
-----------------------------------------------------------------
::: purplexpcom/src/moz.build
@@ +5,5 @@
>
> XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
>
> +prpls = ['jabber', 'gg', 'oscar', 'msn', 'myspace', 'novell',
> + 'qq', 'sametime', 'simple', 'yahoo', 'netsoul']
I dislike having this full list of prpls in here twice. (It's also in libpurple/moz.build.) I think we should go w/ this for now if it works, but it'd be nice if there was a way to simplify this.
Attachment #8379366 -
Flags: review?(clokep) → review+
Assignee | ||
Comment 49•11 years ago
|
||
(In reply to Patrick Cloke [:clokep] from comment #48)
> Comment on attachment 8379366 [details] [diff] [review]
> 12 - Fix building prpls
>
> Review of attachment 8379366 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: purplexpcom/src/moz.build
> @@ +5,5 @@
> >
> > XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
> >
> > +prpls = ['jabber', 'gg', 'oscar', 'msn', 'myspace', 'novell',
> > + 'qq', 'sametime', 'simple', 'yahoo', 'netsoul']
>
> I dislike having this full list of prpls in here twice. (It's also in
> libpurple/moz.build.) I think we should go w/ this for now if it works, but
> it'd be nice if there was a way to simplify this.
Sorry, this comment makes no sense, please disregard it!
Comment 50•11 years ago
|
||
(In reply to Patrick Cloke [:clokep] from comment #46)
> Do we want some way to automatically download the purple repository
Eventually/ideally client.py should handle it. For now I was thinking that we would just do it with buildbot.
Assignee | ||
Comment 51•11 years ago
|
||
Comment on attachment 8353622 [details] [diff] [review]
WIP3.1
I successfully got this to build and run on Windows!
Attachment #8353622 -
Attachment is obsolete: true
Comment 52•11 years ago
|
||
Comment on attachment 8369234 [details] [diff] [review]
9 - Port |Bug 910989 - nsTHashtable::Init should go away|
Review of attachment 8369234 [details] [diff] [review]:
-----------------------------------------------------------------
In bug 910989 comment 3 roc says:
> There are a number of places that lazily initialize nsTHashtables, and
> sometimes the initialization status (via IsInitialized) as some kind of
> state flag. [...] I'm wrapping the hashtable in
> nsAutoPtr and heap-allocating it at the point where it would have been
> lazily initialized.
Let's follow this.
In purpleGetText.h, change:
nsDataHashtable<nsCStringHashKey, nsTArray<nsCString> *> table;
to:
nsAutoPtr<nsDataHashtable<nsCStringHashKey, nsTArray<nsCString> *> > table;
(You may need to include nsAutoPtr.h)
::: purplexpcom/src/purpleGetText.cpp
@@ -286,5 @@
> - // If we have an entry but the hashtable isn't initialized,
> - // it means that the translation bundle for this package is
> - // missing. The error value will make the translation code
> - // return early.
> - if (!mStringCache[i].table.IsInitialized())
Make this a simple null check:
if (!mStringCache[i].table)
@@ -326,5 @@
> return -1;
> }
>
> // The translation file exists, init the hashtable and return the new index
> - pack->table.Init();
Make this create the hashtable:
pack->table = new nsDataHashtable<nsCStringHashKey, nsTArray<nsCString> *>();
@@ -512,5 @@
> os->RemoveObserver(sInstance, NS_CHROME_FLUSH_TOPIC);
>
> LOG(("purpleGetText::unInit\n"));
> for (PRUint32 i = 0; i < sInstance->mStringCache.Length(); ++i)
> - if (sInstance->mStringCache[i].table.IsInitialized())
if (sInstance->mStringCache[i].table)
@@ -513,5 @@
>
> LOG(("purpleGetText::unInit\n"));
> for (PRUint32 i = 0; i < sInstance->mStringCache.Length(); ++i)
> - if (sInstance->mStringCache[i].table.IsInitialized())
> - sInstance->mStringCache[i].table.Enumerate(deleteEnumerator, nullptr);
table.Enumerate becomes table->Enumerate
(also replace . by -> in all the table.Put and table.Get throughout the file)
Attachment #8369234 -
Flags: review?(florian) → review-
Assignee | ||
Updated•11 years ago
|
Attachment #8376188 -
Flags: review?(florian)
Updated•11 years ago
|
Attachment #8376188 -
Flags: review?(florian) → review+
Assignee | ||
Comment 53•11 years ago
|
||
This makes the requested changes, this compiles and ran.
Attachment #8369234 -
Attachment is obsolete: true
Attachment #8381110 -
Flags: review?(florian)
Updated•11 years ago
|
Attachment #8381110 -
Flags: review?(florian) → review+
Comment 54•11 years ago
|
||
This adds the purple repo to client.py in the "obvious" way. It defaults to skipping it (i.e. one would have to use "python client.py --include-purple checkout").
Hasn't been properly tested as the repo doesn't exist yet.
Attachment #8381411 -
Flags: feedback?
Comment 55•11 years ago
|
||
Fixes a help string. It may be premature to request feedback considering it hasn't been fully tested, but is this the right direction to go?
Attachment #8381411 -
Attachment is obsolete: true
Attachment #8381411 -
Flags: feedback?
Attachment #8381413 -
Flags: feedback?(Pidgeot18)
Assignee | ||
Comment 56•11 years ago
|
||
Florian created and pushed to a repo: http://hg.mozilla.org/users/florian_queze.net/purple
Comment 57•11 years ago
|
||
Comment 58•11 years ago
|
||
Updated with the correct repo path now it exists. Seems to work as expected.
Attachment #8383575 -
Flags: review?(Pidgeot18)
Updated•11 years ago
|
Attachment #8381413 -
Attachment is obsolete: true
Attachment #8381413 -
Flags: feedback?(Pidgeot18)
Comment 59•11 years ago
|
||
mozconfig fixup: https://hg.mozilla.org/comm-central/rev/659fa1b366aa
Comment 60•11 years ago
|
||
Comment on attachment 8383575 [details] [diff] [review]
Add purple repo to client.py
Review of attachment 8383575 [details] [diff] [review]:
-----------------------------------------------------------------
So the current plan for ccrework will be that we drop client.py altogether from the normal build invocation process. If you're planning on using this to set up the buildbots, I'd advise you to not do so. If you want it for ease of developer-side machines, I'd advise asking gps et al about adding it to m-c client.py instead.
Attachment #8383575 -
Flags: review?(Pidgeot18) → feedback-
Comment 61•11 years ago
|
||
(In reply to Joshua Cranmer [:jcranmer] from comment #60)
> If you're planning on using this
> to set up the buildbots, I'd advise you to not do so.
We were more or less hoping to use this to simplify our buildbot configs, but I've actually started reconfiguring our buildbots for the changes made in this bug, and for now I added buildbot steps to deal with this additional repository.
> If you want it for
> ease of developer-side machines, I'd advise asking gps et al about adding it
> to m-c client.py instead.
This is more the real goal.
Comment 62•11 years ago
|
||
The xpcshell of the purple/ folder aren't running, in the log we have this warning:
Included file '/Users/buildbot/buildslave/macosx/obj-instantbird/i386/mozilla/_tests/xpcshell/purple/purplexpcom/src/test/xpcshell.ini' does not exist
Comment 63•11 years ago
|
||
(In reply to Florian Quèze [:florian] [:flo] from comment #61)
> > If you want it for
> > ease of developer-side machines, I'd advise asking gps et al about adding it
> > to m-c client.py instead.
>
> This is more the real goal.
Requesting info on whether adding an equivalent of this patch to the m-c client.py would be acceptable.
Flags: needinfo?(gps)
Comment 64•11 years ago
|
||
More follow-ups:
https://hg.mozilla.org/comm-central/rev/8b9bd8b734ce - remove obsolete optimization flags from the Windows buildbot mozconfigs. The -GL flag was breaking the build of libvpx.
https://hg.mozilla.org/comm-central/rev/8cd4fcbbbb5e - fix linux buildbot mozconfigs for compatibility with our CentOS5 builders. This disables pulseaudio. I also enabled gnomevfs which apparently still works as a gio replacement (discovered this while looking at the SeaMonkey mozconfigs).
https://hg.mozilla.org/comm-central/rev/f8112386067e - fix buildsymbols. It was broken on Windows because of a path issue. And it wasn't finding the libpurple source repository.
Assignee | ||
Comment 65•11 years ago
|
||
http://hg.mozilla.org/users/florian_queze.net/purple/rev/6b77268d791c - Fix building of purpleCoreService on Linux
Please file other issues in new bugs.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: needinfo?(gps)
Resolution: --- → FIXED
Summary: Ship libpurple as an add-on / allow it to be disabled in configure → Ship libpurple as an add-on and get Instantbird nightlies building off comm-central
Target Milestone: --- → 1.6
You need to log in
before you can comment on or make changes to this bug.
Description
•