node-gtk icon indicating copy to clipboard operation
node-gtk copied to clipboard

tests: explicitly require libsoup 2.x

Open invidian opened this issue 3 years ago • 6 comments

As if libsoup3 is installed together with libsoup2, libsoup3 is selected which makes test fails.

Signed-off-by: Mateusz Gozdek [email protected]

invidian avatar May 20 '22 14:05 invidian

Good catch! One thing though, setting the version explicitly to 2.4 fails the macos tests. Can you find which is the package version for macos and set it for that? It might be necessary to use process.platform to detect the OS and pick the right version.

romgrk avatar May 20 '22 22:05 romgrk

According to https://formulae.brew.sh/formula/libsoup and https://github.com/romgrk/node-gtk/blob/46a5aac2d977be4cd99d4af7fc73aa6606b8b7b3/.github/workflows/install.sh#L15 on MacOS version 3 should be installed, which seem incorrect as in job https://github.com/romgrk/node-gtk/runs/6532823769?check_suite_focus=true I see the same error as I saw locally, so TypeError: Soup.URI is not a constructor. I think CI for MacOS should also be using v2 and tests can be updated for v3 compatibility.

invidian avatar May 21 '22 18:05 invidian

Hmm, on my Arch libsoup 2.74.2 installs libsoup 2.4:

$ pacman -Ql libsoup | grep 2.4.so
libsoup /usr/lib/libsoup-2.4.so
libsoup /usr/lib/libsoup-2.4.so.1
libsoup /usr/lib/libsoup-2.4.so.1.11.2
libsoup /usr/lib/libsoup-gnome-2.4.so
libsoup /usr/lib/libsoup-gnome-2.4.so.1
libsoup /usr/lib/libsoup-gnome-2.4.so.1.11.2

I'll check on MacOS when I have some time..

invidian avatar May 23 '22 07:05 invidian

Same here ... I have this

extra/libsoup 2.74.2-2 [installed]
    HTTP client/server library for GNOME
extra/libsoup3 3.0.6-1 [installed]
    HTTP client/server library for GNOME

but then the installed one is named 2.4 ... and that's expected though

WebReflection avatar May 23 '22 08:05 WebReflection

Same on Ubuntu: https://packages.ubuntu.com/jammy/amd64/libsoup2.4-1/filelist. But MacOS formula also mentions 2.4: https://github.com/Bo98/homebrew-core/blob/master/Formula/[email protected]

invidian avatar May 23 '22 08:05 invidian

Also, perhaps those should be unified:

$ git grep "gi.require('Soup'"
tests/conversion__g_hash.js:const soup = gi.require('Soup')
tests/conversion__g_list.js:const Soup = gi.require('Soup')
tests/conversion__g_s_list.js:const soup = gi.require('Soup')
tests/function_call__invalid_type.js:const Soup = gi.require('Soup')
tests/object__initialization.js:const Soup = gi.require('Soup', '2.4')
tests/regressions.js:const soup = gi.require('Soup', '2.4')

Or there should be separate set of test for 3.x.

I can also reproduce the failing tests on MacOS.

invidian avatar May 24 '22 11:05 invidian