0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 15:06:33 +01:00
Commit Graph

669 Commits

Author SHA1 Message Date
Richard Lau
ce21749742
build: move doc versions JSON file out of out/doc
Move the generated previous doc versions JSON file out of `out/doc` to
prevent it being included in the distributed packages.

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/32728
Fixes: https://github.com/nodejs/build/issues/2276
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2020-04-11 07:06:17 -04:00
Rich Trott
203776fb71 build: fix LINT_MD_NEWER assignment
Indentation with a tab breaks the functionality, resulting in linting
all .md files when any one is changed. For consistency with the rest of
the Makefile and to restore functionality, remove indentation.

Refs: https://github.com/nodejs/node/pull/32614#issuecomment-610670779

PR-URL: https://github.com/nodejs/node/pull/32712
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-04-09 19:57:32 -07:00
Luigi Pinca
78e6d2484f
build: use tabs for indentation in Makefile
PR-URL: https://github.com/nodejs/node/pull/32614
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-04-06 02:59:36 +02:00
Richard Lau
25a1f04cdc
tools: only fetch previous versions when necessary
Refactor the logic for working out the previous versions of Node.js for
the API documentation so that the parsing (including the potential https
get) happens at most once per build (as opposed to the current once per
generated API doc).

Signed-off-by: Richard Lau <riclau@uk.ibm.com>

PR-URL: https://github.com/nodejs/node/pull/32518
Fixes: https://github.com/nodejs/node/issues/32512
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-03-31 18:25:10 -04:00
Antoine du HAMEL
19db0e60bd
doc: tests local links in markdown documents
PR-URL: https://github.com/nodejs/node/pull/32359
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-03-30 10:20:59 +02:00
Christian Niederer
e08ac09569
src: add test/abort build tasks
The Aliased*Array overflow check test introduced a dependency to a
compiled artifact. Add this artifact to the build process in a
similar fashion as test/addons and test/js-native-api do.

PR-URL: https://github.com/nodejs/node/pull/31740
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-03-30 10:15:03 +02:00
Anna Henningsen
2061c33670
test: add extended embedder cctest
Add an embedder cctest that also covers a multi-Environment situation,
including worker_threads-style inspector support.

Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/30467
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2020-03-21 10:58:28 +01:00
Anna Henningsen
43d32b073f
src,test: add full-featured embedder API test
PR-URL: https://github.com/nodejs/node/pull/30467
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2020-03-21 10:58:23 +01:00
Rod Vagg
6db6af4057
build: macOS package notarization
Includes hardened-runtime patch from gdams from
https://github.com/nodejs/node/issues/29216#issuecomment-546932966

PR-URL: https://github.com/nodejs/node/pull/31459
Refs: https://github.com/nodejs/node/issues/29216
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Ash Cripps <ashley.cripps@ibm.com>
Signed-off-by: Rod Vagg <rod@vagg.org>
2020-03-10 20:14:52 +11:00
Shelley Vohr
2130474890
build: fix zlib tarball generation
PR-URL: https://github.com/nodejs/node/pull/32094
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-03-04 16:10:52 -05:00
ConorDavenport
bf7409e974
doc: improve doc/markdown file organization coherence
* Updated cpp style guide file name and location and fixed links to
  this file.

* Updated collaborator guide file name and location and fixed links
  to this file.

* Updated documentation style guide file name and location and updated
  links referencing the file.

* Moved files to appropriate location and updated naming style for
  some of them.

Fixes: https://github.com/nodejs/node/issues/31741

PR-URL: https://github.com/nodejs/node/pull/31792
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2020-03-04 13:13:07 +00:00
Rich Trott
751c2409db build: only lint markdown files that have changed (POSIX-only)
Update Makefile so that only markdown files that have changed will be
linted. Currently, if one file in doc/api has changed, all files in
doc/api are linted.

On Windows, the lint-md task currently lints all files regardless of
whether any files has changed, and that behavior is unchanged here.

A further improvement is that when tools/lint-md.js is rebuilt, the
timestamp file is removed so that all files are linted again. This is
because rebuilding lint-md.js can introduce new rules or modify existing
rules, so re-linting everything helps make sure that accidental breakage
doesn't slip by unnoticed.

PR-URL: https://github.com/nodejs/node/pull/31923
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-03-01 10:39:48 -08:00
legendecas
1807c3eadf build: fix missing x64 arch suffix in binary tar name
PR-URL: https://github.com/nodejs/node/pull/30877
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-13 20:52:31 -05:00
João Reis
001d250855 build,win: add test-ci-native and test-ci-js
PR-URL: https://github.com/nodejs/node/pull/30724
Refs: https://github.com/nodejs/build/issues/1996
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-02 08:38:54 -08:00
Marek Łabuz
62c61b754d
tools: add unified plugin changing links for html docs
This commit introduces additional stage in the process of generating
html docs from markdown files. Plugin transforms links to *.md files
in the respository to links to *.html files in the online documentation.

Fixes: https://github.com/nodejs/node/issues/28689

PR-URL: https://github.com/nodejs/node/pull/29946
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-11-30 18:17:56 +01:00
cclauss
e6a58a89cb test: fix Python unittests in ./test and ./tools
Co-authored-by: @patrickhousley

Fixes to Python tests to ensure that the following all pass:
1. __python2 -m pytest ./test ./tools__  # 30 tests pass
2. __python3 -m pytest ./test ./tools__  # 30 tests pass
3. __python2 -m unittest discover -s ./test/tools__  # 1 test passes
4. __python3 -m unittest discover -s ./test/tools__  # 1 test passes
5. __PYTHON=python2 make tooltest__   # 1 test passes
6. __PYTHON=python3 make tooltest__   # 1 test passes

This is a subset of #30033

PR-URL: https://github.com/nodejs/node/pull/30340
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
2019-11-11 10:44:54 +01:00
Anna Henningsen
3698031753
Revert "test: test configure ninja"
This reverts commit 85dd9e8333.

`make test` should never change the current set of `configure`
flags.

Refs: https://github.com/nodejs/node/pull/30033

PR-URL: https://github.com/nodejs/node/pull/30295
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-11-06 12:45:56 +01:00
Patrick Housley
85dd9e8333 test: test configure ninja
- Updated the tooltest target to run unittest module
- Renamed test/tools/test-js2c.py to be discoverable by unittest module
- Added test class for `configure` shell script
- Added a test to ensure `configure` script exits with status code zero
when passed the `--ninja` flag

Closes: https://github.com/nodejs/node/issues/29415

PR-URL: https://github.com/nodejs/node/pull/30033
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
2019-11-05 19:36:28 -08:00
Richard Lau
b5b7e585f0 build: make linter failures fail test-doc target
Linter failures in the `test-doc` make target were not failing the
build if the subsequent `doctools` test passed as its exit code
wasn't being preserved.

Make the `lint` target a dependency of `test-doc` so that it is
outside of the `node_use_openssl` guard -- its own dependencies
have their own guards where necessary and the targets that don't
require an available node (e.g. the C++ linters) will be allowed
to run.

PR-URL: https://github.com/nodejs/node/pull/30012
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2019-10-22 13:52:53 -05:00
Richard Lau
c8df5cf74a build: build benchmark addons like test addons
Build the addons for benchmarks in the same way that the addons for
tests are built.

PR-URL: https://github.com/nodejs/node/pull/29995
Fixes: https://github.com/nodejs/build/issues/1961
Refs: 53ca0b9ae1 (commitcomment-35494896)
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-10-17 01:28:51 -04:00
Richard Lau
4885e50f7e build: make full-icu the default for releases
Release builds specifically set the `--with-intl=` configure option
instead of relying on the default. Explicitly set to `full-icu`.

Refs: https://github.com/nodejs/node/pull/29522

PR-URL: https://github.com/nodejs/node/pull/29887
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-10-10 11:58:10 -07:00
Richard Lau
f21818ec32 build: include deps/v8/test/torque in source tarball
Builds from the source tarball were broken by the recent V8 upate
to 7.7 as a file needed to build torque wasn't included in the source
tarball as it resides in deps/v8/test.

PR-URL: https://github.com/nodejs/node/pull/29712
Fixes: https://github.com/nodejs/node/issues/29709
Refs: https://github.com/nodejs/node/pull/28918
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
2019-09-28 06:59:54 -07:00
Joyee Cheung
54a0553a9f build: do not indent assignments in Makefile
Indented assignment in a Makefile can be interpreted
as a command in e.g. GNU Make 3.81 which results in the
following error:

