Skip to content

build: allow linting node.1#64157

Open
avivkeller wants to merge 6 commits into
nodejs:mainfrom
avivkeller:lint-node1
Open

build: allow linting node.1#64157
avivkeller wants to merge 6 commits into
nodejs:mainfrom
avivkeller:lint-node1

Conversation

@avivkeller

@avivkeller avivkeller commented Jun 26, 2026

Copy link
Copy Markdown
Member

Adds make doc/node.1 without triggering it on normal builds

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. labels Jun 26, 2026
Comment thread Makefile
Signed-off-by: avivkeller <me@aviv.sh>

@aduh95 aduh95 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wait, it looks like it needs internet access, which is a problem for integrators who run the tests in a sandbox, and also completely irrelevant for node.1:

UNDICI 59249: connecting to raw.githubusercontent.com using https:undefined
UNDICI 59249: connecting to raw.githubusercontent.com using https:undefined
UNDICI 59249: connection to raw.githubusercontent.com using https:undefined errored - No such binding: crypto
UNDICI 59249: connection to raw.githubusercontent.com using https:undefined errored - No such binding: crypto
UNDICI 59249: request to GET https://raw.githubusercontent.com/nodejs/node/HEAD/CHANGELOG.md errored - No such binding: crypto
UNDICI 59249: request to GET https://raw.githubusercontent.com//nodejs/node/HEAD/CHANGELOG.md errored - No such binding: crypto
[08:04:00.088] ERROR: fetch failed

I got rid of it by commenting out the following in tools/doc/node_modules/@node-core/doc-kit/src/utils/configuration/index.mjs:

        changelog: populate(CHANGELOG_URL, {
          repository: 'nodejs/node',
          ref: 'HEAD',
        }),

@aduh95

aduh95 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Another problem I've seen is that if I update node.1 manually, it's going to tell me doc/node.1 is out of date; run `make doc/node.1` to regenerate it. However, trying to run it:

$ make doc/node.1 
make: 'doc/node.1' is up to date.

Should we recommend rm doc/node.1 && make doc/node.1?

@avivkeller avivkeller requested a review from aduh95 July 1, 2026 20:16
@aduh95

aduh95 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

I was getting frustrated not understanding why me changing manually doc/node.1 would not trigger an error when running make test-doc -j, turns out it's because it's not listed as a dep.
I've found the following diff providing better UX:

diff --git a/Makefile b/Makefile
index 963d0456fb0..e1f8bb5155e 100644
--- a/Makefile
+++ b/Makefile
@@ -935,2 +935,2 @@ out/doc/apilinks.json: $(wildcard lib/*.js) tools/doc/node_modules | out/doc
-.PHONY: doc/node.1
-doc/node.1: doc/api/cli.md tools/doc/node_modules
+.PHONY: node.1
+node.1: doc/api/cli.md tools/doc/node_modules
@@ -944 +944 @@ doc/node.1: doc/api/cli.md tools/doc/node_modules
-			-o $(@D) \
+			-o doc \
@@ -1496 +1496 @@ tools/.mdlintstamp: tools/lint-md/node_modules/remark-parse/package.json $(LINT_
-tools/.manpagelintstamp: doc/api/cli.md tools/doc/node_modules
+tools/.manpagelintstamp: doc/api/cli.md tools/doc/node_modules doc/node.1
@@ -1508 +1508 @@ tools/.manpagelintstamp: doc/api/cli.md tools/doc/node_modules
-			echo 'doc/node.1 is out of date; run `make doc/node.1` to regenerate it.'; \
+			echo 'doc/node.1 is out of date; run `make node.1` to regenerate it.'; \

@avivkeller

Copy link
Copy Markdown
Member Author

Applied your patch! I'll update doc-kit to correctly output make node.1 not make doc/node.1

Comment thread Makefile Outdated
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@avivkeller avivkeller added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jul 1, 2026
Comment thread Makefile
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@avivkeller

Copy link
Copy Markdown
Member Author

Thanks for all your help, @aduh95!

@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 2, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. build Issues and PRs related to build files or the CI. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants