Skip to content

feat: Add validation for Foundry and Hardhat 3 build-info formats#1208

Closed
afa7789 wants to merge 1 commit intonextfrom
migate/build-info-migrate-fault
Closed

feat: Add validation for Foundry and Hardhat 3 build-info formats#1208
afa7789 wants to merge 1 commit intonextfrom
migate/build-info-migrate-fault

Conversation

@afa7789
Copy link

@afa7789 afa7789 commented Feb 2, 2026

We are having an issue with this PR #1194 CI/CD that depends on a deployed core package; this could be the fix for it.

still investigating, not finished yet.

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Improved build-info file validation with enhanced error messages for Foundry and Hardhat 3 formats.
    • Added format-specific guidance to direct users to appropriate remediation commands based on their build system.
  • Tests

    • Added validation tests for missing build-info outputs across different build formats.

@coderabbitai
Copy link

coderabbitai bot commented Feb 2, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • ✅ Full review completed - (🔄 Check again to review again)
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch migate/build-info-migrate-fault

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment on lines +164 to +165
Ensure you have compiled with Hardhat 3 so that artifacts/build-info/ contains both the main files and the .output.json files.
Then run: ${HARDHAT_COMPILE_COMMAND}`;
Copy link
Member

Choose a reason for hiding this comment

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

This sounds like it's telling the user to compile twice which is confusing.
Perhaps combine them:

Suggested change
Ensure you have compiled with Hardhat 3 so that artifacts/build-info/ contains both the main files and the .output.json files.
Then run: ${HARDHAT_COMPILE_COMMAND}`;
Ensure you compile with Hardhat 3 so that artifacts/build-info/ contains both .json files and .output.json files: ${HARDHAT_COMPILE_COMMAND}`;

Copy link
Member

Choose a reason for hiding this comment

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

Is there anything that the user needs to do if build-info does not have both types of files? Or does that perhaps suggest they are using Hardhat 2 (which is not supported with this version)?

Then run: ${FOUNDRY_COMPILE_COMMAND}`;

const HH3_BUILD_INFO_HELP = `\
Hardhat 3 (HH3) build-info uses a main .json file (input, solcVersion) and a separate .output.json (output).
Copy link
Member

Choose a reason for hiding this comment

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

Let's not call it HH3 in messages (the acronym is not widely used).

Suggested change
Hardhat 3 (HH3) build-info uses a main .json file (input, solcVersion) and a separate .output.json (output).
Hardhat 3's build-info uses a main .json file (input, solcVersion) and a separate .output.json (output).

@ericglau
Copy link
Member

Closing since this will be part of #1194 instead.

@ericglau ericglau closed this Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants