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 to 19 #6032

Merged
merged 2 commits into from Aug 8, 2022
Merged

Upgrade electron to 19 #6032

merged 2 commits into from Aug 8, 2022

Conversation

GrantMoyer
Copy link
Contributor

@GrantMoyer GrantMoyer commented Jul 14, 2022

Electron 15 has been unsupported for some time now. Unfortunately, electron 15 also has a critical bug, which causes it to crash immediately when trying to render natively under wayland (specifically wlroots based compositors). This change upgrades the electron dependency to version 19, which is supported, and has fixed the bug.

I compiled the desktop app with electron 19 and played around with it a little, and I did not experience any strange behavior.

Electron 15 has been [unsupported for some time now][1]. Unfortunately, electron 15 also has a [critical bug][2], which causes it to crash immediately when trying to render natively under wayland. This change upgrades the electron dependency to version 19, which is supported, and has fixed the bug.

I compiled the desktop app with electron 19 and played around with it a little, and I did not experience any strange behavior.

[1]: https://www.electronjs.org/docs/latest/tutorial/electron-timelines
[2]: electron/electron#32487
@GrantMoyer
Copy link
Contributor Author

Fixes #4288

@GrantMoyer
Copy link
Contributor Author

I tested locally and this does not fix #5010

@andelf andelf self-requested a review July 14, 2022 02:00
@andelf
Copy link
Collaborator

andelf commented Jul 14, 2022

Thanks, I will check this after 0.7.7 is released.

@Vectorrent
Copy link

Fixes #6052

@DoodlesEpic
Copy link

Closes #5642

@DoodlesEpic
Copy link

I'd suggest @andelf @GrantMoyer to take the opportunity to make all minor updates possible with this update. On my local branch (https://github.com/DoodlesEpic/Logseq/tree/update-electron-19) without breaking the build (and at least to the extent of my testing any features) I've managed to do all minor updates available reducing substantially the number of outdated direct deps of Logseq.

There's a few other updates that would be interesting including a few ones that would require major updates and solve somewhat serious vulnerabilities including one with node-fetch: GHSA-r683-j2x4-v87g although I'm not sure how affected Logseq is by this one.

@Vectorrent
Copy link

It seems that block references are partially-broken, after the update. They still work, but the "linked references" section doesn't render properly, after you click on it.

2022-07-19_09-07

If you click on the little (1) button to "open block references," the entire app crashes with the following message:

Error caught by UI!
TypeError: Cannot read properties of null (reading '$cljs$core$IFn$_invoke$arity$1$')

No, a re-index doesn't fix it.

@Vectorrent
Copy link

Another issue: If you re-index after updating to Electron 19, a new page will be created for every, single page property. Stuff like "alias" and "id" will begin to show up on the graph, as its own node:

2022-07-19_10-54

@Vectorrent
Copy link

Another issue: from "journal view," if you click on a page link, do some modifications, then "go back" to the journal view, you will be taken to a journal entry far earlier than the one you left from. If you scroll up, to return to where you were, the page may either 1) scroll back to the proper entry, or 2) "jump" above the proper entry - forcing you to scroll down.

@cnrpman
Copy link
Collaborator

cnrpman commented Jul 20, 2022

Another issue: If you re-index after updating to Electron 19, a new page will be created for every, single page property. Stuff like "alias" and "id" will begin to show up on the graph, as its own node:

2022-07-19_10-54

May checkout the latest master? It's related to #6024 I guess

@Vectorrent
Copy link

May checkout the latest master? It's related to #6024 I guess

This looked promising, but no dice. The new config option doesn't seem to work for me.

 ;; Enable all your properties to have corresponding pages
 :property-pages/enabled? false

On the other hand, the block reference issue is fixed, so that's progress.

@GrantMoyer
Copy link
Contributor Author

I'd suggest to take the opportunity to make all minor updates possible with this update.

I'd like to keep the scope of this PR restricted, especially given the changes which will apparently be needed.

It seems that block references are partially-broken, after the update...

Thanks for finding these issues. I'll look into them.

@GrantMoyer
Copy link
Contributor Author

GrantMoyer commented Jul 20, 2022

It seems that block references are partially-broken, after the update. They still work, but the "linked references" section doesn't render properly, after you click on it.

I couldn't reproduce this issue, but it looks like it's been fixed anyway.

Another issue: If you re-index after updating to Electron 19, a new page will be created for every, single page property. Stuff like "alias" and "id" will begin to show up on the graph, as its own node

This doesn't seem to be caused by the electron update. I can indeed reproduce this with this branch (a5d71c8). However, I have 0.7.6 (8e3b8f0) compiled against electron 19 installed on my system, and this issue is not present.

I just double checked, and I also see this issue at the point where this PR branched from master (5c29517).

@GrantMoyer
Copy link
Contributor Author

a new page will be created for every, single page property. Stuff like "alias" and "id" will begin to show up on the graph, as its own node

This issue is gone for me with the latest merge from master.

@Vectorrent
Copy link

This issue is gone for me with the latest merge from master.

Really? I'm still seeing the same behavior as #6124. Anyway, probably not an issue with the Electron update.

@cnrpman
Copy link
Collaborator

cnrpman commented Aug 4, 2022

We are going to upgrade in recent days. But thorough tests required beforehand.

Copy link
Collaborator

@andelf andelf left a comment

Choose a reason for hiding this comment

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

LGTM

BTW, electron 20.0.0 was released 2 days ago.
Should we go for it? @logseq/core

@tiensonqin
Copy link
Contributor

@andelf Why not? It seems that all the breaking changes for 20.0.0 are not related to us.
https://www.electronjs.org/blog/electron-20-0

@VarLad
Copy link

VarLad commented Aug 5, 2022

Since they now include this flag, can we have Wayland by default? electron/electron#35015
(on Wayland)

@cnrpman cnrpman mentioned this pull request Aug 7, 2022
@andelf
Copy link
Collaborator

andelf commented Aug 8, 2022

Will merge this now. (which will be included in the nightly release)
And use the newest electron 19 release.
Since electron 20 is just released, it's better to wait for a few minor fixes.

@andelf andelf merged commit 161d317 into logseq:master Aug 8, 2022
@yoyurec
Copy link
Contributor

yoyurec commented Oct 20, 2022

What about Electron 21? there is Chromium 106!

@sprocketc sprocketc mentioned this pull request Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:type/bug-fix upstream Blocked by upstream deps
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants