-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 to Electron 15.1.2 and support Node.js 14 #9936
Conversation
Technically just bumping Electron is a rather trivial change. Most of the diff is about fixing the dependency issues we noticed in downstream applications. |
85112b2
to
12d0984
Compare
About the |
@paul-marechal The reason |
@marcdumais-work I assume we can start registering the necessary parts for a I'll link the past |
I created the two CQs (electron + ffmpeg) and included them in the pull-request description 👍 |
Ah, looks like we'll need to uplift |
Will this PR apply on 1.18.0 ? I saw it's add to milestone |
@linhanyu it likely won’t be ready in time for 1.18.0, we are still waiting for the dependency (electron) to be approved by the Eclipse Foundation before we can proceed. |
@paul-marechal I went ahead and filed a CQ to be able to use electron@15.1.2. I updated the pr description to reference the necessary CQs. |
Accroding to Our tester report crash on their M1 device. Currently it's our most significant problem to promotion。 |
@linhanyu unfortunately I do not believe it is possible, we must wait for the CQ to resolve before we can officially support the newer electron version. Upgrading electron is much more involving that simply updating the dependency (as you can see in this change) so the idea of passing a command line argument would likely not work well. |
@linhanyu I am currently stuck with other work in addition to having to move this PR from Electron 14 to 15. AFAIK it might be tricky for downstream projects to use an arbitrary version of Electron if the APIs between the supported version and the custom one changed to much, but maybe it should be possible using resolution and some rebindings? Regarding the issue you mentioned on M1, is that when using Electron 9? Would it be fixed by moving to 15? |
I tried this pr construct on my laptop and work well.
Those crash may caused by rosetta2.Because electron9 only support x86 version,the only way m1 laptop use theia product is install x86 version and run in rosetta.Not only theia suffered from this but old version vscode/electron product does.
The official support of M1 were provide by electron11,So I thought it's worth to try
|
@vince-fugnitto @paul-marechal |
@linhanyu I'm sorry I don't understand. Are you saying that Electron 9.4.4 and Node 12 works? Those are the versions on master already. We can't do much with this PR as long as the CQ is pending. Also now that I now what I need to do with this it should be done for the release after the one this week. |
75d3efb
to
1e8694a
Compare
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.
LGTM 👍
The outstanding issues identified (bug from electron itself, and open folder) are resolved, and feedback from other reviews are addressed.
I confirmed that the following work well:
- build and starting the app
- searching (ripgrep)
- debugging
- scm
- searching extensions
- language features
- electron specific functionality related to windows, menus and context-menus
If issues are identified after the release we can address them and think about patch releases if anything is critical (users can always use previous versions of theia
).
@paul-marechal Thank you very much for working on this! @msujew @vince-fugnitto @colin-grant-work : Thank you for your testing and review efforts! |
@msujew I haven't been able to reproduce that issue? Is it still happening? edit: I don't see how this can happen now that the cache for the shared library is the following: const ffmpegCachedPath = path.join(os.tmpdir(), `theia-cli/cache/electron-v${electronVersion}`, ffmpegName); |
I had a similar issue with the Yeoman template, did not yet investigate, see eclipse-theia/generator-theia-extension#127. Steps to reproduce: |
"Error: Cannot find module '../build/Debug/ffmpeg.node'" |
It's the kind of issue that I only learn about when actually publishing :( We'll do a patch release with all the files properly published. |
@paul-marechal I agree, it is not possible to find all potential errors before publishing! I would say the good news is that we have the infrastructure in place to catch these issues, the nightly of the generator failed. However, there was not enough time between the merge of this PR and the release so we were not able to react. The nightly failed after the release was already done. I believe this is something we can easily fix process wise. |
"Next" build of the generator success already: https://github.com/eclipse-theia/generator-theia-extension/runs/4984992338?check_suite_focus=true#step:6:1 |
@JonasHelming the workflow you linked actually failed with the same known previous error, the reason being that We tried building our own test apps using 1.22.1 instead and we were successful. |
What it does
We currently have a hard dependency on
electron
, meaning that oncepackaged we have a redundant
electron
installation part of theapplication.
A workaround has been to configure the packagers to ignore that runtime
dependency on
electron
, but this is a workaround that has to be donefor each app.
In order to make it as easy as possible for adopters to consume the
framework, the goal is to encapsulate Electron-specific dependencies
into
@theia/electron
and haveelectron
itself added to application'spackage.json
underdevDependencies
.As part of updating the version of
electron
, this commit also fixesthe dependency problems in the framework:
electron
from9.4.4
to^15.3.5
.ffmepg
related C code into its own@theia/ffmpeg
package.ffmpeg
replace and check scripts from@theia/electron
to@theia/cli
as commands:ffmpeg:replace
andffmpeg:check
.theia build
on theelectron
target.theia-re-exports
utility to generate re-exports and generatedocumentation (based on
mustache
templates).@theia/electron
to re-export Electron-specific dependencies as@theia/electron/shared/...
.@theia/core
re-export scripts to re-export everything from@theia/electron/shared/...
as@theia/core/electron-shared/...
.@theia/eslint-plugin
rule that helps with re-using sharedexports within the code base.
electron
todevDependencies
for Electron applications.electron-rebuild
's ABI whenrebuilding modules for Electron as it might get lost with versions
that are too recent.
ajv
from@theia/core
.package.json
scripts to silenceyarn
, otherwise it willstack error messages when nested
yarn run
calls are executed.How to test
electron
entry fromexamples/electron/package.json#devDependencies
.yarn build
in the Electron example application should add it back.@theia/electron
entry fromexamples/electron/package.json#dependencies
.yarn build
in the Electron example application should fail because of the missing dependency.Review checklist
Reminder for reviewers