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

win: update supported vs versions #2959

Merged

Conversation

StefanStojanovic
Copy link
Contributor

Checklist
  • npm install && npm run lint && npm test passes
  • commit message follows commit guidelines
Description of change

Since Node.js v22 will use C++20 standard, VS2017 can no longer be used for compiling native add-ons. This is already changed in the docs. This PR drop VS2017 support for Node.js v22 and above for node-gyp.

Note: Node-gyp with this change should be released and consumed by Node for the v22 RC to avoid potential problems on Windows.

cc @targos, @nodejs/node-gyp

Refs: nodejs/build#3603
Refs: nodejs/node#45427

lib/find-visualstudio.js Outdated Show resolved Hide resolved
}

// Invoke the PowerShell script to get information about Visual Studio 2017
async findVisualStudio2017 () {
Copy link
Member

Choose a reason for hiding this comment

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

This function should be removed. Also this should be a breaking change. commit. msg should be like

win!: update supported vs versions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've changed the commit message. Should I also add the semver-major label?

Regarding the removal of findVisualStudio2017, why do you think it should be removed? I've added it in this PR so that VS2017 can be prohibited on Node v22+, while VS2019 and VS2022 will be enabled. On previous Node versions all 3 VS versions should work, like they are working in the current main branch.

Copy link
Member

Choose a reason for hiding this comment

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

I don't follow the reasoning why this would be a breaking change. @gengjiawen Can you elaborate on this?

Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

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

LGTM, but I don't have authority on this project.

@cclauss
Copy link
Contributor

cclauss commented Jan 16, 2024

I re-ran the failed jobs...
A new attempt at this workflow will be started, including all failed jobs and dependents:

  • macos - 3.8 - 20.x
  • windows - 3.12 - 20.x

All tests pass.

Copy link
Member

@lukekarrys lukekarrys left a comment

Choose a reason for hiding this comment

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

LGTM. I would like others' thoughts on if this is a breaking change as referenced here #2959 (comment).

I don't think it is, in which case I can squash and merge with the PR title as the commit so the automated release does not tag this as a semver major.

@gengjiawen
Copy link
Member

LGTM. I would like others' thoughts on if this is a breaking change as referenced here #2959 (comment).

this mainly follow Node.js main repo for compiler change.

@lukekarrys
Copy link
Member

@StefanStojanovic Do you think this should be merged while #2957 is awaiting updates to your feedback?

@StefanStojanovic
Copy link
Contributor Author

@StefanStojanovic Do you think this should be merged while #2957 is awaiting updates to your feedback?

This can be merged. The thing is, if that happens, the function other PR adds (findVisualStudio2017OrNewerUsingSetupModule) should also be split into 2 parts: 2017 and 2019+. I can do that work in that PR directly or as additional PR after that one lands.

Just a note, before merging I should squash the fixup commit and probably change win! to win at the beginning of the first commit message. I'll do that a bit later during the day

@StefanStojanovic
Copy link
Contributor Author

@lukekarrys I've made the changes preparing this for merge. As I mentioned earlier, I have no problem making adjustments in #2957 (or in a separate PR) to get it in line with this.

Drop VS2017 support for Node.js v22 and above.

Refs: nodejs/build#3603
Refs: nodejs/node#45427
@StefanStojanovic
Copy link
Contributor Author

I've rebased this PR on top of the main branch, which now has the changes from #2957. @lukekarrys, since you've already approved my previous changes, I'd like to ask you to review the new ones and if it LGTY, land this.

@StefanStojanovic
Copy link
Contributor Author

A reminder to @nodejs/node-gyp about this PR. I've adjusted it after #2957 landed, and as far as I can tell, it should be ready for merging.

@StefanStojanovic
Copy link
Contributor Author

Since this is already approved and no there were no objections, I plan to land this tomorrow. If there are any complaints please state them until then.

@StefanStojanovic StefanStojanovic merged commit 391cc5b into nodejs:main Mar 6, 2024
35 checks passed
@lukekarrys
Copy link
Member

Sorry for the delay on review @StefanStojanovic and thank you for landing this.

I will work on getting this published this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants