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 721352 - Use gresource for internal modules
Use gresource for internal modules
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2014-01-02 17:36 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2014-01-02 18:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use gresource for internal modules (5.22 KB, patch)
2014-01-02 17:36 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2014-01-02 17:36:49 UTC
See patch. Something I thought of last night while in bed, and didn't
take me long this morning to actually get working.
Comment 1 Jasper St. Pierre (not reading bugmail) 2014-01-02 17:36:50 UTC
Created attachment 265174 [details] [review]
Use gresource for internal modules

This means that we don't install any JS files to disk anymore, and
everything is linked into libgjs.so, hopefully making bootstrap time
faster.
Comment 2 Giovanni Campagna 2014-01-02 17:39:50 UTC
Review of attachment 265174 [details] [review]:

Looks good to me, provided it passes distcheck and installed/uninstalled tests. Just a small question.

::: Makefile-modules.am
@@ +25,3 @@
+nodist_libmodules_resources_la_SOURCES = modules-resources.c modules-resources.h
+libmodules_resources_la_CPPFLAGS = $(JS_NATIVE_MODULE_CFLAGS)
+libmodules_resources_la_LIBADD = $(JS_NATIVE_MODULE_LIBADD)

Why a library and not just straight compiling in libgjs?
Comment 3 Jasper St. Pierre (not reading bugmail) 2014-01-02 17:43:07 UTC
(In reply to comment #2)
> Why a library and not just straight compiling in libgjs?

That seems to be the same thing we do for the other modules (I didn't really want to rearrange too much). If you want a followup patch that removes the static libraries and just adds the sources directly to libgjs_la_SOURCES for all modules, I can do that.
Comment 4 Giovanni Campagna 2014-01-02 17:59:40 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Why a library and not just straight compiling in libgjs?
> 
> That seems to be the same thing we do for the other modules (I didn't really
> want to rearrange too much). If you want a followup patch that removes the
> static libraries and just adds the sources directly to libgjs_la_SOURCES for
> all modules, I can do that.

Yeah, I was thinking of symbol visibility, but it makes no difference because it's a static library anyway, so let's keep it consistent for now.
Comment 5 Jasper St. Pierre (not reading bugmail) 2014-01-02 18:02:13 UTC
Comment on attachment 265174 [details] [review]
Use gresource for internal modules

pushed but git-bz failed