Skip to content

Use --shallow in doc build to prevent documentation.js from processing GLSL imports#8500

Merged
davepagurek merged 1 commit intoprocessing:dev-2.0from
nbogie:nb-build-docs-with-shallow
Feb 7, 2026
Merged

Use --shallow in doc build to prevent documentation.js from processing GLSL imports#8500
davepagurek merged 1 commit intoprocessing:dev-2.0from
nbogie:nb-build-docs-with-shallow

Conversation

@nbogie
Copy link
Contributor

@nbogie nbogie commented Feb 7, 2026

Resolves #8499

Changes:

Add --shallow to documentation build in docs script in package.json

shallow mode turns off dependency resolution, only processing the specified files (or the main script specified in package.json)
from documentation build --help

This seems like a good general policy, going forward.

Testing

  1. The change reduces error reports from documentation.js from 19 to 0 during npm run docs. (It's no longer trying to parse .frag and .vert files imported by some of our .js files.)

  2. The produced /docs/data.json file is the same before and after the addition of --shallow, except that elements are in different order. Identical once sorted.

(Why the order changed: I guess documentation.js was previously processing files in dependency-resolved order, after the first file. With shallow, it just processes files in order that the input files are given from the command-line glob.)

  1. The reference website pages also build fine, as you'd expect, though i didn't diff website content before and after.

Here's a command-line to diff two JSON files after sorting them in-memory. Needs jq json tool installed.

diff <(jq -S 'walk(if type == "array" then sort else . end)' docs/data.json) \
     <(jq -S 'walk(if type == "array" then sort else . end)' other.json)

Copy link
Contributor

@davepagurek davepagurek left a comment

Choose a reason for hiding this comment

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

Good catch!

@davepagurek davepagurek merged commit 6a61f7f into processing:dev-2.0 Feb 7, 2026
2 checks passed
@nbogie nbogie deleted the nb-build-docs-with-shallow branch February 7, 2026 20:42
@ksen0 ksen0 added this to the 2.3 milestone Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

3 participants