summaryrefslogtreecommitdiff
path: root/Makefile
AgeCommit message (Collapse)Author
2018-11-01build: make benchmark/napi all prereq order-onlyDaniel Bevenius
This commit makes the all prerequisites order-only to prevent this target's rules to be executed every time which is currently the case as the all target is a phony target and will be executed every time. PR-URL: https://github.com/nodejs/node/pull/23951 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-10-24build: add lint-py which uses flake8cclauss
PR-URL: https://github.com/nodejs/node/pull/21952 Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-10-24test: add test-benchmark-napiEmily Marigold Klassen
Also makes sure that the napi benchmark is built before running jstest. Skipped on windows since n-api benchmarks aren't built there yet. PR-URL: https://github.com/nodejs/node/pull/23585 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-22build: fix coverage generationMichael Dawson
Changes in command line options for nyc resulted in the coverage target no longer working. Pin the major version of nyc and update the options to get it working again. PR-URL: https://github.com/nodejs/node/pull/23769 Fixes: https://github.com/nodejs/node/issues/23690 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com>
2018-10-20build: spawn `make test-ci` with `-j1`Refael Ackermann
All the sub targets have internal parallelism, so no performance loss. Also `make` doesn't to a good enough job of combining the output streams, or eliminate races. PR-URL: https://github.com/nodejs/node/pull/23733 Fixes: https://github.com/nodejs/node/issues/22006 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
2018-10-05build: toggle lint-cpp using verbose (V) variableDaniel Bevenius
This commit the verbosity of cpplint to be toggled by using the V variable. The default setting is verbose but by passing an empty string cpplint will be quiet. PR-URL: https://github.com/nodejs/node/pull/23217 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-10-05build: make lint-addon-docs quietDaniel Bevenius
This commit adds the --quiet flag to cpplint for the lint-addon-docs target to be consistent with the lint-cpp target. PR-URL: https://github.com/nodejs/node/pull/23217 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-10-04doc: remove GA trackingBen Noordhuis
The Google Analytics tracking wasn't wholly uncontroversial and hasn't been used in practice. Remove it. PR-URL: https://github.com/nodejs/node/pull/23083 Fixes: https://github.com/nodejs/node/issues/22652 Refs: https://github.com/nodejs/node/pull/6601 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-10-02build: reduce chance of unneeded rebuildRefael Ackermann
Run `node_js2c` and `mkssldef` as actions and not as targets makes sure they are run only once, just before processing the rest of `node_lib`. This helps `make` based dependency change detection be more accurate. Add comments with tagrget names for readability. Use `process_outputs_as_sources` for automatic inclution of outputs. PR-URL: https://github.com/nodejs/node/pull/23156 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-10-01build: add --quiet to lint-cppDaniel Bevenius
This commit adds the --quiet flag to cpplint to avoid informational output like: Done processing src/node.cc ... PR-URL: https://github.com/nodejs/node/pull/23075 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-09-30build: remove unnecessary Makefile outputRich Trott
Remove unnecessary @echo commands from Makefile. These were originally comments but were changed to @echo in 6bc43aeea79. They aren't terribly useful so let's remove them. PR-URL: https://github.com/nodejs/node/pull/23129 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-27build: move addons message in MakefileRich Trott
Displaying a message about building addons before building docs can be confusing when troubleshooting. (This just happened to me.) Move the message about building addons to just before the step for building addons. PR-URL: https://github.com/nodejs/node/pull/23114 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-09-21build: make config verbose on CIRefael Ackermann
PR-URL: https://github.com/nodejs/node/pull/22935 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-09-19build: stop printing execution of lint-md commandRuben Bridgewater
The executed command is very verbose and removing that from the output improves the overall experience. PR-URL: https://github.com/nodejs/node/pull/22904 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com>
2018-09-17build: do not lint fixtures in make lint-mdJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/22549 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-09-11tools: use lint-md.jsRefael Ackermann
* remove unused `tools/remark-cli` * vcbuild tested with `vcbuild nobuild noprojgen lint-md-build lint-md` PR-URL: https://github.com/nodejs/node/pull/20109 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-11tools: `make lint-md-rollup` & checkin `lint-md.js`Refael Ackermann
PR-URL: https://github.com/nodejs/node/pull/20109 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-11tools: relocate `remark-preset-lint-node`Refael Ackermann
PR-URL: https://github.com/nodejs/node/pull/20109 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-07build: rename configure to configure.pyRefael Ackermann
!Should go with next commit! * renaming so that IDEs can properly detect this as python * Add dependency to Makefile PR-URL: https://github.com/nodejs/node/pull/22450 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-09-05tools: add [src] links to async_hooks.htmlSam Ruby
handle ES2015 Class, contructor, and instance methods unrelated: update Makefile so that generated HTML is out of date whenever tools/doc/apilinks.js is updated. PR-URL: https://github.com/nodejs/node/pull/22656 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-09-03build: use arm64 as DESTCPU for aarch64Daniel Bevenius
On a aarch64 system I can run the complete build with tests without specifying the Makefile variable DESTCPU. But when running the tar-headers target DESTCPU is passed to configure: $(PYTHON) ./configure \ --prefix=/ \ --dest-cpu=$(DESTCPU) \ ... The value of DESTCPU in this case will be aarch64 which will cause configure to fail: configure: error: option --dest-cpu: invalid choice: 'aarch64' (choose from 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc', 'ppc64', 'x32', 'x64', 'x86', 'x86_64', 's390', 's390x') In the configure script there is a matching of __aarch64__ to arm64: $ python -c 'from configure import host_arch_cc; print host_arch_cc()' arm64 In our case it would be nice to have consitent behaviour for both of these cases on aarch64. This commit changes DESTCPU to arm64 to be consistent with the configure script. DESTCPU is used in $(TARBALL)-headers and in $(BINARYTAR) but I'm not sure about the implications of making the change purposed and hope others might chime in and provide some guidance. PR-URL: https://github.com/nodejs/node/pull/22548 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-08-29tools: Include links to source code in documentationSam Ruby
Parse source code using acorn; extracting exports. When producing documentation, match exports to headers. When a match is found, add a [src] link. This first commit handles simple exported classes and functions, and does so without requiring any changes to the source code or markdown. Subsequent commits will attempt to match more headers, and some of these changes are likely to require changes to the source code and/or markdown. PR-URL: https://github.com/nodejs/node/pull/22405 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-08-22build: use `npm ci`Refael Ackermann
* remove obsolete `node_modules/js-yaml/package.json` target * remove `@touch` since `npm ci` is always destructive PR-URL: https://github.com/nodejs/node/pull/22399 Refs: https://github.com/nodejs/node/pull/21802 Refs: https://github.com/nodejs/node/pull/21490 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Sam Ruby <rubys@intertwingly.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
2018-08-22Revert "build: extract common code from NODE_EXE/_G_EXE"Daniel Bevenius
This reverts commit 4e2fa8b0dc1acd95f558cd5f123711b9cc936c72. Refs: https://github.com/nodejs/node/issues/22457 PR-URL: https://github.com/nodejs/node/pull/22458 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-08-22build: extract common code from NODE_EXE/_G_EXEDaniel Bevenius
This commit extracts common parts of the NODE_EXE, and NODE_G_EXE recipes into a canned reciepe to reduce some code duplication. PR-URL: https://github.com/nodejs/node/pull/22310 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-08-20build: move available-node variable to topDaniel Bevenius
Currently node_use_openssl uses the available-node variable before it is defined causing the conditions that use it before that point to evaluate incorrectly. As an example running the target test/addons/.docbuildstamp will currently be skipped: $ make test/addons/.docbuildstamp Skipping .docbuildstamp (no crypto) With this commit the target will only be skipped if configured --without-ssl. PR-URL: https://github.com/nodejs/node/pull/22356 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-08-20build: touch tools/doc/node_modules after runDaniel Bevenius
Currently, tools/doc/node_modules is not touched after running npm install resulting in npm install being run every time. I missed this while testing commit 88bff82624628df261a429386d81565023062e44 ("build: make tools/doc/node_modules non-phony"). PR-URL: https://github.com/nodejs/node/pull/22350 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2018-08-20build: add test-doc to test targetDaniel Bevenius
This commit adds the test-doc target to the test recipe so that docs are built and linters run. This used to happen but was removed at some point. PR-URL: https://github.com/nodejs/node/pull/22294 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-08-20build: use echo command instead of shell commentsDaniel Bevenius
Currently, there are a few recipes where comments are indented and being passed to the shell. This commit updates these comments to use the echo command instead, which is the more common approach used in other recipes in the makefile. PR-URL: https://github.com/nodejs/node/pull/22293 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-08-18tools: simplify ESLint invocation in MakefileRich Trott
Makefile currently enforces .eslintrc.js linting on the command line but it is already enforced in the .estlintignore file. This also simplifies an arguably-related comment in .estlinrc.js. PR-URL: https://github.com/nodejs/node/pull/22348 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-08-12tools,build: apply markdown linting to test dirRich Trott
Enable markdown linting of the test directory. This change is applied only to Makefile and not vcbuild.bat because we do not currently lint anything outside of the doc directory using vcbuild.bat. In the Makefile, the other targets are called "misc" but that feature does not currently exist in vcbuild.bat. Adding it would be good, but outside the scope of this change. PR-URL: https://github.com/nodejs/node/pull/22221 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com>
2018-08-11build: add CONFIG_FLAGS to with-code-cache targetDaniel Bevenius
This commit adds CONFIG_FLAGS to allow the with-code-cache target to be used with a debug build. The motivation for this is to make it easier to debug a build with the code cache enabled. The suggested usage: $ make BUILDTYPE=Debug with-code-cache The BUILDTYPE option is not needed if ./configure was already configured with --debug. PR-URL: https://github.com/nodejs/node/pull/22207 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-08-10build: make tools/doc/node_modules non-phonyDaniel Bevenius
This commit makes the target tools/doc/node_modules a non-phony target and also adds tools/doc/package.json as a prerequisite to it to avoid running it unnecessary. This is currently causing the target test/addons/.docbuildstamp to be always be executed as it has tools/doc/node_modules as a prerequisite. PR-URL: https://github.com/nodejs/node/pull/22189 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Sam Ruby <rubys@intertwingly.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
2018-08-10build: add crypto check to build targetsDaniel Bevenius
Currently when configured without-ssl the build will fail when trying to run the tools/doc/node_modules, and .docbuildstamp make targets: internal/util.js:97 throw new ERR_NO_CRYPTO(); ^ Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support at assertCrypto (internal/util.js:97:11) at crypto.js:31:1 ... at Object.<anonymous> (/node/deps/npm/node_modules/uuid/lib/rng.js:4:14) at Module._compile (internal/modules/cjs/loader.js:689:30) ... make[1]: *** [tools/doc/node_modules] Error 1 This commit adds crypto check to these targets to allow the build to pass. PR-URL: https://github.com/nodejs/node/pull/22148 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-08-10build: extract common parts from addon .buildstampDaniel Bevenius
This commit extracts common parts from the targets test/addons/.buildstamp, and test/addons-napi/.buildstamp to reduce some duplication. PR-URL: https://github.com/nodejs/node/pull/22171 Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-08-03tools: add `make format-cpp` to run clang-format on C++ diffsJoyee Cheung
This patch adds a `make format-cpp` shortcut to the Makefile that runs clang-format on the C++ diffs, and a `make format-cpp-build` to install clang-format from npm. To format staged changes: ``` $ make format-cpp ``` To format HEAD~1...HEAD (latest commit): ``` $ CLANG_FORMAT_START=`git rev-parse HEAD~1` make format-cpp ``` To format diff between master and current branch head (master...HEAD): ``` $ CLANG_FORMAT_START=master make format-cpp ``` Most of the .clang-format file comes from running ``` $ clang-format --dump-config --style=Google ``` with clang-format built with llvm/trunk 328768 (npm version 1.2.3) The clang-format version is fixed because different version of clang-format may format the files differently. PR-URL: https://github.com/nodejs/node/pull/21997 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-08-01test: remove test/gc, integrate into parallelAnna Henningsen
There’s no reason to have a separate addon just for testing GC anymore. PR-URL: https://github.com/nodejs/node/pull/22001 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-07-25tools: produce JSON documentation using unified/remark/rehypeSam Ruby
PR-URL: https://github.com/nodejs/node/pull/21697 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-07-23build: remove redundant Makefile targetRich Trott
The only target that uses the `tools/doc/node_modules/js-yaml/package.json` target is `doc-only`. As a result of a recent change, it has `tools/doc/node_modules` as a prerequisite, which does the exact same npm install as `tools/doc/node_modules/js-yaml/package.json`. Remove `tools/doc/node_modules/js-yaml/package.json` as unnecessary. PR-URL: https://github.com/nodejs/node/pull/21915 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2018-07-20tools: create HTML docs with unified/remark/rehypeSam Ruby
PR-URL: https://github.com/nodejs/node/pull/21490 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-07-19build: add new benchmark targetsKenny Yuan
Adding new build targets: 'bench-addons' & 'bench-addons-clean'. With these two, it will be easier to manage the dependencies among targets and easier to build/clean the addons which are being used in benchmarking. PR-URL: https://github.com/nodejs/node/pull/20905 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2018-07-19build: move to `npm ci` where possibleRich Trott
Recent events (involving a maliciously published version of a popular module's dependency) have reinvigorated my interest in seeing us move to `npm ci` instead of `npm install`. This moves us to `npm ci` where possible in Makefile and vcbuild.bat. PR-URL: https://github.com/nodejs/node/pull/21802 Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2018-07-16build: account for pure C sources in `build-addons-napi`Anna Henningsen
PR-URL: https://github.com/nodejs/node/pull/21797 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-07-09tools: build all.json by combining generated JSONSam Ruby
Notes: 1) Removed a number of root properties that did not seem relevant: source, desc, and introduced_in. There no longer is a source, and the other two are from the first include and do not reflect the entire API. 2) As with https://github.com/nodejs/node/issues/20100, the current "desc" properties sometimes contained in-page links, other times referenced another page, and often did not match the links in the original HTML or JSON file. I chose to standardize on external links as "desc" values are isolated snippets as opposed to all.html which can be viewed as a standalone and self contained document. 3) Eliminated preprocessing for @include entirely, including the test case for this function. 4) _toc.md was renamed to index.md. 5) index comments no longer appear in embedded TOCs (left hand side column in the generated documentation. PR-URL: https://github.com/nodejs/node/pull/21637 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2018-07-05benchmark: add n-api function args benchmarkKenny Yuan
This benchmark suite is added to measure the performance of n-api function call with various type/number of arguments. The cases in this suite are carefully selected to efficiently show the performance trend. PR-URL: https://github.com/nodejs/node/pull/21555 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com>
2018-07-02tools: build all.html by combining generated HTMLSam Ruby
Combine the toc and api contents from the generated doc/api/*.html files. This ensures that the single page version of the documentation exactly matches the individual pages. PR-URL: https://github.com/nodejs/node/pull/21568 Fixes: https://github.com/nodejs/node/issues/20100 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
2018-06-29build: remove requirement to re-run ./configureAnna Henningsen
Instead of requiring `./configure` to be run again after the file changed, first try to re-run the configure script with the arguments with which it was originally run. Usually, those arguments will either contain no flags, or all flags that were passed are still supported. PR-URL: https://github.com/nodejs/node/pull/21371 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
2018-06-27build: speed up startup with V8 code cacheJoyee Cheung
This patch speeds up the startup time and reduce the startup memory footprint by using V8 code cache when comiling builtin modules. The current approach is demonstrated in the `with-code-cache` Makefile target (no corresponding Windows target at the moment). 1. Build the binary normally (`src/node_code_cache_stub.cc` is used), by now `internalBinding('code_cache')` is an empty object 2. Run `tools/generate_code_cache.js` with the binary, which generates the code caches by reading source code of builtin modules off source code exposed by `require('internal/bootstrap/cache').builtinSource` and then generate a C++ file containing static char arrays of the code cache, using a format similar to `node_javascript.cc` 3. Run `configure` with the `--code-cache-path` option so that the newly generated C++ file will be used when compiling the new binary. The generated C++ file will put the cache into the `internalBinding('code_cache')` object with the module ids as keys 4. The new binary tries to read the code cache from `internalBinding('code_cache')` and use it to compile builtin modules. If the cache is used, it will put the id into `require('internal/bootstrap/cache').compiledWithCache` for bookkeeping, otherwise the id will be pushed into `require('internal/bootstrap/cache').compiledWithoutCache` This patch also added tests that verify the code cache is generated and used when compiling builtin modules. The binary with code cache: - Is ~1MB bigger than the binary without code cahe - Consumes ~1MB less memory during start up - Starts up about 60% faster PR-URL: https://github.com/nodejs/node/pull/21405 Reviewed-By: John-David Dalton <john.david.dalton@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host>
2018-06-25build: fail on instrumentation errorsBenjamin Coe
nyc was silently failing to instrument new language features, resulting in a failure to instrument console.js. Refs: https://github.com/nodejs/node/issues/20952 PR-URL: https://github.com/nodejs/node/pull/21071 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rebecca Turner <me@re-becca.org> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
2018-06-24test: remove outdated, non-functioning testAnatoli Papirovski
The timers directory test, utilizing FakeTime, has not worked in quite a while and is not truly testing Node.js behaviour. If a similar test is necessary it would be better suited to libuv on which Node.js relies for timers functionality. PR-URL: https://github.com/nodejs/node/pull/20894 Fixes: https://github.com/nodejs/node/issues/10154 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>