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

Upgrade Electron from v5 to v7 #8967

Merged
merged 40 commits into from
Feb 6, 2020
Merged

Upgrade Electron from v5 to v7 #8967

merged 40 commits into from
Feb 6, 2020

Conversation

kuychaco
Copy link
Contributor

@kuychaco kuychaco commented Jan 23, 2020

This PR supersedes #8791 (upgrading from Electron v5 to v6) and #8959 (upgrade to Electron v7).

Major changes for v5 to v6:

  • Made app log directory creation opt-in with a new function app.setAppLogsPath
  • Callback-based functions converted to return promises

Major changes for v6 to v7:

  • Added new nativeTheme API to read and respond to changes in the OS's theme and color scheme

Worth noting is that upgrading to Electron 7 (or 6) will not remove support for any versions of macOS, according to the electron docs (https://electronjs.org/docs/tutorial/support/history)

Supported Platforms (for v5, v6, and v7) **macOS** Only 64bit binaries are provided for macOS, and the minimum macOS version supported is macOS 10.10 (Yosemite).

Windows
Windows 7 and later are supported, older operating systems are not supported (and do not work).
Both ia32 (x86) and x64 (amd64) binaries are provided for Windows. Running Electron apps on Windows for ARM devices is possible by using the ia32 binary.

We did QA testing to check for known issues for Electron 6 (see #8791 (comment)) and Electron 7 (see #8959 (comment))

Special shout outs to @joshaber, @outofambit, and @tierninho for contributions to this upgrade process 🙏❤️

kuychaco and others added 30 commits December 12, 2019 14:36
Co-Authored-By: Josh Abernathy <joshaber@gmail.com>
Co-Authored-By: Josh Abernathy <joshaber@gmail.com>
Co-Authored-By: Josh Abernathy <joshaber@gmail.com>
Co-Authored-By: evelyn masso <outofambit@github.com>
Co-Authored-By: evelyn masso <outofambit@github.com>
Co-Authored-By: evelyn masso <outofambit@github.com>
Commit box melts down off the screen

Co-Authored-By: evelyn masso <outofambit@github.com>
doesn't jive with our new deps
i think i fixed this incorrectly for the electron 5 upgrade. hopefully this is more correct.
This replaces the patch for osx-notarize removed in 4898ffb, which was causing the build to fail

See electron/packager#1069

Co-Authored-By: evelyn masso <outofambit@github.com>
node_modules/.bin/prettier --write app/src/ui/app.tsx
Co-Authored-By: evelyn masso <outofambit@github.com>
Co-Authored-By: evelyn masso <outofambit@github.com>
Co-Authored-By: evelyn masso <outofambit@github.com>
Co-Authored-By: evelyn masso <outofambit@github.com>
For testing Electron 7 upgrade

Co-Authored-By: evelyn masso <outofambit@github.com>
@dennisameling dennisameling mentioned this pull request Feb 2, 2020
3 tasks
@outofambit outofambit self-requested a review February 3, 2020 22:41
@say25
Copy link
Member

say25 commented Feb 4, 2020

Still struggling to run this branch locally on a Windows machine

Copy link
Contributor

@outofambit outofambit left a comment

Choose a reason for hiding this comment

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

i helped with this but did a once-over to see if i had any lingering concerns. nothing major, just left a couple questions for @kuychaco

.prettierignore Outdated Show resolved Hide resolved
@@ -172,7 +172,8 @@ export class AddExistingRepository extends React.Component<

private showFilePicker = async () => {
const window = remote.getCurrentWindow()
const directory = remote.dialog.showOpenDialog(window, {
// eslint-disable-next-line no-sync
const directory = remote.dialog.showOpenDialogSync(window, {
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm wondering if it makes more sense to await the non-sync version of these methods just to avoid the eslint-disable-next-line noise? the no-sync rule is pretty literal (it just flags methods that end in "sync"). i think functionally its the same though.

@outofambit
Copy link
Contributor

@say25 what issues are you seeing?

@say25
Copy link
Member

say25 commented Feb 4, 2020

@outofambit I'm seeing the application hang in start up and get in a state where the UI doesn't show up.

@say25
Copy link
Member

say25 commented Feb 4, 2020

image

kuychaco and others added 2 commits February 3, 2020 18:51
@kuychaco kuychaco moved this from In Progress PRs to Awaiting Review in Desktop 2.4 release Feb 4, 2020
Copy link
Member

@niik niik left a comment

Choose a reason for hiding this comment

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

Given that this PR removes the last (and only) patch file (for electron-notarize), could we also remove the patch-package package from packages.json (and from the postinstall script)? See #8555 for the details on what got added in order to support the patch file.

// remote is an IPC call, so if we know there's no point making this call
// we should avoid paying the IPC tax
return remote.systemPreferences.isDarkMode()
return nativeTheme.shouldUseDarkColors
Copy link
Member

Choose a reason for hiding this comment

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

Reading that documentation it would appear to me as if the nativeTheme module is only available in the main process. I believe this will fail at runtime

Desktop 2.4 release automation moved this from Awaiting Review to Review In Progress Feb 5, 2020
@niik
Copy link
Member

niik commented Feb 5, 2020

@outofambit I'm seeing the application hang in start up and get in a state where the UI doesn't show up.

@say25 I was able to build and run this on Windows. Could you try deleting the node_modules and app\node_modules directories and rebuilding all using yarn && yarn build:dev && yarn start please?

@say25
Copy link
Member

say25 commented Feb 5, 2020

Talked with @outofambit. I did a git clean -dXf as well as a yarn clean-state. Unfortunately still running into the same issue

outofambit and others added 6 commits February 5, 2020 15:55
Co-Authored-By: Katrina Uychaco <katrina@github.com>
Co-Authored-By: Markus Olsson <niik@users.noreply.github.com>
Co-Authored-By: Markus Olsson <niik@users.noreply.github.com>
Co-Authored-By: evelyn masso <outofambit@github.com>
@kuychaco kuychaco requested a review from niik February 6, 2020 00:15
Copy link
Member

@niik niik left a comment

Choose a reason for hiding this comment

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

👍 this looks great! I'm a bit concerned that @say25 isn't able to build this but given that we all are able to in our VMs I think a good next step in troubleshooting that would be to get this onto beta and see if @say25 can run the released version.

@kuychaco kuychaco merged commit dcc22d8 into development Feb 6, 2020
Desktop 2.4 release automation moved this from Review In Progress to PRs For Next Beta Feb 6, 2020
@billygriffin billygriffin moved this from PRs For Next Beta to Done! in Desktop 2.4 release Feb 18, 2020
@outofambit outofambit deleted the releases/2.3.0-test2 branch April 21, 2020 22:18
@say25 say25 added the electron Issues related to our use of Electron that may need updates to Electron or upstream fixes label May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
electron Issues related to our use of Electron that may need updates to Electron or upstream fixes
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

10 participants