Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coerce sources path to absolute path if necessary #866

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

cgewecke
Copy link
Member

@cgewecke cgewecke commented Feb 21, 2024

The @nomicfoundation/hardhat-foundry plugin makes paths.sources relative but it needs to be absolute when piping instrumented sources into the compilation jobs subtask here:

// The source name here is actually the global name in the solc input,
// but hardhat uses the fully qualified contract names.
for (const [sourceName, source] of Object.entries(solcInput.sources)) {
const absolutePath = path.join(config.paths.root, sourceName);
// Patch in the instrumented source code.
if (absolutePath in instrumentedSources) {
source.content = instrumentedSources[absolutePath];
}
}

Also

  • added hardhat-foundry to the nomiclabs project E2E
  • added installation of foundry in CI
  • run npx hardhat init-foundry

LGTM:

Screen Shot 2024-02-21 at 11 04 50 AM

@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (7ad7288) 96.36% compared to head (c439952) 96.27%.

Files Patch % Lines
plugins/resources/nomiclabs.utils.js 50.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #866      +/-   ##
==========================================
- Coverage   96.36%   96.27%   -0.10%     
==========================================
  Files          19       19              
  Lines        1019     1021       +2     
==========================================
+ Hits          982      983       +1     
- Misses         37       38       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cgewecke
Copy link
Member Author

cov drop is covered by added E2E test not included in measurements

@cgewecke cgewecke merged commit df58e0a into master Feb 21, 2024
3 checks passed
@cgewecke cgewecke deleted the hardhat-foundry-bug branch February 21, 2024 19:15
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