build: make test-addons dependency-free#62388
Open
joyeecheung wants to merge 1 commit intonodejs:mainfrom
Open
build: make test-addons dependency-free#62388joyeecheung wants to merge 1 commit intonodejs:mainfrom
joyeecheung wants to merge 1 commit intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
Member
Author
|
cc @nodejs/build |
3d0aa10 to
2c71036
Compare
4 tasks
Member
|
cc @nodejs/web-infra this makes our addon-verify generator obsolete, right? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #62388 +/- ##
==========================================
- Coverage 91.60% 89.69% -1.91%
==========================================
Files 337 676 +339
Lines 140745 206693 +65948
Branches 21802 39577 +17775
==========================================
+ Hits 128925 185394 +56469
- Misses 11595 13443 +1848
- Partials 225 7856 +7631 🚀 New features to boost your workflow:
|
2c71036 to
ba7d859
Compare
`make test-addons` used to depend on a markdown parser and then doc-kit to extract C++ addon examples from addons.md by guessing the file contents based on headings. This is hacky and brittle. The introduction of doc-kit also means tests intended for verifying the binary like `make test-only` now need to support doc-building toolchains e.g. minifier, highlighter, and indirect dependencies that rely on prebuilt-addon/wasm, which defeats the purpose and makes it harder to run for experimental platforms. This patch adds explicit `<!-- addon-verify-file dir/filename -->` markers in addons.md to locate extractable code blocks, avoiding fragile heuristics based on heading text or code block order and eliminating the dependency with simpler parsing.
ba7d859 to
9d62d0b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make test-addonsused to depend on a markdown parser and then doc-kit to extract C++ addon examples from addons.md by guessing the file contents based on headings. This is hacky and brittle. The introduction of doc-kit also means tests intended for verifying the binary likemake test-onlynow need to support doc-building toolchains e.g. minifier, highlighter, and indirect dependencies that rely on prebuilt-addon/wasm, which defeats the purpose and makes it harder to run for experimental platforms.This patch adds explicit
<!-- addon-verify-file dir/filename -->markers in addons.md to locate extractable code blocks, avoiding fragile heuristics based on heading text or code block order and eliminating the dependency with simpler parsing.Fixes: #62385