Skip to content

Draft: port to libsoup3 (+ drop deprecated apis, stop using deprecated glib api)

q66 requested to merge q66/libgdata:soup3 into main

this is a port to the upcoming (will be released later this year) libsoup 3.x

  • all deprecated APIs have been dropped (most of them do not work and with libsoup3 a clean API break will be needed anyway)
  • since libsoup 3 needs newer glib, i also bumped the glib version - with that, i had to drop use of deprecated glib APIs (mostly GTimeVal and some gobject-related stuff)
  • it will probably be necessary to make the libsoup3 version installable alongside the libsoup2 version, so it might be a good idea to rename the library

it'll also be necessary to decide the path going forward with maintenance of the soup2 version

WIP:

  • async API for download stream
  • rework upload stream - i could actually use some advice here - the way the upload stream works appears to be fundamentally incompatible with how libsoup3 works - since it's not possible to call libsoup from several threads anymore (you can only use the thread the session was created in, and all operations run in the thread-default context), and also message i/o being streaming-only now - with the current approach, it runs a separate upload thread and when you write into the stream synchronously, it will wait for that portion of the data being written on the network - i can't think of a good way to implement that behavior...
  • that means any tests currently using the upload stream fail
  • services still use threads (which is not gonna work; I rewrote the base service code to use libsoup async APIs, the services need to be adapted)

for now i'm opening this to get further advice/feedback

Edited by Bastien Nocera

Merge request reports