-
Notifications
You must be signed in to change notification settings - Fork 341
API stability guarantee #1008
Comments
I'm all for that. It makes my work on wlroots-rs easier as it means I can definitely be sure to finish wrapping something (which is non trivial with Rust's safety guarantees). |
Missing stability promises are the reason hsroots lags behind and mostly just supports waymonad :) And I think it's a good idea to have a set of unstable APIs as well. I don't think huge additions like the tablet_v2 PR should be stable from the get go. And for the transition from an unstable API to stable I suggest as rule of thumb: |
In terms of ABI stability we can change WLROOTS_0_0_0 in wlrotos.symbols to WLROOTS_0_1_0 and put the existing symbols in there adding the current wlr_* to a new WLROOTS_UNSTABLE {} section. (and doing the same for 0_2_0, ... and so on. For API stability version macros like glib based libraries use them could be used: https://github.com/GNOME/glib/blob/master/glib/gversionmacros.h |
Let's keep it simple.
I like this |
I feel like we're getting really close to being stable. But I'd like to go through and see if anything should be made private. It's easier to add them back in later versions than it is to remove them. |
Also, where did we land on supporting multiple renderers? That will certainly be breaking. |
RIP |
The multiple renders sounds like it would add a lot more time if we wanted it in 1.0. Is it a feature that couldn't wait until a 2.0 in the future? |
Multiple renderers won't happen. |
The only interface that isn't well-tested is the renderer. I'm not aware of anyone who is doing anything that might stretch the interface that might become a common use case in the future like animations except for the wayfire guy. @ammen99 do you see the renderer as it is now good enough for you to do your cube thing? |
@acrisci I think the rendering process in its current shape is quite good, except for the following: A thing that "works" but is not guaranteed to work is the target framebuffer of all Aside from that, the only other thing I'd like is to add the ability to have direct access to GLES2 textures, but that's only to optimize performance in some cases, so not really needed. These both depend on #775, but if you want to leave that for wlroots 2.0, I have nothing against. |
Yeah, you're not supposed to use raw GL calls when you're using the renderer.
I believe #775 can be fixed in a backwards-compatible way, so this shouldn't be an issue. |
@emersion I think you wanted to make the wlr_renderer(or at least the gles2 rendering functions) reusable? |
Yes, that's the plan. |
On July 1st, let's mark all of this stable:
Types:
We're not going to mark stable anything that implements an unstable Wayland Chose not to mark wlr_keyboard as stable since we've recently been sorting out Chose not to mark wlr_seat as stable yet because it's complicated and I'm Holding off on Holding off on marking the renderer as stable, probably for a good long time. I Holding off on the wlr_session stuff because I don't think we adequately tested The plan Anything headers not listed above will have the following added to them: #ifndef WLR_USE_UNSTABLE
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
#endif Any stable headers will get: /*
* This is a stable interface of wlroots. Future changes are limited to:
*
* - New struct members
* - New enum members
* - New functions
*
* Do not stack- or statically-allocate stable structs and expect them to be
* binary-compatible with future wlroots releases; allow wlroots to allocate
* them on the heap for you.
*
* Breaking changes are announced on GitHub and follow a 1-year deprecation
* schedule.
*/ Eventually I want to replace GitHub announcements with a The future We can extend things marked as stable, but:
If we must make breaking changes, we will mark the features as deprecated and New features in stable interfaces can themselves be marked unstable. struct some_stable_struct {
int stable_member;
/* NOTE: unstable members follow */
int unstable_member;
};
#ifdef WLR_USE_UNSTABLE
void some_new_function(void);
#endif |
I don't understand this one. Unstable protocols get the same guarantees as stable protocols in wayland-protocols. |
If we mark it as stable we can't remove it. I don't want to have a bunch of pomp and circumstance around e.g. removing wlr_xdg_shell_v6 in favor of wlr_xdg_shell. |
I think this should be removed entirely.
I'm not sure if it's even worth trying to support systems without udev. At least, if we're going to do that, it'll be extremely bare-bones and not support hotplugging. |
Fair enough.
Also fair. |
Why? If you want to support renderers other than GLES2 in wlroots 1.x, we need to mark backends as unstable too, because they'll likely be affected too. |
We might need to mark backend_autocreate as unstable. I'm not thrilled with the renderer create function in any case, it might be worth reconsidering how that works. |
You probably mean "all functions that create a backend".
I was thinking of replacing that with a struct. |
Deadline is tomorrow. |
And we also have:
(Maybe I forgot some issues) |
Hm. I think we might have to get rid of the nested structs for this. |
I would hold back on marking |
Ah, missed an issue with |
Is there a list of what can be stabilized next and what the remaining issues are for those items? |
Suggest some? |
wlr_box is a good candidate, I remember someone mentioning there were still some open issues on that. All I could find was #1094. I'll take a crack at this one. wlr_region.h maybe? xdg shell as a protocol is stable, so it would be nice to try to stabilize that though I'm sure there's still some issues regarding it. What's blocking the input types? wlr_keyboard had some xkbcommon kinks, were those every fixed?
|
Not sure exposing
Yeah, I don't think xdg-shell stable is ready.
These would need additional reviews. They expose a lot of internal state, so we should be careful about this. There were some discussions about splitting xkb and wlr_keyboard too. The seat stuff is not ready.
wlr_output is not ready, it'll be heavily changed by the renderer redesign.
Some fields like
Cursors will change with the renderer redesign. Not sure we'll be able to keep |
So basically renderer redesign is a major blocker, got it. I'll wait for that to settle then before pushing for more stabilization. |
I think we could expose wlr_region next, if we unexport or change |
Another thing that may be worth changing is the data point provided with wlr_signal_emit_safe(&thing->events.asdf, thing); The issue is that this makes it a breaking change to change the data pointer to something actually useful, such as a The solution is to change the data pointer to be NULL, so that it's not a breaking change to set it to something useful later: wlr_signal_emit_safe(&thing->events.asdf, NULL); |
References: swaywm#1008
References: swaywm#1008
With my current approach in I'm not sure what the policy is on whether API stability should be considered for language bindings as well or if only the official API as used from C must be kept stable. |
We only care about the C API. It doesn't scale to try to care about all possible language bindings. |
We need to make a plan and set a deadline for enforcing it. I'm thinking we make our first stability guarantees by July 1st.
I think we should do this by headers, marking older headers as stable and newer headers as unstable, and over time graduate everything to stable.
Non-standard and unstable protocol implementations are stricken-through.
backend
drm.h
headless.h
interface.h
libinput.h
multi.h
noop.h
session.h
wayland.h
x11.h
backend.h
config.h
interfaces
wlr_input_device.h
wlr_keyboard.h
wlr_output.h
wlr_pointer.h
wlr_switch.h
wlr_tablet_pad.h
wlr_tablet_tool.h
wlr_touch.h
render
dmabuf.h
drm_format_set.h
egl.h
gles2.h
interface.h
pixman.h
wlr_renderer.h
wlr_texture.h
types
wlr_box.h
wlr_buffer.h
wlr_compositor.h
wlr_cursor.h
wlr_data_control_v1.h
wlr_data_device.h
wlr_drm.h
wlr_export_dmabuf_v1.h
wlr_foreign_toplevel_management_v1.h
wlr_fullscreen_shell_v1.h
wlr_gamma_control_v1.h
wlr_idle.h
wlr_idle_inhibit_v1.h
wlr_input_device.h
wlr_input_inhibitor.h
wlr_input_method_v2.h
wlr_keyboard.h
wlr_keyboard_group.h
wlr_keyboard_shortcuts_inhibit_v1.h
wlr_layer_shell_v1.h
wlr_linux_dmabuf_v1.h
wlr_matrix.h
wlr_output.h
wlr_output_damage.h
wlr_output_layout.h
wlr_output_management_v1.h
wlr_output_power_management_v1.h
wlr_pointer.h
wlr_pointer_constraints_v1.h
wlr_pointer_gestures_v1.h
wlr_presentation_time.h
wlr_primary_selection.h
wlr_primary_selection_v1.h
wlr_region.h
wlr_relative_pointer_v1.h
wlr_screencopy_v1.h
wlr_seat.h
wlr_server_decoration.h
wlr_surface.h
wlr_switch.h
wlr_tablet_pad.h
wlr_tablet_tool.h
wlr_tablet_v2.h
wlr_text_input_v3.h
wlr_touch.h
wlr_viewporter.h
wlr_virtual_keyboard_v1.h
wlr_virtual_pointer_v1.h
wlr_xcursor_manager.h
wlr_xdg_activation_v1.h
wlr_xdg_decoration_v1.h
wlr_xdg_foreign_registry.h
wlr_xdg_foreign_v1.h
wlr_xdg_foreign_v2.h
wlr_xdg_output_v1.h
wlr_xdg_shell.h
util
box.h
edges.h
log.h
region.h
version.h
xcursor.h
xwayland.h
wlroots has migrated to gitlab.freedesktop.org. This issue has been moved to:
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1008
The text was updated successfully, but these errors were encountered: