-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
remove dead code #3459
remove dead code #3459
Conversation
these RPC calls are probably a relict of first tries, they are not exhaustive in their area are nor were ever used, maybe not even working. if we decide to go that way at some point anyways much more is needed :)
To test the changes in this pull request, install this apk: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not an android dev, but I agree that unused manual wrappers functions to the jsonrpc api should be removed - they are dead code.
In the future ideally we would have wrapper function auto-generation also for java, like we have for typescript. Manual wrapper functions are easy to become out of date with nobody noticing, especially if they are unused.
that is not really an issue, there is already a PR in resurrection for auto-generation. the real blockers are (a) the existing jsonrpc lacks documentation and has less structure (b) at least when i looked last time, basic things were missing or do much more than needed for android/iOS, resulting in additional, not needed database calls; the jsonrpc was not created with having android/iOS in mind. and (c) also performance, we never checked if lots of async calls are still fast enough, having in mind that they're mostly not needed for android/iOS and may result in some waiting cycles to get the return value but that's better discussed in a sprint or so ... thanks for approval! |
(a) I totally agree
So more work than the cffi. But that async nature not really a real issue, because you can all jsonrpc function more directly with the blocking api.
* can be fixed in the oposing api
I agree, though knowing the problems (even without directly fixing them) is important to me to paint a balanced picture in deltachat/deltachat-pages#984 |
i do not think that encoding/decoding json or looking up the method is an issue. if "blocking call" means it is a direct call in the same thread without additional waiting, so, in that part, similar to a cffi call, then that's probably fine |
these RPC calls are probably a relict of first tries, they are not exhaustive in their area are nor were ever used, maybe not even working.
if we decide to go that way at some point anyways much more is needed :)
came over that when trying to get a little more grip on jsonrpc docs at deltachat/deltachat-core-rust#6303