Closed arteymix closed 8 years ago
We have to set -rpath
so that examples and tests could work. That would also cover usage as a subproject. Still need to figure how that should be done though.
The ServerModule
still need to use the correct path, but that will be easier to test with support for subdir
.
Also, we cannot dispose of the ServerModule
, so we have to handle that case in Server.@new
helper.
Maybe it would be nice to forward errors in the factory as well, but that would require a lot of try {} catch
statements.
@Bob131 What do you think about all this?
Once stabilized, it would be nice to provide docs for writting custom servers.
Nice, now examples and tests work!
There's an environment variable that can be set to look for server implementations. No cascading for now, although it might be interesting in the near future. I feel quite against loading servers in user directories.
The only missing thing is to pass the initial server directory used by Meson and this will be perfect!
Ok, that work as well! :) I used -rpath
and $ORIGIN
to refer relatively to the server path.
@@ master #182 diff @@
==========================================
Files 24 28 +4
Lines 779 1050 +271
Methods 0 0
Messages 0 0
Branches 90 119 +29
==========================================
+ Hits 520 729 +209
- Misses 233 321 +88
+ Partials 26 0 -26
Powered by Codecov. Last updated by a1dcffe...8554ee0
I'm finishing the documentation and it should be ready to merge.
Server implementations would be installed in
${LIBDIR}/vsgi/servers
and loaded automatically withServer.@new
.An API for explicitly loading server implementation is provided by
ServerModule
.We would need support for
subdir
to install shared library in correct locations. (see https://github.com/mesonbuild/meson/issues/580).No GModule API are exposed, so we don't need to publicly require
gmodule-2.0
.