Closed dfaust closed 10 months ago
I don't have any real stakes in this. Flattening looks fine, but I don't want to be the only voice on this.
The format is part of watchexec's public API. So long as no information is lost such that I can reconstruct it to maintain compat, I'm fine with it.
This relates to the
notify
integration intoTauri
. With Tauri, developers can interact with notify using JavaScript. This means that they interface with events the way they are serialized using serde.Currently a serialized event looks like this:
This makes working with events in JavaScript a bit awkward. You have to test for event kinds individually and take into account that it may be a string or object:
It would be more intuitive if we would flatten the event kind:
Using it in JavaScript would look like:
Keeping it as it is would be fine, too. But I thought that very few people would be using the serialization feature anyway. What do you think? Am I overthinking this?
@passcod I saw your comment in #487. Would such a change be a problem for you?