Bug 244248 - editors/vscode - preinstall node version patch
Summary: editors/vscode - preinstall node version patch
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Hiroki Tagato
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-20 18:18 UTC by Sebastian Stroniewski-Wojtczak
Modified: 2024-12-08 21:07 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (tagattie)


Attachments
patch for Node Version used during pre compilation. (435 bytes, patch)
2020-02-20 18:18 UTC, Sebastian Stroniewski-Wojtczak
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.
Comment 4 John Hein 2024-12-08 21:07:57 UTC
This is a bit old.  Please update or close this bug.

I noticed the default node version (LTS) is lang/node22.  But vscode depends on lang/node20.  Since node20 and node22 currently conflict, that prevents building/installing vscode if someone has the default node22 installed.  That's probably a separate bug at this point, but it's at least somewhat related (and it's why I started looking in bugs.freebsd.org to see if someone had already started to investigate building vscode with node22).