Vscode: Explore update to Electron 3

Created on 21 Jun 2018  路  63Comments  路  Source: microsoft/vscode

VSCode Exploration Builds with Electron 3.0.x:

electron electron-3-update plan-item

Most helpful comment

Merged to master for our release early February 2019. Should be available in insiders end of week.

All 63 comments

Issues so far:

@bpasero you'll need to re-release https://github.com/bpasero/fsevents in order to pick up [email protected]

@Tyriar is that a change compatible with older Electron versions or do we need a specific release only for Electron 3.x?

@bpasero it's compatible, the latest insiders is using [email protected] for node-pty.

@Tyriar we might have to fork NSFW, I do not think that project is active anymore...

@Tyriar I published [email protected] to try with

We already forked nsfw to vscode-nsfw to release https://github.com/Axosoft/nsfw/pull/47 (repo: https://github.com/Tyriar/nsfw/tree/vscode-release)

@Tyriar I pushed https://github.com/Microsoft/vscode/tree/electron-3.0.x that compiles. There are some serious issues I have not looked into, e.g. I cannot save files for some reason.

I believe that one could be due to https://github.com/nodejs/node/issues/2006

A lot of errors in the terminal running code.sh coming from devtools:

image

Saving actually does work, the first time at least. It just doesn't lose the circle indicator and then after that lots of things seem to be broken, like I cannot close the window via custom menu bar and ctrl+r doesn't work to reload.

@Tyriar can you make a branch on vscode-nsfw for the NAN update, then I can remove my custom project? I am not even sure which GitHub repo that would be?

Would be cool to get a build with Electron 3 running for next weeks Electron hackathon 猸愶笍 . I will start with looking into the weird save issue.

@rebornix @alexandrudima is this V8 change something we need to change in our code? I remember we once did changes around this where we assume a certain max string length:

image

(via https://v8project.blogspot.com/2017/09/v8-release-62.html)

Looks like the xterm.js parser is firing layouts in the scroll bar code in Ch66 (not in 58 or 61):

screen shot 2018-08-09 at 11 48 58 am

Actually this is happening in 58 and 61, it's just way faster:

screen shot 2018-08-09 at 11 50 50 am

Slow layouts is something we should look out for. I can look into fixing this in xterm.js as this should only be happening when a frame is rendered https://github.com/xtermjs/xterm.js/issues/1606.

Fyi I got NSFW working now, looks like another change for Node 10 compatibility is needed: https://github.com/bpasero/vscode-nsfw/commit/2c0ff39a2f5157fee04e407014026123e4bd3295

We have our first VSCode exploration builds out (see description of the issue for download links).

Some function does not work in electron 3.0 on Windows:

  • Process explorer, Runnning processes section (in issue reporter) and Workspace metadata section ( in issue reporter) are blank
  • code-exploration --status dose not work with follwing error
(node:47356) UnhandledPromiseRejectionWarning: #<Object>
(node:47356) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:47356) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I am looking forward to vscode will be much better by updating to electron 3.0!

@EbXpJ6bp yeah good catches, I see that windows-process-tree somehow fails to load. Probably a build failure related to the node 10 update.

@EbXpJ6bp should be fixed with download.

@bpasero thanks! With the latest build, it is working.

Electron 3 doesn't have the slow canvas render issues (workaround --ignore-gpu-blacklist) that i see in 2 on my Linux box :tada:

Electron 3.0 fixed https://github.com/Microsoft/vscode/issues/45492 for me. :tada: Hopefully it can be merged soon. (Sorry I kept linking the wrong issue).

@bpasero Our code should work as usual when we switch to Electron 3.0 but we need to do some benchmark to see whether we should optimize our buffer size to appeal to the new string max size.

@bpasero What beta build of Electron have you integrated in the current download links in the original post?

@shamiln the links are probably a bit outdated, I can update them (though on macOS and Windows you will get auto-updated). The latest is: Electron 3.0.0-beta.10

Every time i open setting as json file. (3.0.0-beta.10)

capture

@pixieaka yeah I reported this, should be fixed soon (@dbaeumer @aeschli )

mac os All extensions failed to start
image
image

@bpasero @dbaeumer It was confirmed that the error was due to the following extension of the installation, which you can try to install to reproduce the problem.
https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer
image

I am not seeing that, weird. There will be a new build in a moment. Let me know if that changes anything.

https://github.com/Microsoft/vscode/issues/52629#issuecomment-420633397 new LSP libraries are released.

Electron 3 uses Nodejs 10, which ships the new ABI stable API for native modules NAPI, so I played with node-spellchecker and ported it to NAPI https://github.com/rebornix/napi-spellchecker . Now when writing extensions using napi-spellchecker, it will not break or throw errors/warnings when the node version doesn't match. I also ran extensions with napi-spellchecker on current Insiders (which is using Node < 10) and the extension still works but throws warning about the usage of experimental API.

We may want to use NAPI if possible one day and then we don't need to worry about node version change any more like https://github.com/Microsoft/vscode/issues/52629#issuecomment-399194181 . It can help with our OSS experience as well. We can now recommend extension authors to use NAPI if they want to improve the performance by leveraging native modules.

@rebornix If your going to recommend authors can now use use NAPI to improve performance. Would it be also reasonable to note that Node 10 has stable support for WASM. So they can also use WASM to get similar benefits: https://github.com/rustwasm/wasm-pack

@corbinu definitely, wasm is another good solution to improve the performance and it has its special benefits

  • broader language support
  • OS independent

The second advantage above can be seen as disadvantage as it can't support talking to the system but it's up to extension authors which one to use. Thanks!

Electron 3.0.2 1.29.0 Exploration ( user setup )

Error 1

capture

Error 2 [ Note: When I press Release Notes from about it open web page in my default browser ]

< https://go.microsoft.com/fwlink/?LinkId=724002 >

Then redirect to

< https://github.com/Microsoft/vscode/wiki/Insiders-Release-Notes >

capture2

@pixieaka yeah, extra points if someone can find out which code is triggering Error1. The second error is expected because we have not released release notes for 1.29 yet.

Windows [Version 10.0.17763.1]

Command line bug

capture

@pixieaka it's a regression in Windows that we can't do anything about unfortunately https://github.com/Microsoft/vscode/issues/57803

@Tyriar so, it is impossible that a Microsoft team urges another Microsoft team to fix a bug?

ok.

@jens1o Windows is enormous and has a complex release process as a result, it was too late when it was discovered to do a fix.

@Tyriar Please further delay the rollout of Electron 3, so then I'm already on Linux. Thank you.

There is no chance this will be handled in like the next sprint of Windows?

@jens1o Electron 3 has nothing to do with the terminal issue, why would we delay it?

I'm working on conpty support in the October iteration which is expected to fix it as we will no longer be using winpty for this version of Windows. Also, the Windows Console team is now tracking the issue at https://github.com/Microsoft/console/issues/270

on linux if you click on settings->download now, it links to the insiders build which doesn't use electron 3.

@graph that's by design, the Electron 3 build is very experimental. If you're using it on Linux via the deb package though it should be getting published to the apt repo: https://packages.microsoft.com/repos/vscode/pool/main/c/code-exploration/

I see. I like the package manager approach. PPA should be the main instructions on the website for linux. The update to insiders confused me I thought it was renamed.

using the exploration update it feels that the scrolling issue I had is fixed in electron 3. I've been using all versions stable, insiders, and exploration on windows & linux. I only had it happen on stable & insiders weird scroll jumps. In the latest version of stable on linux even though it's electron 2 it happens much less frequently now.

@graph when you install the deb from the website it should install the repo as well.

Are these __exploration__ builds official ?

@aayushbisen they are manually released but should be similar to our insider builds. not as stable as "stable", but I for example use them everyday since 2 months for development.

@bpasero Why this ??
image

@pixieaka we will have to hunt down node modules we depend on that use the deprecated buffer constructor and update.

It's almost time to start exploring Electron 4 馃槃

Is there somewhere I can get the latest exploration build. I'd like to test out vscode in electron 3.0

I don't think so, yet.

But you can build it from source How-to-Contribute#build-and-run.

For real? There are 3 links in the original post with download links to the exploration build, depending on your OS 馃槼

Sorry @dalDevelo , i assumed that @loligans already saw that and is not running on an OS using dmg, exe or deb packages. I.e. have Fedora which wants a rpm package.

@compilenix. Thanks for clarifying, your response makes sense now. It's perhaps best if @loligans states his exact requirements in his post, to avoid assumptions and...in my case, confusion.

Ty

It's almost time to start exploring Electron 4 馃槃

Yes: https://github.com/Microsoft/vscode/issues/61787

Is Electron 3 expected to be ready for the November release or not until February? I'm trying to decide whether to backport a fix in a module I use (which I will do if Electron 3 is Feb+) or just wait for the next release.

@phv Q1 2019

Thanks, I'll backport. Not a big deal.

(PS: Improved support for binary dependencies would be welcome and I know you're tracking that elsewhere.)

Merged to master for our release early February 2019. Should be available in insiders end of week.

Electron 4 is released, https://electronjs.org/releases#release-notes-for-v400
It includes Chromium 69.0.3497.106 and Node 10.11.0

Was this page helpful?
0 / 5 - 0 ratings