coverage: distinguish partial dynamic shims - #130
Open
dismonjames wants to merge 2 commits into
Open
Conversation
- Mark node:crypto, node:zlib, and node:fs(+fs/promises) as partial: their island shims cover only a slice of Node's surface and the rest throw at the call. - Report partial shims as 'partial' in the --dynamic builtins table, with a note, so they are not indistinguishable from fully implemented shims. - Add a coverage snapshot for the crypto-shims fixture; full shims stay 'shimmed' (the esbuild-require snapshot pins that side).
|
@dismonjames is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
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.
Fixes the coverage reporting part of #36.
coverage --dynamicpreviously reported partial builtin shims as fullyshimmed. This distinguishes known partial shims from complete ones while leaving runtime behavior unchanged.The island ships shims for
node:crypto,node:zlib, andnode:fs(+node:fs/promises), but each covers only a slice of Node's surface; the remaining members are honest throwing stubs. The--dynamicbuiltins table now reports these aspartialwith an explanatory note, instead ofshimmed. Fully implemented shims keep reportingshimmed.Runtime and static compilation behavior are unchanged. A partial shim still loads and runs programs that stay within its implemented slice, so it is not a build blocker and the coverage exit status is unaffected.
Tests cover partial and fully supported shim reporting.