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
[v-next] Port compile task to v-next package #5193
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
b1ed342
to
9914048
Compare
import debug from "debug"; | ||
import fsExtra from "fs-extra"; | ||
import * as t from "io-ts"; | ||
import { deepEqual } from "fast-equals"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To pull this in directly from utils would mean making the chain of function calls above the cache async
, is that what we intend with an async deepEqual?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably a question for @alcuadrado, but I believe we should be fine. The asynchronicity comes from dynamically importing the fast-equals
package inside deepEqual
. However, after the initial load, it is cached, so subsequent loads should be fast. The only potential disadvantage is the extra boilerplate required by all the async
/await
statements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed this and decided to defer the decision
return template; | ||
} | ||
|
||
export function assertHardhatInvariant( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this move to utils?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is now in the Hardhat Errors package, we should pull it from there.
@@ -0,0 +1 @@ | |||
declare module "adm-zip"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appeared to be necessary once we moved to v-next
. I will look again at why we are not picking up the types.
f53c2ec
to
b02eedb
Compare
4989672
to
6603aea
Compare
6603aea
to
fc4991c
Compare
We should import this from the errors package, for the moment make this public to get to passing.
Urls are required for dynamic import, on windows that means that just resolving the path isn't enough.
This is an updated version of #5149, rebased off of the latest v-next.
This PR separates out the Hardhat compilation tasks into a separate package and converts them into a build system component.
The build system component package has been esmified and the original compilation tests ported across.
We have opted to separate out further internal code improvements as follow on PRs.
TODO
Swap as many utils for the./v-next/hardhat-utils
as possibleReview each TODORefactor build system