-
-
Notifications
You must be signed in to change notification settings - Fork 471
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
[WIP] Upgrade Electron version to 5.0.6 #781
Conversation
Why are we upgrading directly to v5? Didn't we agree to do incremental upgrades for electron? |
Yeah, but Akash and I figured it might be better to upgrade directly to the highest version where things don't break outright, and then work downward from there. |
This is still WIP and we still need to test a lot of stuff before merging this. Let me just check if the auto-updates works with this version. @kanishk98 can you check the other features/settings etc and make sure everything works as expected. |
Things seem fine to me so far. I'll work on this branch for a while, see if something fails. |
After running the script to reinstall node-modules, i get this error-
@akashnimare @kanishk98 Any clue about this? A similar issue is here . |
Other than the above problem, Functionality wise, everything seems to be working fine so far. I didn't test the autoupdate. I'll keep testing to see if i can find something. |
I think to shift to |
@abhigyank I don't thing we are upgrading because of BrowserView. Maybe, because we want to get to the latest stable version before v3 becomes deprecated. |
Can you remove the node modules and reinstall? I have seen this error but it usually goes away once you reinstall node modules/upgrade node.
Yeah, our main reason is to get the latest features of v5 and also the browserview. |
We have to go through the release docs from v3 to v5 and see if they have added/removed any apis etc. |
@akashnimare BrowserVIew is available for v3.1 as well, https://electronjs.org/docs/api/browser-view/history |
Electron v5 support the Numpad keys (electron/electron#15689) so I think we should remove the code which was added in 6e76097 (after testing the feature) |
Tested the functionality on macOS, everything works as expected. Currently testing the auto-update and installers. @kanishk98, @vsvipul can you guys make sure we don't miss anything while upgrading to v5? |
I went through the list of breaking changes and didn't see anything apart from the |
@kanishk98 Can you change the comment on this line to - zulip-desktop/app/renderer/js/preload.js Line 91 in 1fe62e5
"// Electron does not support multiple accelarators for same menu item |
Yeah, I just noticed this issue. Thanks for the suggestion! |
* Addresses breaking change where webviewTag must be set to true when setting webPreferences for a BrowserWindow.
Even though Electron v5 supports numpad keys, we can't add another accelerator to the same menu item.
315ea4a
to
c741ed4
Compare
It is important for Linux (deb, snap, rpm, AppImage) to upgrade electron-builder to 21.x if you use Electron 5.
<= 20 versions doesn't support Electron 5 correctly. Also be aware about electron-userland/electron-builder#4005 |
@develar thanks for the heads up. @kanishk98 can you update the electron-builder and also electron-updater? I hope that doesn't break the auto-update. |
Unsafe (not really, but still) changes were done as part of electron-userland/electron-builder#3953 I didn't yet fully manually test new updater, but I don't expect regressions. |
@develar correct me if I'm wrong, but isn't the latest version of |
@kanishk98 Explained here. |
@develar in the issue you linked (thanks for that, btw) it says that electron versions >= 4.11.0 should use builder v21. Just to confirm, we don't need to update builder and updater if we stick to Electron v4.10.0, right? |
@kanishk98 Please note that I mean not electron, but electron-updater ( Please note that in electron-updater recently was fixed bug, that probably also affects zulip — electron-userland/electron-builder#3564 So, I strongly recommend to update to electron-builder 21. |
Alright, sorry for the confusion. I was thrown off by this comment. So just to be doubly sure, we should not update Electron to v5 without updating builder and updater modules to their latest versions as well, right? If that's the case, I think we could use some docs about the same, to indicate more clearly which versions of which modules work well with each other. I'd be happy to help out, if required. |
Well, it should be clear that if you want recent version of Electron, then recent version of builder should be used. But I will add note about it to release notes of 21. In any case soon or later you will be forced to migrate to electron-builder 21 because of electron-userland/electron-builder#3870 :) |
@develar I see that version 21.1 of builder has been released a few hours ago. Will it be good to update to it and simultaneously update our electron version to v5.0.6 ? Also, can you tell the exact updater version we need to update to so that auto-update doesn't break. Upgrading electron is our priority so we need to be sure that something doesn't go wrong. |
@kanishk98 closing this in favour of #793. @vsvipul FYI, feel free to cherry-pick the comments. |
What's this PR do?
Makes a couple Electron version leaps to 5.0.6.
Any background context you want to provide?
Needed to enable
webviewTag
when creating aBrowserWindow
in the main process.Still have to assure ourselves that things haven't broken in the upgrade.
You have tested this PR on: