Skip to content

Conversation

@aduh95
Copy link
Contributor

Adds doc output directory as order-only prerequisite for build target.

Currently, here is the issue:

$ make docclean > /dev/null $ make out/doc/api/addons.html > /dev/nullinternal/fs/utils.js:298 throw err; ^Error: ENOENT: no such file or directory, open 'out/doc/apilinks.json' at Object.openSync (fs.js:465:3) at Object.writeFileSync (fs.js:1416:35) at Object.<anonymous> (…/tools/doc/apilinks.js:211:4) at Module._compile (internal/modules/cjs/loader.js:1090:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1111:10) at Module.load (internal/modules/cjs/loader.js:955:32) at Function.Module._load (internal/modules/cjs/loader.js:796:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) at internal/main/run_main_module.js:17:47{ errno: -2, syscall: 'open', code: 'ENOENT', path: 'out/doc/apilinks.json'}make: *** [out/doc/apilinks.json] Error 1 $ mkdir out/doc $ make out/doc/api/addons.html > /dev/null[Error: ENOENT: no such file or directory, open 'out/doc/api/addons.html']{ errno: -2, code: 'ENOENT', syscall: 'open', path: 'out/doc/api/addons.html'}[Error: ENOENT: no such file or directory, open 'out/doc/api/addons.json']{ errno: -2, code: 'ENOENT', syscall: 'open', path: 'out/doc/api/addons.json'}make: *** [out/doc/api/addons.html] Error 1

The problem is that the out/doc/api directory is not created before trying to generate the files, which fails. This PR adds the directories as prerequisites to ensure the files can be generated.

Repported by @DerekNonGeneric in #34986 (comment).

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-botnodejs-github-bot added the build Issues and PRs related to build files or the CI. label Sep 4, 2020
@DerekNonGeneric
Copy link
Contributor

I just applied this patch to my fork and here's the error:

if [ -x /mnt/c/orgs/nodejs/node-runtime/./node ] && [ -e /mnt/c/orgs/nodejs/node-runtime/./node ]; then /mnt/c/orgs/nodejs/node-runtime/./node tools/doc/versions.js out/previous-doc-versions.json; elif [ -x `which node` ] && [ -e `which node` ] && [ `which node` ]; then `which node` tools/doc/versions.js out/previous-doc-versions.json; else echo "No available node, cannot run \"node tools/doc/versions.js out/previous-doc-versions.json\""; exit 1; fi; make: *** No rule to make target 'out/doc/', needed by 'out/doc/apilinks.json'. Stop. 

@aduh95
Copy link
ContributorAuthor

@DerekNonGeneric Bummer, I don't have this error (I'm using GNU Make 3.81 built for i386-apple-darwin11.3.0, I suspect there are small differences with your version).

@DerekNonGeneric
Copy link
Contributor

I'm still missing the out/doc/api/assets folder. These docs are served w/o any styles.

Adds doc output directory as order-only prerequisite for build target.
@aduh95aduh95force-pushed the fix-make-doc-targets branch from 292458c to 1e05cc6CompareSeptember 4, 2020 23:45
Copy link
Contributor

@DerekNonGenericDerekNonGeneric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#35060 (comment) resolved by #34986 (comment), so everything seems to be working as expected now.

This will need to land before #34986 otherwise doc workflow will be broken on master branch.

@DerekNonGeneric
Copy link
Contributor

Landed in 8ae2f47

@aduh95aduh95 deleted the fix-make-doc-targets branch September 6, 2020 20:40
richardlau pushed a commit that referenced this pull request Sep 7, 2020
Adds doc output directory as order-only prerequisite for build target. PR-URL: #35060 Reviewed-By: Derek Lewis <[email protected]> Reviewed-By: Richard Lau <[email protected]>
@richardlaurichardlau mentioned this pull request Sep 7, 2020
4 tasks
richardlau pushed a commit that referenced this pull request Sep 7, 2020
Adds doc output directory as order-only prerequisite for build target. PR-URL: #35060 Reviewed-By: Derek Lewis <[email protected]> Reviewed-By: Richard Lau <[email protected]>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
Adds doc output directory as order-only prerequisite for build target. PR-URL: #35060 Reviewed-By: Derek Lewis <[email protected]> Reviewed-By: Richard Lau <[email protected]>
addaleax pushed a commit that referenced this pull request Sep 22, 2020
Adds doc output directory as order-only prerequisite for build target. PR-URL: #35060 Reviewed-By: Derek Lewis <[email protected]> Reviewed-By: Richard Lau <[email protected]>
@codebyterecodebytere mentioned this pull request Sep 28, 2020
joesepi pushed a commit to joesepi/node that referenced this pull request Jan 8, 2021
Adds doc output directory as order-only prerequisite for build target. PR-URL: nodejs#35060 Reviewed-By: Derek Lewis <[email protected]> Reviewed-By: Richard Lau <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.buildIssues and PRs related to build files or the CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@aduh95@DerekNonGeneric@richardlau@nodejs-github-bot