Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wayland-backend: Add getter for global name #735

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

PolyMeilex
Copy link
Member

Copy link

codecov bot commented Jun 8, 2024

Codecov Report

Attention: Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.

Project coverage is 78.62%. Comparing base (1f6f4f5) to head (84bfcc0).
Report is 31 commits behind head on master.

Files Patch % Lines
wayland-backend/src/rs/server_impl/handle.rs 0.00% 15 Missing ⚠️
wayland-backend/src/server_api.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #735      +/-   ##
==========================================
+ Coverage   73.11%   78.62%   +5.51%     
==========================================
  Files          45       41       -4     
  Lines        8183     6537    -1646     
==========================================
- Hits         5983     5140     -843     
+ Misses       2200     1397     -803     
Flag Coverage Δ
main ?
test-- 80.84% <0.00%> (?)
test-client_system- 72.03% <0.00%> (?)
test-client_system-server_system ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@elinorbgr
Copy link
Member

Given the CI failures, I think this bumps the minimum supported libwayland version. That is not a problem, but the CI scripts should be updated as such, and it should be documented in the changelogs.

@elinorbgr
Copy link
Member

Ok, actually the CI no longer fixes the libwayland version, so there's nothing to update here.

But it looks like this change requires a newer version of libwayland-server than is available on the CI environment...

@PolyMeilex
Copy link
Member Author

@elinorbgr I bumped Ubuntu version to 24.04, and we are green now

@ids1024
Copy link
Member

ids1024 commented Sep 3, 2024

So outside of the CI coverage tests (which were failing) this function is only needed if it's used, and won't break server_system on Ubuntu 22.04, Debian Stable, etc. that have a version of libwayland older than 1.22?

@ids1024
Copy link
Member

ids1024 commented Sep 4, 2024

No, it looks like with this anvil fails to link on 22.04 with wayland-backend/server_system but without wayland-sys/dlopen. And fails at runtime if wayland-sys/dlopen is used. Whether or not global_name is ever used.

This seems potentially problematic? I think this will break 22.04 builds of cosmic-panel (which if I recall current is using server_system, while cosmic-comp isn't).

@elinorbgr
Copy link
Member

Could maybe this functionality be hidden behind a cargo feature?

@PolyMeilex
Copy link
Member Author

How about we go libinput-rs or gtk-rs like route, and have libwayland-1.x feature for each new version from now on?

@PolyMeilex
Copy link
Member Author

Any ideas how would I feature gate a function in external_library! marco?

@ids1024
Copy link
Member

ids1024 commented Sep 4, 2024

I've just done a wayland-rs release without this for now. Presumably no one needs this functionality in their compositor immediately and it can wait for the next wayland-rs release (but otherwise we can just do another release when we figure out conditional compilation here).

Using a feature naming scheme like libinput-rs or gtk-rs sounds good to me.

I guess external_library! would need to be changed to allow attributes and then include them in the output of the macro? Seems a bit annoying to deal with, but I'm not sure how else it could be done.

@PolyMeilex
Copy link
Member Author

I've just done a wayland-rs release without this for now.

That's totally fine, it's more of a future proofing for people that might need ext_transient_seat_v1 in the future. I don't care if it lands today or in a year 😄

@ids1024
Copy link
Member

ids1024 commented Sep 4, 2024

Right.

Protocols like https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/40 may also want to make use of this. But it doesn't currently. (And "in a year" may be an optimistic timeline for getting things like that merged upstream...)

@ids1024
Copy link
Member

ids1024 commented Oct 15, 2024

With elinorbgr/dlib#22, it should be possible to just use:

#[cfg(feature = "libwayland_1_22")]
fn wl_global_get_name(*mut wl_global, *mut wl_client) -> u32,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants