n_1713[m] has quit [Quit: You have been kicked for being idle]
snakedye has joined #river
pkap has joined #river
<pkap>
Wow wlroots 0.15 has made it into Arch Community after all :)
<gabm[m]>
<pkap> "Wow wlroots 0.15 has made it..." <- good news, thanks!
norkki has quit [Ping timeout: 256 seconds]
elshize has quit [Ping timeout: 240 seconds]
pkap has quit [Quit: Client closed]
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #river
<novakane>
ifreund: looking a bit at zig-wayland #14, what version would it checks? I assume interface, but wouldn't that be painful to add in build.zig for multiple interface like in wayland.xml?
<ifreund>
novakane: it would be for "global" interfaces only, i.e. everything advertised by the compositor using wl_registry
<ifreund>
and no I don't think this is too painful, this will eliminate e.g. that recent chromium bug due to it binding wl_output at version 4
<ifreund>
(since we can then automatically clamp to the max version in zig-wayland's wl_registry_bind() wrapper)
<novakane>
yeah, I see, but wouldn't setting the right version in wl_registry_bind in the global registry listener kinda already that?
<novakane>
client side I mean
<novakane>
it already eliminates that wl_output kind of bugs no?
<ifreund>
novakane: yes it would, but obviously people don't always do that
<ifreund>
this change would eliminate them *by design* instead of relying on every user of zig-wayland getting it right
<ifreund>
it's also required for other reasons: e.g. ensuring forward compatibility of your code with future protocol xml
<ifreund>
for example, if new events are added to a protocol and a zig-wayland project that was written before those events were added is compiled against the new protocol xml, it won't compile
<novakane>
right, fair enough, I guess I'm a too good programmer for not hitting this :P
<novakane>
but forward compatibility is a good point
<novakane>
I wouldn't mind working on this, do you already have any idea how you would like this to be designed?
<ifreund>
I haven't given any thought to the implementation yet, API wise though I think we should make it declarative and use the interface names in the xml
<ifreund>
just a sec
waleee has joined #river
<novakane>
I would imagine using a max_version for the Interface struct in the scanner and comparing that with the `since` fields in the Message struct
<ifreund>
novakane: yeah, the implementation shouldn't be too hard, just a few if statements
<novakane>
ifreund: okay I see, looks good actually, not annoying, I'll look into making this then
<ifreund>
sweet!
<leon-p>
yeah, I like that as well. It additionally makes it impossible to choose the version and runtime, which is a good thing, since just trying to bind the advertised version is a somewhat common mistake.
<leon-p>
(which I definitely never have done, no not at all)
<ifreund>
note that clients still have to handle the server advertising an older version than the maximum version the client is built against
<novakane>
of course we know you would never do that :P
<ifreund>
not sure if there's something we can do to make that safer
<leon-p>
As long as it's explicit it already is an improvement over libwaylands C api
<ifreund>
i guess we could add a minimum required version argument to our wl_registry_bind wrapper to force users to think about it
<ifreund>
and just panic if it isn't met
<leon-p>
instead of panic, maybe just return an error?
<leon-p>
some programs may want to handle that case, especially if connecting to Wayland isn't the main thing they do
<ifreund>
leon-p: if they want to handle that case, they could pass 1 and do whatever checks they want manually
<ifreund>
anyhow, that's separate from the new build.zig API
waleee has quit [Ping timeout: 240 seconds]
<novakane>
damn I think I didn't read zig-wayland code since I made the std.fmt refactor, for zig 0.8 iirc, need to read that again once or twice ^^
mon_aaraj has quit [Ping timeout: 240 seconds]
mon_aaraj has joined #river
<novakane>
ifreund: so the interface version should go from zig-wayland build.zig to scanner.zig using make() right?
<novakane>
probably with scanner.scan()
<ifreund>
novakane: yeah, it should just be a new argument to scanner.scan()
edrex[m] has joined #river
<novakane>
ifreund: though the Interface{name, version} should go in scanner.zig instead if I want to pass it around maybe as RequiredInterface{}
<ifreund>
yeah probably
norkki has joined #river
MatrixTravelerbo has quit [K-Lined]
snakedye has quit [Ping timeout: 240 seconds]
snakedye has joined #river
snakedye has quit [Ping timeout: 240 seconds]
snakedye has joined #river
<novakane>
heh looks like it's more annoying to do that what I thought ^^ https://0x0.st/oHri.txt
waleee has joined #river
snakedye has quit [Ping timeout: 240 seconds]
snakedye has joined #river
snakedye has quit [Ping timeout: 240 seconds]
snakedye has joined #river
norkki has quit [Remote host closed the connection]