Node: test-make-doc now failing locally

Created on 30 Mar 2018  Â·  12Comments  Â·  Source: nodejs/node

  • Version: master
  • Platform: mac
  • Subsystem: doc, test

I just pulled and test-make-doc is now failing:

$ out/Release/node /Users/matteo/Repositories/node/test/doctool/test-make-doc.js
assert.js:248
    throw err;
    ^

AssertionError [ERR_ASSERTION]: all.html is empty
    at Object.<anonymous> (/Users/matteo/Repositories/node/test/doctool/test-make-doc.js:47:10)
    at Module._compile (internal/modules/cjs/loader.js:678:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
    at Module.load (internal/modules/cjs/loader.js:589:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
    at Function.Module._load (internal/modules/cjs/loader.js:520:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:719:10)
    at startup (internal/bootstrap/node.js:225:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:572:3)

This as been introduced in https://github.com/nodejs/node/pull/19581. Not sure what I should do to make this pass again on my machine, I already tried make clean and make doc.

build doc test tools

All 12 comments

cc @vsemozhetbyt

Throwing assertion.

Cause of the added check:

Makefile generates docs by getting the console.log() output from the tools/doc/generate.js and redirecting it to the doc files. If tools/doc/generate.js throws, an empty doc file is still created. So we can have a situation when the last .md source has an error and all the needed files are nevertheless present, just one of them is empty. So we need to check if all the files are not empty.

  1. Can you check if there is an empty all.html file in out/doc/api folder?
  2. Can you check if building of all.html is not broken during the process?

Can there also be some race condition? Can doctool/test-make-doc.js run till doc building is finished?

Can you check if there is an empty all.html file in out/doc/api folder?

Yes it is empty,.

Can you check if building of all.html is not broken during the process?

how?

Can there also be some race condition?

This fails even if I run this individually, after make doc has finished. There shouldn't be race conditions.

Can doctool/test-make-doc.js run till doc building is finished?

I do not understand. can you rephrase?

how?

Maybe run make doc-only after deleted out/doc/api folder and check the output on console? There should be lines concerning all the doc files. (~102)

Can doctool/test-make-doc.js run till doc building is finished?

It seems this is not possible if you "run this individually, after make doc has finished." I thought there may be parallel processes of doc building and tests,

Maybe run make doc-only after deleted out/doc/api folder and check the output on console? There should be lines concerning all the doc files. (~102)

That did the trick. I think we should have make clean remove this folder as well.

make distclean already deletes the whole out folder.

Following the principle of least surprise, a developer expects make clean to restore the tree in a state that would have “make test” pass.

Is there a way to make make rebuild a doc if it is empty?

Following the principle of least surprise, a developer expects make clean to restore the tree in a state that would have “make test” pass.

+1. Anyone knows why make clean does not just wipe the out folder? cc @nodejs/build

Just got hit by this on 10.x-staging

I think this is resolved now?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danielstaleiny picture danielstaleiny  Â·  3Comments

stevenvachon picture stevenvachon  Â·  3Comments

ksushilmaurya picture ksushilmaurya  Â·  3Comments

sandeepks1 picture sandeepks1  Â·  3Comments

vsemozhetbyt picture vsemozhetbyt  Â·  3Comments