```
make: CPPLINT_QUIET: No such file or directory
```

PR-URL: https://github.com/nodejs/node/pull/29623
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-09-22 16:57:31 -07:00
Anna Henningsen
ac59dc42ed
http: remove legacy parser
Remove the legacy `http_parser` implementation as a dependency
and all code that uses it in favor of llhttp, given that the latter
has been the default for all of Node 12 with no outstanding issues.

PR-URL: https://github.com/nodejs/node/pull/29589
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-09-20 20:18:35 +02:00
Anna Henningsen
03eec137a2
build: re-run configure on node_version.h change
Fixes: https://github.com/nodejs/node/issues/29509

PR-URL: https://github.com/nodejs/node/pull/29510
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2019-09-12 19:05:10 +02:00
Anna Henningsen
f2e35ff691 build: improve make coverage
Run cleanup for all relevant subdirectories, and exclude generated
source files (e.g. `out/Release/...`) from coverage reporting.
Also enable running `make cctest` again (It’s unclear to me why this
was disabled, as it does reduce coverage unnecessarily).

PR-URL: https://github.com/nodejs/node/pull/29487
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2019-09-10 01:49:17 -07:00
Daniel Bevenius
25d59cf83a build: hard code doctool in test-doc target
This commit removes the usage of the CI_DOC variable in the test-doc
recipe and specifies the doctool argument to tools/test.py explicitly.

The motivation for this is that the build is taking longer time and
this is mostly due to tests being run twice as the CI_DOC
variable will be empty in most cases (when not using --without-ssl).

This change was introduced with/after Commit
9039af83a3 ("build: skip test-ci doc
targets if no crypto") and while I though it might make sense to change
the setting of CI_DOC I not sure about the implications that might have
to our CI environment. It currently looks like this:

ifeq ($(node_use_openssl), false)
        CI_DOC := doctool
else
        CI_DOC =
endif

Which is setting CI_DOC to doctool if there is no crypto support which
not available. But perhaps this should be be the other way around,
changing the order or updating condition to be true.

PR-URL: https://github.com/nodejs/node/pull/29375
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2019-08-30 18:23:22 -07:00
Daniel Bevenius
db3fdfbcb6 build: move tooltest to before jstest target
This commit moves the tooltest target to come before the jstest target
to make the console output consistent with it was before I introduced
the tooltest target.

Currently the output looks like this which is might give the impression
that only one test was run:
/Applications/Xcode.app/Contents/Developer/usr/bin/make -s tooltest
.
----------------------------------------------------------------------
Ran 1 test in 0.000s

Compared to the usual:
[03:58|% 100|+ 2739|-   0]: Done

PR-URL: https://github.com/nodejs/node/pull/29220
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-08-23 05:41:54 +02:00
Rich Trott
ec16fdae54 build: remove unused option
There is no longer a need to skip sequential/test-benchmark-napi because
it no longer resides in sequential. Benchmark tests are now in their own
directory.

PR-URL: https://github.com/nodejs/node/pull/29173
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-08-18 16:33:18 -07:00
Daniel Bevenius
a890771cd0 build: add a testclean target
This commit adds a target named testclean to allow for cleaning the
temporary files generated during a test run without having to use the
clean target.

PR-URL: https://github.com/nodejs/node/pull/29094
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-08-16 16:23:33 -07:00
Daniel Bevenius
b4f0a18b5a tools: allow single JS file for --link-module
The description for the --link-module configuration option is as
follows:
$ ./configure --help | grep -A 5 'link-module'
  --link-module=LINKED_MODULE
                      Path to a JS file to be bundled in the binary as a
                      builtin. This module will be referenced by path
                      without extension; e.g. /root/x/y.js will be
                      referenced via require('root/x/y'). Can be used
                      multiple times

This lead me to think that it was possible to specify a file like this:
$ ./configure --link-module=something.js
$ NODE_DEBUG=mkcodecache make -j8

This will lead to a compilation error as an entry in the source_ map in
node_javascript.cc will end up having an empty string as its key:
source_.emplace("", UnionBytes{_raw, 105});

This will then be used by CodeCacheBuilder when it iterates over the
module ids, which will lead to the following compilation errors:

/node/out/Release/obj/gen/node_code_cache.cc:12:23: warning:
ISO C++17 does not allow a decomposition group to be
empty [-Wempty-decomposition]
static const uint8_t [] = {
                      ^
/node/out/Release/obj/gen/node_code_cache.cc:12:22: warning:
decomposition declarations are a C++17 extension [-Wc++17-extensions]
static const uint8_t [] = {
                     ^~
/node/out/Release/obj/gen/node_code_cache.cc:12:1: error:
decomposition declaration cannot be declared 'static'
static const uint8_t [] = {
^~~~~~
/node/out/Release/obj/gen/node_code_cache.cc:12:22: error:
decomposition declaration cannot be declared with type 'const uint8_t'
(aka 'const unsigned char'); declared type must be 'auto' or
reference to 'auto'
static const uint8_t [] = {
                     ^
/node/out/Release/obj/gen/node_code_cache.cc:12:22: error:
excess elements in scalar initializer
static const uint8_t [] = {
                     ^
/node/out/Release/obj/gen/node_code_cache.cc:660:7: error:
expected expression
      ,
      ^
/node/out/Release/obj/gen/node_code_cache.cc:661:24: error:
no matching function for call to 'arraysize'
      static_cast<int>(arraysize()), policy
                       ^~~~~~~~~
../src/util.h:667:18: note: candidate function template not viable:
requires 1 argument, but 0 were provided
constexpr size_t arraysize(const T (&)[N]) {
                 ^
2 warnings and 5 errors generated.

This commit suggests that passing a single file be allowed by modifying
tools/js2c.py.

PR-URL: https://github.com/nodejs/node/pull/28443
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-08-12 12:56:43 +02:00
Luigi Pinca
ab155335bc build: do not mix spaces and tabs in Makefile
PR-URL: https://github.com/nodejs/node/pull/28881
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-30 13:31:45 -07:00
Ben Noordhuis
30666edd05 build: uname -m is amd64 on freebsd, not x86_64
Fixes: https://github.com/nodejs/node/issues/13150

PR-URL: https://github.com/nodejs/node/pull/28804
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-24 11:32:44 -07:00
Michaël Zasso
3117899414 tools: remove unused pkgsrc directory
The pkgsrc Makefile target was removed in 2015

Refs: https://github.com/nodejs/node/pull/1938

PR-URL: https://github.com/nodejs/node/pull/28783
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-22 11:31:17 -07:00
Rod Vagg
9039af83a3 build: skip test-ci doc targets if no crypto
PR-URL: https://github.com/nodejs/node/pull/28747
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-07-20 09:32:55 -07:00
Daniel Bevenius
b456bbcc6d build: guard test-doc recipe with node_use_openssl
Currently, when configuring --without-ssl the test-doc target fails with
the following error:
/node/test/common/index.js:707
const crashOnUnhandledRejection = (err) => { throw err; };
                                             ^

Error [ERR_NO_CRYPTO]:
Node.js is not compiled with OpenSSL crypto support
    at Object.assertCrypto (internal/util.js:97:11)
    at https.js:26:26
    at NativeModule.compile (internal/bootstrap/loaders.js:300:5)
    ...
    at /node/tools/doc/versions.js:7:19
    at new Promise (<anonymous>)
    at getUrl (/node/tools/doc/versions.js:6:10)
Command: out/Release/node /node/test/doctool/test-doctool-html.js
[00:02|% 100|+   3|-   1]: Done
make: *** [test-doc] Error 1

This commit guards the test-doc recipe to not run if node was
configured without crypto support.

PR-URL: https://github.com/nodejs/node/pull/28199
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-06-17 05:32:15 +02:00
Richard Lau
d74dc17afe build: lint all docs under doc
`**` expansion doesn't behave as expected and as a result files in
nested subdirectories under `doc` were not linted. Use `find` instead
to generate the list of files to lint.

PR-URL: https://github.com/nodejs/node/pull/28128
Refs: https://github.com/nodejs/node/pull/28127
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2019-06-12 21:03:57 -07:00
Refael Ackermann
46eb532a2a build: delegate building from Makefile to ninja
PR-URL: https://github.com/nodejs/node/pull/27504
Refs: https://mobile.twitter.com/refack/status/1118484079077482498
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2019-05-02 21:03:53 -04:00
Joyee Cheung
d701667950
tools: implement node_mksnapshot
Implements a node_mksnapshot target that generates a snapshot blob
from a Node.js main instance's isolate, and serializes the data blob
with other additional data into a C++ file that can be embedded into
the Node.js binary.

PR-URL: https://github.com/nodejs/node/pull/27321
Refs: https://github.com/nodejs/node/issues/17058
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-04-23 11:26:01 +08:00
Refael Ackermann
e356807a79 deps,test: bump googletest to 39f72ea6f5
Refs: 39f72ea6f5

PR-URL: https://github.com/nodejs/node/pull/27231
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-04-22 17:34:12 -04:00
Refael Ackermann
14df42fd00 build: run mkcodecache as an action
* fix test-code-cache (for the common cases)
* deprecate `configure --code-cache-path`

PR-URL: https://github.com/nodejs/node/pull/27161
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-04-16 18:25:04 -04:00
Joyee Cheung
4fd7193579 tools: implement mkcodecache as an executable
This patch implement a mkcodecache executable on top of the
`NativeModuleLoader` singleton.
This makes it possible to build a Node.js binary with embedded
code cache without building itself using the code cache stub -
the cache is now initialized by `NativeModuleEnv` instead which
can be refactored out of the mkcodecache dependencies.

PR-URL: https://github.com/nodejs/node/pull/27161
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2019-04-16 18:23:32 -04:00
Refael Ackermann
3b5773fee3 build,deps: move gypfiles out 2/2 - moving
* move all used files to `tools/v8_gypfiles` directory
* fix references in node configuration

PR-URL: https://github.com/nodejs/node/pull/26685
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-03-28 16:39:16 -04:00
Refael Ackermann
ecf98b0839 build,meta: quiet/pretty make output by default
PR-URL: https://github.com/nodejs/node/pull/26740
Refs: https://github.com/nodejs/node/pull/26252
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-03-21 20:21:01 -04:00
Refael Ackermann
91e1a043a6 Revert "build: silence cpp lint by default"
This reverts commit 0373836b39.

PR-URL: https://github.com/nodejs/node/pull/26358
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-07 18:46:27 -05:00
Ruben Bridgewater
0373836b39
build: silence cpp lint by default
The cpp linter is very noisy at the moment. So use the --quiet flag
by default instead of being verbose in this case.

PR-URL: https://github.com/nodejs/node/pull/26252
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-02-28 17:44:12 +01:00
Daniel Bevenius
f17f467544 build,test: guard eslint with crypto check
Currently, configuring --without-ssl will cause the lint-js target to
fail with the following error:
$ make lint-js
Running JS linter...
internal/util.js:101
    throw new ERR_NO_CRYPTO();
    ^

Error [ERR_NO_CRYPTO]:
Node.js is not compiled with OpenSSL crypto support
at assertCrypto (internal/util.js:101:11)
at crypto.js:31:1
...
(/node/tools/node_modules/eslint/node_modules/file-entry-cache/
cache.js:2:14)
at Module._compile (internal/modules/cjs/loader.js:746:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:757:10)
make: *** [lint-js] Error 1

There are also a number of tests that are affected in a similar way.

This commit adds crypto checks to allow for lint-js and the affected
tests to be skipped when configured --without-ssl.

PR-URL: https://github.com/nodejs/node/pull/26182
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-02-21 05:35:12 +01:00
Rich Trott
4deb23a2f6 tools: improve prerequisites for test-all-suites
The prerequisistes for test-all-suites were running some tests
themselves. When one of those tests failed during a coverage run, it
resulted in artificially low coverage. Fix the prerequisites to only
build stuff, not test.

PR-URL: https://github.com/nodejs/node/pull/25892
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-02 17:20:20 -08:00
Rich Trott
8198ca0b26 tools: exclude benchmark code from coverage report
Refs: https://github.com/nodejs/build/issues/1676#issuecomment-459218651

PR-URL: https://github.com/nodejs/node/pull/25841
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-02-01 23:11:58 -08:00
Rich Trott
e1aa9438ea tools: add test-all-suites to Makefile
There is currently no Makefile target that runs every test suite. This
adds one.

PR-URL: https://github.com/nodejs/node/pull/25799
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2019-02-01 15:40:46 -08:00