Bug 244248

Summary: editors/vscode - preinstall node version patch
Product: Ports & Packages Reporter: Sebastian Stroniewski-Wojtczak <sebastian.stroniewskiwojtczak>
Component: Individual Port(s)Assignee: Hiroki Tagato <tagattie>
Status: New ---    
Severity: Affects Many People CC: meta, tagattie
Priority: --- Flags: bugzilla: maintainer-feedback? (tagattie)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch for Node Version used during pre compilation. none

Description Sebastian Stroniewski-Wojtczak 2020-02-20 18:18:47 UTC
Created attachment 211779 [details]
patch for Node Version used during pre compilation.

Hi,

I've checked building VsCode with never version of Node. Currently I'm using 13.7.0 while default VsCode marked that version as not supported. It builds like a charm with Node >=13.



******** patch-build_npm_preinstall.js *********

-if (majorNodeVersion < 10 || majorNodeVersion >= 13) {                                                                                                                                
+if (majorNodeVersion < 10 || majorNodeVersion >= 15) {    

******** patch-build_npm_preinstall.js *********

Full patch attached.
Comment 1 Hiroki Tagato freebsd_committer freebsd_triage 2020-02-22 05:13:50 UTC
(In reply to Sebastian Stroniewski-Wojtczak from comment #0)

I'm not sure I'm following.

The port specifies Node version 10 as its dependency. So allowing higher Node versions I guess does not much make sense. Why do you want to build with Node >=13?
Comment 2 Sebastian Stroniewski-Wojtczak 2020-02-23 09:00:47 UTC
The Port only mark Node to version 10 while we can install www/node which is 13.7.0 actually.

The port does not stopped building due to wrong version of Node but will continue and fail during configuration/compilation because of "majorNodeVersion >= 13" which is part of build/npm/preinstall.js.

Latest stable release 13.8.0

So we can with small files/patch allow users to decide which Node version they can use to build VsCode.

Port dependency is handled by any Node version installed in the system. In my case its www/node (13.7.0). So the only blocking point is to allow building VsCode with newer Node versions instead of forcing users to use version 10<->13.
Comment 3 Koichiro Iwao freebsd_committer freebsd_triage 2020-06-15 05:06:37 UTC
The maintainer is now ports committer, assign to maintainer.