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

Import libraries when they are needed #126

Merged
merged 6 commits into from
Sep 5, 2022

Conversation

alcuadrado
Copy link
Collaborator

@alcuadrado alcuadrado commented Sep 3, 2022

Hey Chris!

This is a quick PR to optimize this plugin. The change introduced here is that it now imports external libraries right before they are needed. This means that they are not loaded during Hardhat initialization, so that Hardhat loads faster. You can appreciate the difference if you run a npx hardhat --help in a project using this version of the plugin and latest.

The difference is not huge, but it compounds with other plugins, so I'm doing this for every plugin included in the hardhat toolbox. I'll also send a similar PR to solidity-coverage.

A test is failing, but it was also failing on master. I can fix it, but I may require some guidance. It passes on the CI

@alcuadrado
Copy link
Collaborator Author

Actually, can you point me to the right branch of solidity-coverage to work on so that it can be released asap? Thanks!

@cgewecke
Copy link
Owner

cgewecke commented Sep 5, 2022

Looks good! Thanks a lot @alcuadrado.

@cgewecke cgewecke merged commit 2b907ac into cgewecke:master Sep 5, 2022
@alcuadrado alcuadrado deleted the jit-imports branch September 5, 2022 23:59
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.

None yet

2 participants