After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 669694 - Extension system is quite broken...
Extension system is quite broken...
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: extensions
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-02-08 17:33 UTC by Giovanni Campagna
Modified: 2012-02-08 22:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
extensionSystem: fix runtime enable()/disable() after last changes (3.16 KB, patch)
2012-02-08 17:49 UTC, Giovanni Campagna
accepted-commit_now Details | Review
Looking Glass: fix error line when there are no errors (1.04 KB, patch)
2012-02-08 18:03 UTC, Giovanni Campagna
committed Details | Review
extensionSystem: fix runtime enable()/disable() after last changes (3.37 KB, patch)
2012-02-08 18:12 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2012-02-08 17:33:21 UTC
1) enableExtension fails in loadExtension, if the extension is loaded but disabled.

2) disableExtension fails because extensionStateObjs is no more, the state is in extension[uuid].stateObj

(I'm looking at 3.3.5-6-gf00c86e, which is on top of origin/master right now. Thus it could be I'm missing some necessary commit)
Comment 1 Giovanni Campagna 2012-02-08 17:49:08 UTC
Created attachment 207128 [details] [review]
extensionSystem: fix runtime enable()/disable() after last changes

disableExtension still used the old way to retrieve the state object,
and enableExtension called loadExtension at a time that would
always fail.
Comment 2 Giovanni Campagna 2012-02-08 18:03:32 UTC
Created attachment 207133 [details] [review]
Looking Glass: fix error line when there are no errors

The No error code path still used the old metadata object.
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-02-08 18:04:11 UTC
Review of attachment 207133 [details] [review]:

Yes (I the same patch locally before I pushed, I just forgot to fixup)
Comment 4 Jasper St. Pierre (not reading bugmail) 2012-02-08 18:04:46 UTC
(In reply to comment #0)
> 1) enableExtension fails in loadExtension, if the extension is loaded but
> disabled.

I don't understand this. Why?
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-02-08 18:12:28 UTC
Review of attachment 207128 [details] [review]:

OK, now I understand what happened.
Comment 6 Giovanni Campagna 2012-02-08 18:12:58 UTC
Created attachment 207134 [details] [review]
extensionSystem: fix runtime enable()/disable() after last changes

disableExtension still used the old way to retrieve the state object,
and enableExtension called loadExtension at a time that would
always fail.
Comment 7 Jasper St. Pierre (not reading bugmail) 2012-02-08 18:15:02 UTC
Review of attachment 207134 [details] [review]:

Minor nit, but otherwise OK.

::: js/ui/extensionSystem.js
@@ +278,1 @@
         extension.state = ExtensionState.INITIALIZED;

GNOME Shell style requires braces on both sides.
Comment 8 Giovanni Campagna 2012-02-08 22:32:07 UTC
Attachment 207133 [details] pushed as 6ca0d4a - Looking Glass: fix error line when there are no errors
Attachment 207134 [details] pushed as d0cd6ba - extensionSystem: fix runtime enable()/disable() after last changes