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 694827 - Port the system module to GjsPrivate
Port the system module to GjsPrivate
Status: RESOLVED WONTFIX
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2013-02-27 23:54 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2017-01-22 05:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Makefile-modules: Clean up (2.32 KB, patch)
2013-02-27 23:54 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
system: Port to GjsPrivate (8.84 KB, patch)
2013-02-27 23:54 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review

Description Jasper St. Pierre (not reading bugmail) 2013-02-27 23:54:31 UTC
This is an old patch I had somewhere that bitrotted. I cleaned it up.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-02-27 23:54:34 UTC
Created attachment 237570 [details] [review]
Makefile-modules: Clean up
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-02-27 23:54:36 UTC
Created attachment 237571 [details] [review]
system: Port to GjsPrivate
Comment 3 Giovanni Campagna 2013-02-27 23:58:59 UTC
Review of attachment 237571 [details] [review]:

I must say I don't really see the advantage, we still have a native module, and now we have a JS module too.

::: modules/system.js
@@ +6,3 @@
+
+Lang.copyProperties(imports.systemNative, this);
+Lang.copyProperties(imports.gi.GjsPrivate, this);

Introspection modules are not enumerable.
And in general, this is wrong to do, GjsPrivate includes stuff for format, gettext and overrides/gio.
Comment 4 Jasper St. Pierre (not reading bugmail) 2013-02-28 00:04:05 UTC
(In reply to comment #3)
> Review of attachment 237571 [details] [review]:
> 
> I must say I don't really see the advantage, we still have a native module, and
> now we have a JS module too.

I wanted to write an additional system function for debug reasons and got a little annoyed at the boilerplate.
Comment 5 Colin Walters 2013-03-07 21:32:02 UTC
Review of attachment 237570 [details] [review]:

Makes sense to me.
Comment 6 Jasper St. Pierre (not reading bugmail) 2013-03-07 21:58:58 UTC
Comment on attachment 237570 [details] [review]
Makefile-modules: Clean up

Attachment 237570 [details] pushed as d378d6d - Makefile-modules: Clean up
Comment 7 Philip Chimento 2017-01-22 05:41:50 UTC
With more modern SpiderMonkey the boilerplate has gotten better. I'm going to close this but if you particularly still want to make this change, reopen it and we can discuss.