Skip to content

fix: parse large Solidity Test build info outputs#8354

Open
BROCCOLO1D wants to merge 1 commit into
NomicFoundation:mainfrom
BROCCOLO1D:fix/solidity-test-large-build-info
Open

fix: parse large Solidity Test build info outputs#8354
BROCCOLO1D wants to merge 1 commit into
NomicFoundation:mainfrom
BROCCOLO1D:fix/solidity-test-large-build-info

Conversation

@BROCCOLO1D
Copy link
Copy Markdown

@BROCCOLO1D BROCCOLO1D commented May 29, 2026

Summary

  • Fixes Solidity Test build-info output parsing for very large outputs that can exceed V8's max string length
  • Adds a byte scanner that extracts only source ASTs and contract method identifiers needed by inline-config and EIP-712 collectors
  • Adds focused parser coverage for large bytecode-heavy outputs and escaped source names

Why

Large projects can produce build-info output JSON files over Node's maximum string length. The Solidity Test inline-config and EIP-712 collectors only need small subtrees from those outputs, but previously decoded and parsed the full JSON string.

Changes

  • Add parseSolidityTestBuildInfoOutput for selective build-info output parsing from bytes
  • Use it in the inline-config and EIP-712 collectors
  • Add a changeset for hardhat

Validation

  • pnpm test:file packages/hardhat/test/internal/builtin-plugins/solidity-test/build-info-output.ts
  • pnpm test:file packages/hardhat/test/internal/builtin-plugins/solidity-test/eip712/index.ts
  • pnpm test:file packages/hardhat/test/internal/builtin-plugins/solidity-test/inline-config/index.ts
  • pnpm lint:file packages/hardhat/src/internal/builtin-plugins/solidity-test/build-info-output.ts packages/hardhat/src/internal/builtin-plugins/solidity-test/inline-config/index.ts packages/hardhat/src/internal/builtin-plugins/solidity-test/eip712/index.ts packages/hardhat/test/internal/builtin-plugins/solidity-test/build-info-output.ts

Scope

Refs #8341

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 29, 2026

🦋 Changeset detected

Latest commit: fc2bac1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
hardhat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants