bugaevc / wl-clipboard

Command-line copy/paste utilities for Wayland
GNU General Public License v3.0
1.62k stars 59 forks source link

Do not abort when interfaces are older than expected #193

Closed nt8r closed 1 year ago

nt8r commented 1 year ago

Instead, print a warning and let consumers abort if the missing interface is a fatal problem.

This happens with phosh 0.30, for example, which exposes gtk_shell1 version 3. As of this patch, wl-clipboard works again but now prints warning: interface gtk_shell1 wanted version 4 but got version 3 to standard error in this situation.

bugaevc commented 1 year ago

Thanks!

Not aborting definitely sounds like a good idea 🙂, but I don't think we should print a warning either, since it's not fatal and not something that the user can be expected to do anything about. If the version is too old, we should just treat the global as of it wasn't present.

nt8r commented 1 year ago

I've removed the printing of a warning.

agx commented 1 year ago

I failed to check MRs when hitting the same issue :cry:

As it might be useful to have some required min versions I added a BIND_OPTIONAL macro in : https://github.com/bugaevc/wl-clipboard/pull/195 just in case this is handy otherwise just close #195

bugaevc commented 1 year ago

Thanks, merged (with a follow-up fix https://github.com/bugaevc/wl-clipboard/commit/8dbdefb77a7ec9343aa5fd0700dd9a430164ad0a). Please let me know whether things still work on your end :slightly_smiling_face: