-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Hacking on Atom Core: Update build requirements to be accurate #630
Conversation
Information on required Visual Studio versions and Python versions were out of date, considering that we use newer `node-gyp` now.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
One last thing to note, Python 3 only works with So maybe that |
This comment has been minimized.
This comment has been minimized.
* Command Line Tools for [Xcode](https://developer.apple.com/xcode/downloads/) (run `xcode-select --install` to install) | ||
|
||
{{/mac}} | ||
|
||
{{#windows}} | ||
|
||
* Node.js 6.9.4 or later (the architecture of node available to the build system will determine whether you build 32-bit or 64-bit Atom) | ||
* Python v2.7.x | ||
* Node.js 10.12 or later (the architecture of node available to the build system will determine whether you build 32-bit or 64-bit Atom) |
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 use Node 12 in our CI builds. Shouldn't that be the supported version?
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.
10 is still an officially supported Long Term Support version for now: https://nodejs.org/about/releases/
(Until the end of April in 2021)
we (@aminya and I) are trying to work on Atom and polish up all the rough edges for those who want to fork it. This important documentation explaining how to get started with Atom is one of the first things users read when trying to contribute. We would really appreciate if these updates could be reviewed and approved. These suggested updates are based on our active contributions to Atom, including my work on updating some of Atom's build script Node dependencies, and both of our reading through/running the CI configs. I know them to be accurate. It would be great to get updated docs. Thanks for considering. - DeeDeeG |
Python 3 will be supported on Windows when atom/atom#20856 or similar gets merged into the atom repository.
This should be a recommended way of getting build tools set up. It works really well, and is much easier than a manual install of Visual Studio/C++ tools/Python 2. It sets them all up for you. I personally wouldn't recommend any other way to someone I knew. Co-authored-by: Amin Yahyaabadi <aminyahyaabadi74@gmail.com>
More research about which NPM versions are supported: Briefly: Users with NPM 3.10.7 or newer can bootstrap and build Atom successfully. (I personally still lean toward recommending folks should use the latest major version of NPM, that is currently NPM 6 (or newer), which is what I did in this PR, but I am open to feedback from the maintainers.) Research details (click to expand):Tested on Ubuntu 20.04: Atom can be bootstrapped and built with older NPM all the way back to This is a little alarming to do, in my opinion, because Somehow this still works, at least for bootstrap/build. This doesn't affect the So overall the user's NPM isn't used for much, and apparently only needs to be v3.10.7 or greater. By the way, newer versions of NPM are supposedly much faster to complete an And besides: Node 10.12.0 (the oldest Node we support right now for bootstrap/build) already comes bundled with NPM 6.4.1... It's hard to picture someone running Node 10.12 or newer with an NPM older than that. Users will naturally be on NPM 6 or newer unless they go out of their way to install older NPM. I'm thinking we should still recommend users use NPM@6 or greater. Older versions aren't supported by the NPM team, for one reason. And for another reason, anything older than NPM@5 won't read the |
Research about Visual Studio: node-gyp 5.x supports Visual Studio 2015, 2017 and 2019, at least officially. (See the CHANGELOG.md. Visual Studio 2019 support was added in node-gyp 5.0.0.) With the versions of Node we are using, Visual Studio 2013 is no longer supported. If you try to do
|
This comment has been minimized.
This comment has been minimized.
Visual Studio 2015, 2017 and 2019 are supported. Windows 8 SDK or Windows 10 SDK are supported. Clarified windows-build-tools install instructions. The latest windows-build-tools will be fine for the foreseeable future (Even when they default to Visual Studio 2019 some time soon.)
7fd9845
to
88cf835
Compare
* A `git` command is in your path | ||
* Set the `GYP_MSVS_VERSION` environment variable to the Visual Studio/Build Tools version (`2013` or `2015`) e.g. ``[Environment]::SetEnvironmentVariable("GYP_MSVS_VERSION", "2015", "User")`` in PowerShell (or set it in Windows advanced system settings). | ||
* Set the `GYP_MSVS_VERSION` environment variable to the Visual Studio/Build Tools version (`2015`, `2017`, or `2019`.) e.g. ``[Environment]::SetEnvironmentVariable("GYP_MSVS_VERSION", "2015", "User")`` in PowerShell (or set it in Windows advanced system settings). |
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.
Setting GYP_MSVS_VERSION
is usually unnecessary, if you've installed to the default location.
node-gyp has gotten better at locating Visual Studio and its components.
Maybe leave this for the troubleshooting area instead. It's already mentioned there.
I just built Atom with Visual Studio Build Tools 2019 to make sure it works. Screenshots and text output showing Visual Studio 2019 usage (click to expand)When I do [More] > [Export configuration], I get this: # .vsconfig
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.Component.MSBuild",
"Microsoft.VisualStudio.Component.CoreBuildTools",
"Microsoft.VisualStudio.Workload.MSBuildTools",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.Windows10SDK.18362"
]
} Here is rebuilding the dummy project " C:\Users\[User]\apm\native-module>npx node-gyp@5 rebuild --verbose
[...]
gyp info using node-gyp@5.1.1
gyp info using node@10.20.1 | win32 | x64
[...]
gyp verb find VS msvs_version not set from command line or npm config
gyp verb find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp verb find VS checking VS2019 (16.6.30225.117) found at:
gyp verb find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
gyp verb find VS - found "Visual Studio C++ core features"
gyp verb find VS - found VC++ toolset: v142
gyp verb find VS - found Windows SDK: 10.0.18362.0
gyp info find VS using VS2019 (16.6.30225.117) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
gyp info find VS run with --verbose for detailed information
[...]
gyp verb using MSBuild: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe
[...]
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:04.48
gyp info ok |
Update install instructions for Windows.
* Download Python from https://www.python.org/downloads/. | ||
* For Python 2, be sure to install in the default location, or check "Add Python 2.x to PATH" before installing. | ||
* For Python 3, check "Add Python 3.x to PATH", or change the install path to `[Your_Drive_Letter]:\Python37` e.g. `C:\Python37`, (even if your version of Python 3 isn't 3.7, that's one place where the scripts will look.) | ||
* If python isn't found by the bootstrap script, create a symbolic link to the directory containing `python.exe` using e.g.: `mklink /d %SystemDrive%\Python27 D:\elsewhere\Python27`(Links should be set at either `%SystemDrive%\Python27` or `%SystemDrive%\Python37`, regardless of what version of Python you actually have.) |
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.
I'm not sure if this is too much detail. It should be accurate, though.
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.
This is ok with me. 👍
This is now a dependency "7zip-bin" in `scripts/package.json`. The script doesn't look for 7-Zip on the system anymore, so it wouldn't be used even if installed.
This should be the first option. It is recommended by node-gyp and Microsoft. It is either officially or unofficially developed and maintained by Microsoft themselves.
@DeeDeeG Thank you for your submission. 🎉 Have you considered all the possible combinations and ensured that all the them work? |
@sadick254 yeah, I can do some testing on this. There's definitely a lot of "moving parts" so to speak, considering these:
Research details for which versions of npm, Node, Python and Visual Studio are supported (click to expand):npm:Thankfully, the system After the Through testing, I have found that npm 3.10.7 is the oldest (Note: Version 3.10 is a really old version of in short:
|
@sadick254 I've got a big testing "info dump" here. I did some testing with old Node, npm, Visual Studio, and Python. Node.js tests:Windows 10 x64Node 10.11
After:
Directories are empty. bootstrap script did not download chromedriver Node 10.12
After:
Ubuntu 20.04 x64Node 10.11[user]@[host]:~/atom$ script/bootstrap --ci
Node: v10.11.0
Npm: v6.4.1
Python: v2.7.18rc1
Cleaning /home/[user]/atom/apm/node_modules
Cleaning /home/[user]/atom/node_modules
Cleaning /home/[user]/atom/script/node_modules
Installing script dependencies
(node:135034) ExperimentalWarning: The fs.promises API is experimental
(node:135034) UnhandledPromiseRejectionWarning: Error: EEXIST: file already
exists, mkdir
'/home/[user]/atom/script/node_modules/electron-mksnapshot/bin'
(node:135034) UnhandledPromiseRejectionWarning: Unhandled promise
rejection. This error originated either by throwing inside of an async
function without a catch block, or by rejecting a promise which was not
handled with .catch(). (rejection id: 1)
(node:135034) [DEP0018] DeprecationWarning: Unhandled promise rejections
are deprecated. In the future, promise rejections that are not handled will
terminate the Node.js process with a non-zero exit code.
(node:135068) ExperimentalWarning: The fs.promises API is experimental
(node:135068) UnhandledPromiseRejectionWarning: Error: EEXIST: file already
exists, mkdir
'/home/[user]/atom/script/node_modules/electron-chromedriver/bin'
(node:135068) UnhandledPromiseRejectionWarning: Unhandled promise
rejection. This error originated either by throwing inside of an async
function without a catch block, or by rejecting a promise which was not
handled with .catch(). (rejection id: 1)
(node:135068) [DEP0018] DeprecationWarning: Unhandled promise rejections
are deprecated. In the future, promise rejections that are not handled will
terminate the Node.js process with a non-zero exit code.
added 1324 packages in 148.299s After: [user]@[host]:~/atom$ ls script/node_modules/electron-mksnapshot/bin/
[user]@[host]:~/atom$ ls script/node_modules/electron-chromedriver/bin/ Result: No output. bootstrap script did not download chromedriver or Node 10.12[user]@[host]:~/atom$ script/bootstrap --ci
Node: v10.12.0
Npm: v6.4.1
Python: v2.7.18rc1
Cleaning /home/[user]/atom/apm/node_modules
Cleaning /home/[user]/atom/node_modules
Cleaning /home/[user]/atom/script/node_modules
Installing script dependencies
(node:155074) ExperimentalWarning: The fs.promises API is experimental
(node:155108) ExperimentalWarning: The fs.promises API is experimental
added 1324 packages in 192.318s After: [user]@[host]:~/atom$ ls script/node_modules/electron-mksnapshot/bin/
icudtl.dat libffmpeg.so LICENSE mksnapshot snapshot_blob.bin
v8_context_snapshot_generator
libEGL.so libGLESv2.so LICENSES.chromium.html natives_blob.bin
swiftshader
[user]@[host]:~/atom$ ls script/node_modules/electron-chromedriver/bin/
chromedriver icudtl.dat LICENSE LICENSES.chromium.html Result: chromedriver and mksnapshot binaries were downloaded! Success! Conclusion: Node less than 10.12 can't build Atom. npm tests:Windows 10 x64npm 3.10.6
Results: Lots of errors npm 3.10.7
Ubuntu 20.04 x64npm 3.10.6[user]@[host]:~/atom$ script/bootstrap
Node: v10.22.0
Npm: v3.10.6
Python: v2.7.18rc1
Installing script dependencies
npm ERR! Linux 5.4.0-42-generic
npm ERR! argv "/home/[user]/n-prefix/bin/node"
"/home/[user]/n-prefix/bin/npm" "--loglevel=error" "install"
npm ERR! node v10.22.0
npm ERR! npm v3.10.6
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish
(/home/[user]/n-prefix/lib/node_modules/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata
(/home/[user]/n-prefix/lib/node_modules/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule
(/home/[user]/n-prefix/lib/node_modules/npm/lib/install/deps.js:518:12)
npm ERR! typeerror at
/home/[user]/n-prefix/lib/node_modules/npm/lib/install/deps.js:519:7
npm ERR! typeerror at
/home/[user]/n-prefix/lib/node_modules/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at
/home/[user]/n-prefix/lib/node_modules/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish
(/home/[user]/n-prefix/lib/node_modules/npm/lib/fetch-package-metadata.js:67:5)
npm ERR! typeerror at returnAndAddMetadata
(/home/[user]/n-prefix/lib/node_modules/npm/lib/fetch-package-metadata.js:121:7)
npm ERR! typeerror at pickVersionFromRegistryDocument
(/home/[user]/n-prefix/lib/node_modules/npm/lib/fetch-package-metadata.js:146:20)
npm ERR! typeerror at
/home/[user]/n-prefix/lib/node_modules/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this
error at:
npm ERR! typeerror <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/[user]/atom/script/npm-debug.log
child_process.js:650
throw err;
^
Error: Command failed: npm --loglevel=error install
npm ERR! Linux 5.4.0-42-generic
npm ERR! argv "/home/[user]/n-prefix/bin/node"
"/home/[user]/n-prefix/bin/npm" "--loglevel=error" "install"
npm ERR! node v10.22.0
npm ERR! npm v3.10.6
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish
(/home/[user]/n-prefix/lib/node_modules/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata
(/home/[user]/n-prefix/lib/node_modules/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule
(/home/[user]/n-prefix/lib/node_modules/npm/lib/install/deps.js:518:12)
npm ERR! typeerror at
/home/[user]/n-prefix/lib/node_modules/npm/lib/install/deps.js:519:7
npm ERR! typeerror at
/home/[user]/n-prefix/lib/node_modules/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at
/home/[user]/n-prefix/lib/node_modules/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish
(/home/[user]/n-prefix/lib/node_modules/npm/lib/fetch-package-metadata.js:67:5)
npm ERR! typeerror at returnAndAddMetadata
(/home/[user]/n-prefix/lib/node_modules/npm/lib/fetch-package-metadata.js:121:7)
npm ERR! typeerror at pickVersionFromRegistryDocument
(/home/[user]/n-prefix/lib/node_modules/npm/lib/fetch-package-metadata.js:146:20)
npm ERR! typeerror at
/home/[user]/n-prefix/lib/node_modules/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this
error at:
npm ERR! typeerror <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/[user]/atom/script/npm-debug.log
at checkExecSyncError (child_process.js:629:11)
at Object.execFileSync (child_process.js:647:13)
at module.exports
(/home/[user]/atom/script/lib/install-script-dependencies.js:11:16)
at Object.<anonymous> (/home/[user]/atom/script/bootstrap:37:1)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) Result: Lots of errors. npm 3.10.7[user]@[host]:~/atom$ script/bootstrap
Node: v10.22.0
Npm: v3.10.7
Python: v2.7.18rc1
Installing script dependencies
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit
(node:194056) MaxListenersExceededWarning: Possible EventEmitter memory
leak detected. 11 error listeners added. Use emitter.setMaxListeners() to
increase limit Result: Lots of warnings, and very slow to install, but all needed Conclusion: npm less than 3.10.7 can't build Atom. Visual Studio tests:Windows 10 x64Visual Studio 2015npm 3.10.7 (after doing
|
Some notes about Python on Windows: If users have used the Python 3 from Python.org doesn't install to a nice predictable location by default, nor does it put itself on the PATH by default. You have to configure it to a specific install location OR put it on the PATH. That's why the Microsoft Store version of Python 3 is recommended; It always puts itself on the PATH.) (Not an issue for Python 2.7; the default install location is very predictable for Python 2.7). In my opinion we should say Python 2.7 is preferred over Python 2.6. (2.6 is not supported, and neither is 2.7, but 2.7 has the more recent bugfixes. And 2.7 will be supported in newer node-gyp going forward, whereas Python 2.6 support will be dropped.) |
If we required npm 6.10.1 or newer, all currently supported (by Microsoft) versions of Visual Studio would be usable with no extra configuration. If we required npm 6.12 or newer, Python 3 would be usable always, with the caveat that it has to be installed the right way on Windows, or it won't be detected. I'm a bit inclined to do that so that developers are using the newest tech, and so the instructions in the flight manual can be simpler. We could update the hard requirements here: On another note, we should update the required Node in We could maybe set the max Node version at 12.16.x as well, until this issue can be solved: atom/atom#21091 |
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.
Visual Studio 2019 does not fully work as mentioned in:
atom-community/atom#117
The failing tests should be fixed before adding it to this document.
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 Node version should be fixed to 12.4.0
to prevent the issues mentioned in atom-community/atom#111
There is no point in widening the Node version that is supported. Electron and Node version bumping should not be considered in this document. This is just a document about the "supported build configuration".
I suppose we can hold back on recommending Visual Studio 2019 for now. More thoughts on Visual Studio 2019 (click to expand):I don't fully know whether atom-community/atom#117 is a CI-only issue. I could try to get passing tests locally after building with VisualStudio Build Tools 2019, but it takes quite a long time to run all the tests, and there are timeouts and intermittent failures... I honestly find it hard to ever get a clean passing test run under any circumstances. So I may skip verifying that Visual Studio 2019 works 100% and just not advertise Visual Studio 2019 compatibility. Eventually we will need to cross that bridge, but Visual Studio 2015 is supported into the year 2025, Visual Studio 2017 is supported into the year 2027.
My research suggests pinning the system Node version is not relevant to the errors reported there. I have passing CI runs (100% tests passing) with system Node 10.12.0 and with 12.16.3.
Neither is there any point in artifically limiting our documented supported versions, when they are known working and well-tested and confirmed to work.
Users will use what they have on their system. This document is to tell them what will work and what won't.
Indeed, Node 10 (10.12+) and Node 12.0.0 through 12.16.x are working. We should support all current LTS versions of Node, minus the ones where we know we are incompatible (meaning, we do not support Node <= 10.11, or Node >= 12.17). https://nodejs.org/en/about/releases/ I am sorry you and Jeff are running into errors in whatever scenarios that cause them, but you have no "steps to reproduce" and I can't reproduce those build failures. Please either narrow down what causes the errors happen, or do clean installs every time (run We don't know what exactly causes the erros for you and Jeff, but I believe they are exceptions to the usual, rather than representative of the norm. More thoughts (click to expand is you want):We can try to pin versions at our fork, particularly in CI. But this document is about developers at their home/work computers. Pinning the system Node will not help them, and I have seen no compelling evidence to substantiate that it would help, and plenty of evidence to the contrary. (The As a practical matter: I have been using Node 10.22.0 for the past month or two or so, and it has been working fine. We can pursue whatever we want at our fork, but the documentation for the official project must be based on a higher standard of evidence and quality of research. I have been the only one doing publicly posted research into this, so until you and Jeff can explain what is going on, ruling out various possibilities and narrowing it down to a clean explanation, I have to treat it as just some unknown problem. Please participate in the troubleshooting. We need to provide specific, sound explanations (supported by some sort of empirical evidence) for the errors you and Jeff are seeing, or it will continue to distract from the project. Until then I will not support advising all developers to use a locked down version, when documentation and experimentation both show it is not needed, in general. Whatever problems you and Jeff are seeing in specific need to be explained first before we can try to address them. Arbitrary workarounds that seem relevant aren't actually useful if there's no solid logical reason why they should work. That should be reserved for if we were desperately in need of a workaround, but I do clean installs and I have had no need for this workaround at any point in time. I suggest you and Jeff track down the exact problem or get in the habit of doing clean bootstraps and clean installs (run |
@DeeDeeG I see a lot has been done since I last visited this issue. I will go through the research you have done and read through everything. Thank you so much for all the hard work you have done so far. We really appreciate. |
I'm pretty happy with the edits I've proposed to the documentation. The main things I am considering changing are:
|
- Suggest installing windows-build-tools v4, as v5 can hang and fail to install. - Don't use the `--production` flag to install windows-build-tools; Not installing devDependencies is already implied when installing a package by name.
Building Atom with Visual Studio 2019 causes a few CI tests to fail, so hold off on recommending Visual Studio 2019 for now.
This version of npm includes newer node-gyp, which is better at automatically detecting Python (especially Python 3), and also better at automatically detecting Visual Studio.
* Download Python from https://www.python.org/downloads/. | ||
* For Python 2, be sure to install in the default location, or check "Add Python 2.x to PATH" before installing. | ||
* For Python 3, check "Add Python 3.x to PATH", or change the install path to `[Your_Drive_Letter]:\Python37` e.g. `C:\Python37`, (even if your version of Python 3 isn't 3.7, that's one place where the scripts will look.) | ||
* If python isn't found by the bootstrap script, create a symbolic link to the directory containing `python.exe` using e.g.: `mklink /d %SystemDrive%\Python27 D:\elsewhere\Python27`(Links should be set at either `%SystemDrive%\Python27` or `%SystemDrive%\Python37`, regardless of what version of Python you actually have.) |
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.
This is ok with me. 👍
Requirements for Contributing Documentation
Description of the Change
Information on required Visual Studio versions and Python versions were out of date, considering that we use newer
node-gyp
now.See: https://github.com/nodejs/node-gyp/tree/v5.x/#installation for a more up-to-date reference on the required Visual Studio and Python versions, and other miscellaneous requirements of
node-gyp
.I updated "Hacking on Atom Core" to reflect that Python 3 now works (See: atom/atom#20711). Visual Studio 2017 has also been supported by recent
node-gyp
for quite some time. Relatedly, on Windows 10 the Windows 10 SDK is available, not the Windows 8 SDK. Node v10.12+ is required, and NPM < 6 is no longer supported by the NPM authors, so I updated the documentation to reflect that as well.Release Notes
N/A (Atom Flight Manual doesn't appear to compile or publish any release notes)