Skip to content

Fix running build on node 18#1378

Closed
aeisenberg wants to merge 3 commits intomainfrom
aeisenberg/node-18
Closed

Fix running build on node 18#1378
aeisenberg wants to merge 3 commits intomainfrom
aeisenberg/node-18

Conversation

@aeisenberg
Copy link
Contributor

@aeisenberg aeisenberg commented Jun 3, 2022

Two problems:

  1. source-map@0.7.3 does not work on node 18
  2. need to set --openssl-legacy-provider because webpack is using
    openssl in a legacy way that was changed in node 17.

Fixes #1373

I'm reticent to merge this change even if it does work since we are pointing directly to a git repo and an unreleased sha for source-map. If a new release is not made before we need to upgrade to node 18, we may need to fork the repo and release a version ourselves.

Checklist

  • [n/a] CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

Two problems:

1. source-map@0.7.3 does not work on node 18
2. need to set --openssl-legacy-provider because webpack is using
   openssl in a legacy way that was changed in node 17.
@aeisenberg aeisenberg requested a review from a team as a code owner June 3, 2022 22:53
@aeisenberg aeisenberg requested a review from elenatanasoiu June 3, 2022 22:53
@elenatanasoiu
Copy link
Contributor

I'm reticent to merge this change even if it does work since we are pointing directly to a git repo and an unreleased sha for source-map.

I think the danger with this approach is that we might forget to replace the unreleased SHA with an official version of source-map as there's nothing prompting us to check for a newer version when we need to switch to Node 18.

Since the ultimate goal of this is to unblock us to use Node 18, I'd be inclined to suggest we wait until we'll need to run on 18 instead of half-heartedly upgrading source-map now. We'll then be prompted to upgrade source-map as part of that process and by that time it's likely an official version will be released.

What do you think?

@aeisenberg
Copy link
Contributor Author

There's no rush to upgrade right now, but also, the request to upgrade source-map has been open for a while and there still hasn't been a release.

My concern is that when vscode moves to node 18, this extension will be broken until we get a new version of source-map (and fix the other problems). At this point, we're going to need to scramble to fix it fast.

It's hard to tell how often vscode updates its node versions. Maybe every 8 months? And the last time was in March. I don't want to get blindsided by this in the future, but we don't need to fix this now.

@elenatanasoiu
Copy link
Contributor

elenatanasoiu commented Jun 14, 2022

@aeisenberg Good news! Looks like a fix was merged into source-map to address the failing build (in Oct 2020): mozilla/source-map#423.

And a new release (0.7.4) containing the fix was pushed 10 days ago, which is quite Nice of them. ;)

I've just tested this (branch) with the steps described in the original issue and the build now works correctly.

@aeisenberg
Copy link
Contributor Author

Thanks for looking into this. That's good news. Would you mind pushing up your change?

@elenatanasoiu elenatanasoiu force-pushed the aeisenberg/node-18 branch 3 times, most recently from e86b4a7 to 50b3413 Compare June 14, 2022 14:34
A new release of source-map was pushed 10 days ago:
https://github.com/mozilla/source-map/releases/tag/v0.7.4

It contains a fix for building on Node 18 (which was added in Oct
2020): mozilla/source-map#423.

Let's make use of it!
@aeisenberg aeisenberg force-pushed the aeisenberg/node-18 branch 4 times, most recently from da54ca9 to ebc2acd Compare June 14, 2022 21:33
@aeisenberg aeisenberg force-pushed the aeisenberg/node-18 branch from ebc2acd to 7efe3ea Compare June 14, 2022 21:39
@elenatanasoiu elenatanasoiu mentioned this pull request Jun 15, 2022
3 tasks
@aeisenberg
Copy link
Contributor Author

Closing in favour of #1378.

@aeisenberg aeisenberg closed this Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken build on Node v18

2 participants