-
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
Move from node 16
to node >=18
#12711
Conversation
OK there's something weird going on with the CI runners and I won't have much time to troubleshoot this. I don't get any of the errors the Windows workflow has, even when starting from a fresh clone. The Help is welcome here. |
@paul-marechal Could you please rebase this repo, this repo has some conflicts that needs to fixed for testing. |
10d363c
to
50b892f
Compare
@paul-marechal could you please suggest a way to test this build in my local ( MAC ) system, I followed the below steps for setup https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#quick-start
but after cloning and yarn install, it throws the
|
@rahulgupta-acquia well the fact that it doesn't work is the issue I was asking help with... But looking at the logs again I might have figured it out: See latest commit. |
16fa0cf
to
a79c8b1
Compare
yes, i checked |
@rahulgupta-acquia you mean that it worked for you when using |
No, i am facing issue at the time of I think my issue is not related to this PR. |
@paul-marechal Do you have any document or steps to test this PR in Local system (MAC)? |
@rahulgupta-acquia I don't have any more steps than what you found here: https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#quick-start |
I need to build IDE using this PR. |
@paul-marechal Once this CI/CD success, Do we say Theia is supported Node >=18? |
@rahulgupta-acquia I'd like for other contributors to check for regressions before proceeding but yes! |
Thanks for the update. Could you please adjust the developer readme? Thanks Line 55 in c8fb5ad
|
IP v6 addresses were being used over IP v4 but I found a way to get back to the previous behaviour using |
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.
Reviewed the code changes.
@paul-marechal Could you please rebase this repo. |
483e0a2
to
73b51e2
Compare
@paul-marechal code rebase needed. @msujew @tsmaeder @vince-fugnitto Request for review. |
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.
We need to upgrade the node version here as well. I also agree with Vince, that as long VSCode extensions are using Node 16, that we should use 16 in our testing matrix as well.
Otherwise this looks pretty good to me 👍
73b51e2
to
6c6a24d
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.
The changes look good to me 👍
@vince-fugnitto Do we want to include this in the upcoming release?
Sounds good to me! |
Using Node 20.x it seems like Yarn complains about missing `node-gyp`. It will actually shortcut the first call to `yarn install` when it is missing in order to automatically install it. Instead we'll explicitly make sure that node-gyp is installed.
bb72a2d
to
493c4f0
Compare
@@ -4,17 +4,17 @@ | |||
"version": "0.0.0", | |||
"engines": { | |||
"yarn": ">=1.7.0 <2", | |||
"node": ">=16.14.0 <17" | |||
"node": ">=16" |
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.
Curious: the Developing.md was updated to say developers should use >= 18.17 and < 21. But this line says >= 16. Why that discrepancy?
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.
While we generally recommend the version range that you've mentioned, there is no technical reason for limiting it to that range. Though we know that < 16.0.0 doesn't work due to native dependencies. 18.17.0 is specifically the recommended minimum version because that's the version that our Electron version uses.
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.
We recommend a certain version range in our documentation as we try to make sure it works for said range.
This engines.node
field will have Yarn stop the build if you use anything outside the defined range, and I might have left it lax so that it's more convenient when switching between node versions for development purposes.
Most other NPM projects -including our deps- are also pretty lax with this range (click to expand).
- https://github.com/websockets/ws/blob/d8dd4852b81982fc0a6d633673968dff90985000/package.json#L32
- https://github.com/socketio/socket.io/blob/9a2a83fdd42faa840d4f11fd223349e5d8e4d52c/package.json#L92
- https://github.com/jprichardson/node-fs-extra/blob/a277cbbdf630424482b1e7418749ccaac0db98fe/package.json#L6
- https://github.com/RogerDeng/drivelist/blob/6b79bf74a40e19bc69a561b978067807060192c4/package.json#L36
- https://github.com/facebook/react/blob/faa65778b7c277e0020b8bb1fc172e11a863c0b7/packages/react/package.json#L38
- https://github.com/Axosoft/nsfw/blob/13a84d97c0d778535bbc3baebcc6dc1216a26325/package.json#L22
- https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/package.json#L113
- etc
But we could move the lower bound along the minimum recommended version.
At the very minimum we need to update this range based on the kind of constructs we use from NodeJS: we can't use new Node 18 syntax and claim that we require anything below Node 18 to run our code base. Although syntax-wise we're dependent on our TypeScript compilation target: No matter what TS syntax we use tsc
will "dumb it down" for us in the output JS based on our configs. We're currently targeting ES2019 and it seems like Node 16 supports it very 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.
In the long run it's in everyone's best interest to always use the latest Node LTS, but some might still lag behind so the range can accommodate for it somewhat.
Now I remember: Had I updated the range to >=18
for that release then all users of the framework would have had build issues because they most likely were still running on Node 16 at that point. So instead of breaking everyone on release I kept it that way so people can update when they're ready. It's not like the project will stop working on Node 16 right away :)
Thanks guys. That was very enlightening. So if I had to summarize the sum of the messages and maybe read between the lines a little, this is what I think is being said: At this point in time:
|
What it does
Update our CI/CD to run using Node.js 18.x and 20.x.
Update
macaddress
to include the fix for Node.js 18.x.Closes #11220
How to test
Everything should run as usual? CI/CD should be green.
Review checklist
Reminder for reviewers