Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: don't build node for doc build #9660

Closed

Conversation

thefourtheye
Copy link
Contributor

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

build tools

Description of change

Building node binary is not necessary for doc builds.

Refer: #9436 (comment)


cc @silverwind

Building node binary is not necessary for doc builds.

Refer: nodejs#9436 (comment)
@thefourtheye thefourtheye added build Issues and PRs related to build files or the CI. tools Issues and PRs related to the tools directory. labels Nov 17, 2016
@nodejs-github-bot nodejs-github-bot added the build Issues and PRs related to build files or the CI. label Nov 17, 2016
Copy link
Contributor

@silverwind silverwind left a comment

Choose a reason for hiding this comment

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

LGTM. @nodejs/build can you check if make doc-only is currently in use by the CI?

@sam-github
Copy link
Contributor

no comment on implementation, but +1 for the feature

@rvagg
Copy link
Member

rvagg commented Nov 18, 2016

But it is required to run tools/doc/generate.js (just below).

I'd be OK if you can replace the use of $(NODE) to run it or mess with it another way such that if an alternative NODE is provided then it won't build it, otherwise it will. Or maybe as a simpler version you could make it check if the binary at $(NODE) exists and if not then print an error that you need to make $(NODE_EXE) or similar.

@thefourtheye
Copy link
Contributor Author

you could make it check if the binary at $(NODE) exists and if not then print an error that you need to make $(NODE_EXE) or similar.

Ya, I have already started working on it. I'll update the PR soon.

@thefourtheye
Copy link
Contributor Author

you could make it check if the binary at $(NODE) exists and if not then print an error that you need to make $(NODE_EXE) or similar.

Ya, I have already started working on it. I'll update the PR soon.

I tried so many things, but the last commit is the best I could come up with. I could use some help here @nodejs/build

@@ -315,9 +314,14 @@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
out/doc/%: doc/%
cp -r $< $@

GET_NODE := $(or $(shell [ -x ./node ] && echo ./node), $(shell command -v node))
Copy link
Member

Choose a reason for hiding this comment

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

This is only used to find one for the purpose of printing an error and not actually using it. Note that $(NODE) is still invoked for gen-json and gen-html which could be different to ./node or command -v node.

It also may be prudent to use which in here rather than command (see the XZ check).

So, perhaps this check should be used to determine which node to invoke but it should default to testing for $(NODE) rather than ./node (since ./node is the default but it can be overridden at runtime, e.g. NODE=blergh make .... The final command/which is a nice fallback that should get us by but that needs to carry on down to the execution of gen-json and gen-html.

@jasnell
Copy link
Member

jasnell commented Mar 24, 2017

Status updates on this one?

@jasnell jasnell added the stalled Issues and PRs that are stalled. label Mar 24, 2017
@addaleax
Copy link
Member

I think this has been resolved by introducing the doc-only target, so I’m closing. Feel free to reopen if I’m wrong.

@addaleax addaleax closed this Mar 24, 2017
@thefourtheye thefourtheye deleted the dont-build-node-for-doc branch March 28, 2017 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. stalled Issues and PRs that are stalled. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants