Skip to content
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

Update core 1.151.2 #4373

Merged
merged 4 commits into from
Dec 2, 2024
Merged

Update core 1.151.2 #4373

merged 4 commits into from
Dec 2, 2024

Conversation

nicodh
Copy link
Contributor

@nicodh nicodh commented Nov 29, 2024

No description provided.

@nicodh nicodh requested review from WofWca and r10s November 29, 2024 18:01
@@ -493,7 +493,7 @@ If you think that's a bug and you need that permission, then please open an issu
accountId,
msgId,
update,
description
''
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit strange to set the parameter as deprecated, while at the same time we have to pass it to core to avoid an error there...

Should at least be an optional parameter in the type definitions in jsonrpc

Copy link
Member

@Simon-Laux Simon-Laux Nov 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should at least be an optional parameter in the type definitions in jsonrpc

jsonrpc type was probably forgotten to be updated?
https://github.com/deltachat/deltachat-core-rust/blob/dc5fcdf4255cadd8f44c0e723c95713ffb877986/deltachat-jsonrpc/src/api.rs#L1770

writing Option<String> there would let you pass null, though you still need to fill that parameter because of deltachat/yerpc#10 (otherwise ts will complain) -> so not I would say it isn't worth to change.

So I would have removed the property from jsonrpc, and mention it in changelog as breaking change.
typescript provides type checking so desktop would be fine, python/go bots might not be, but adb tests them every time he updates core anyway, so it would be watched before production, even if changelog is not read. But currently its important that the new release comes fast, so I understand playing it safe in such times.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I add this Option, since I'm adapting jsonrpc right now anyway, since it still misses dc_msg_get_webxdc_href() which is needed for #4366

Copy link
Member

@r10s r10s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did not test, looks good as far as i can tell from my limited ts knowledge

pnpm-workspace.yaml Outdated Show resolved Hide resolved
'parameter description in sendUpdate is deprecated and will be removed in the future'
)
}
ipcRenderer.invoke('webxdc.sendUpdate', JSON.stringify(update))
Copy link
Collaborator

@WofWca WofWca Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want to return this promise?

Hmm, but the new types state that we return void

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not changed in this PR

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Umm, I don't think so.

(update, description) =>
  ipcRenderer.invoke(
    'webxdc.sendUpdate',
    JSON.stringify(update),
    description
  )

returns a promise.

Copy link
Member

@Simon-Laux Simon-Laux Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was changed in this pr, but the type in types definition is void, so in that sense it is correct.

You should normally expect to wait for it to be sent out, because you get you own updates in the listener.
But internally it is async and if we don't await on it, possible errors will currently always trigger "uncaught errors / unhandled promise rejection".

This might be a specification issue in error handling then: if we say that sendUpdate can fail in core and it should report errors.

@nicodh nicodh merged commit 464d0a7 into main Dec 2, 2024
10 checks passed
@nicodh nicodh deleted the update-core-1.151.2 branch December 2, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants