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
[electron] Update Theia to use Electron 3.x and Node 10.x #4750
Conversation
Generally, we (TypeFox) are for it, but could we hold it for one week till next Saturday? We have some releases depending on Not sure how going for node 10 affects other products. @benoitf @caseyflynn-google |
Absolutely |
That's a very important detail; maybe squeeze a mention in the PR's label to that it's clear and people will know this is tentatively coming soon? |
This one is not necessary: it's a test/build dependency, already covered by a CQ, for "version: 0.5.9 and later versions" |
d7f4d6c
to
116625e
Compare
@@ -174,8 +174,7 @@ describe('Tree', () => { | |||
const expectedRefreshedNodes = new Set([ | |||
retrieveNode<CompositeTreeNode>('1'), | |||
retrieveNode<CompositeTreeNode>('1.1'), | |||
retrieveNode<CompositeTreeNode>('1.2'), | |||
retrieveNode<CompositeTreeNode>('1.2.1')]); |
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.
There is a race condition here where not all nodes are deleted before the refresh()
promise returns.
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.
Had a hard time with this one but why this test was OK before migration to node 10 ?
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.
I think the race simply gets further in different Node versions :/
packages/search-in-workspace/src/node/ripgrep-search-in-workspace-server.slow-spec.ts
Outdated
Show resolved
Hide resolved
This is ready for review, pending the CQ being approved. Some guidance/help on the commented test would be really useful. |
https://nodejs.org/docs/latest-v10.x/api/child_process.html#child_process_subprocess_connected Maybe Node's child_process module behaves differently now. From my tests, in the |
Signed-off-by: Rob Moran <rob.moran@arm.com>
Thanks @marechal-p . It transpires the process pipes are undefined in |
Tests fixed and PR ready for final review. |
@thegecko we will try on Monday, busy with internal releases |
@@ -106,7 +106,7 @@ export class MarkdownPreviewHandler implements PreviewHandler { | |||
if (!elementToReveal) { | |||
return; | |||
} | |||
elementToReveal.scrollIntoView({ behavior: 'instant' }); | |||
elementToReveal.scrollIntoView(); |
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.
@AlexTugarev What are consequences of this change? Could you review the preview extension in this PR?
I wonder why it's affected. It's not part of Node.js, but DOM api.
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.
@akosyakov, instant
scroll behavior was experimental, apparently they removed it leaving smooth
and auto
. this change shouldn't make any difference.
fyi, instant
was in place just to make sure it isn't using smooth
by default, which would be bogus as it's not an atomic operation.
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
The browser version works nicely in Gitpod. Checking Electron locally. @kittaakos could you check as well? |
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.
It works nicely for me in local Electron as well. Tested that typescript language support is there and Node.js debugging works. The only issue i've stumbled upon that yarn start
picks up wrong Node.js version, so has to start with npx theia start
.
Does any have objections to merge it or concerns regarding what can go wrong? It's time for testing. |
@thegecko @akosyakov I tried running the example-electron application and was unsuccessful. I've tried both on macOS and Ubuntu using Node v10.15.3. Perhaps I am doing something wrong.
|
@vince-fugnitto did you run |
Thank you @thegecko, forgot about that! |
- init: yarn install | ||
command: cd examples/browser && yarn start --hostname 0.0.0.0 ../.. | ||
- init: nvm install 10 && nvm use 10 && yarn | ||
command: yarn --cwd examples/browser start ../.. |
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.
This will eventually fix #4818 too but you have to restore --hostname 0.0.0.0
, don't you?
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.
Gitpod is capable to auto expose localhost now, providing hostname is redundant.
@@ -1,8 +1,8 @@ | |||
ports: | |||
- port: 3000 | |||
tasks: | |||
- init: yarn install | |||
command: cd examples/browser && yarn start --hostname 0.0.0.0 ../.. | |||
- init: nvm install 10 && nvm use 10 && yarn |
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.
Why do not we install 10.15.3
if the documentation says: "Preferably, use version 10.15.3
"
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.
what issues do you see with using latest node 10? before we were using latest node 8, seemed to work just fine
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.
it's the same in travis config btw
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.
I just do not understand why do we recommend a version in the documentation but do not stick to it in the gitpod script.
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.
Electron ships with Node 10.15.3, there is a slight danger you could introduce incompatibilities if you build using a newer version, however I wouldn't want to restrict people to a specific release otherwise.
This was the same with Electron 2, you can't override the node version it uses.
IMO, the current set up gives the user the right amount of flexibility.
I can see the followings logged in the browser console after starting the electron application from this branch. Does anyone know where do they come from?
|
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.
I have tried it locally, checked the TS-LS; it worked.
I have seen this when I closed the browser windows:
Attempting to call a function in a renderer window that has been closed or released.
Function provided here: 41.bundle.js:547:27
root INFO Stopped watching the git repository: file:///Users/akos.kitta/git/theia
Attempting to call a function in a renderer window that has been closed or released.
Function provided here: 41.bundle.js:547:27
Attempting to call a function in a renderer window that has been closed or released.
Function provided here: 41.bundle.js:547:27
I believe this also exists on master. |
@kittaakos I've created a separate issue to remove the usage of |
All concerns seem to be dealt with, I'm merging this. |
We should update next images in theia-apps: https://github.com/theia-ide/theia-apps/tree/master/theia-docker We've overlooked it and broke all of them with this PR! |
Should be a simple change to use |
@thegecko the time consuming part is to test that they build and start properly, and that a change does not affect latest images (using 0.5.0) |
This fixes #2009, #3729
The PR brings in changes to update Theia to Electron 3, which specifically uses:
10.2.0
66
6.6
Please discuss impact concerns below.
It also updates the minimum node version used by Theia to v10.x.x
To do:
Create CQ for wdio-mocha-framework: 0.6.4(dev dependency]Create CQ for vscode-nsfw: 1.1.2(nsfw 1.1.2 just merged into master)cc @debovema