You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be feasible to unify the various APIs (dbus, json, "free-form" stdout) by making signal-cli "core" to return objects (e.g. envelopes) that would be passed to simple I/O modules which would serialize them to whatever format is needed?
Keeping different interfaces consistent is hard, and the discrepancies inevitably turn up, not to mention the documented differences (the subject of this wiki page). If signal-cli limits its inputs and outputs to common data structures (arrays, dicts, etc), which can easily be translated to other formats, there would be no need to worry about any differences.
I'm sure to a large extent this is how signal-cli already operates. I'm also sure adapting the rest can come against some potentially hard issues:
unifying the daemon / CLI modes (maybe: make CLI a daemon that lives for one command only?)
specifying free-form stdout stuff that does not fit into typical data structure formats
outputting notifications, errors and everything else that is not a signal message
.. and many more that haven't occurred to me at the moment.
This is a far-from-any-practicalities, "wouldn't that be great" kind of proposal; and I haven't examined any relevant code. But, if this is possible, signal-cli will be able to implement any new feature without ever thinking about the differences among various interfaces.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Would it be feasible to unify the various APIs (dbus, json, "free-form" stdout) by making signal-cli "core" to return objects (e.g. envelopes) that would be passed to simple I/O modules which would serialize them to whatever format is needed?
Keeping different interfaces consistent is hard, and the discrepancies inevitably turn up, not to mention the documented differences (the subject of this wiki page). If signal-cli limits its inputs and outputs to common data structures (arrays, dicts, etc), which can easily be translated to other formats, there would be no need to worry about any differences.
I'm sure to a large extent this is how signal-cli already operates. I'm also sure adapting the rest can come against some potentially hard issues:
This is a far-from-any-practicalities, "wouldn't that be great" kind of proposal; and I haven't examined any relevant code. But, if this is possible, signal-cli will be able to implement any new feature without ever thinking about the differences among various interfaces.
Beta Was this translation helpful? Give feedback.
All reactions