-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Use default value for rpcCachePath when running solidity tests #6464
base: v-next
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 9f93405 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
fa506a7
to
8e6a92e
Compare
@@ -121,6 +121,11 @@ export async function resolveSolidityTestUserConfig( | |||
testsPath = typeof testsPath === "object" ? testsPath.solidity : testsPath; | |||
testsPath ??= "test"; | |||
|
|||
const solidityTest = { | |||
rpcCachePath: "edr-cache", |
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.
Shouldn't we be using a subdirectory under our global hardhat cache directory?
Do you also happen to know why "there are no cache cleanup implications."?
I'm a little confused as to who owns/is responsible for this cache dir. Is it hardhat or is it edr?
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.
I may be missing some context, but what I understood was to use the cache directory that edr is using. It's hardcoded in this line, and it seems that it can't be changed.
I don't know why we should or should not be cleaning this cache directory. Maybe @kanej or @alcuadrado can validate?
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.
No, let's use the local cache. We can explore later if using the global one in some situations makes sense. But the global one is more opaque.
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.
cleaning is done by the user with hardhat clean
. That cache is never automatically cleaned.
This is how HH2 works, and we never received complains about it.
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.
Ah, sorry, I meant - shouldn't we use hre.config.paths.cache
instead of the edr-cache
?
I saw the other comment
@@ -121,6 +121,11 @@ export async function resolveSolidityTestUserConfig( | |||
testsPath = typeof testsPath === "object" ? testsPath.solidity : testsPath; | |||
testsPath ??= "test"; | |||
|
|||
const solidityTest = { | |||
rpcCachePath: "edr-cache", |
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 should be inside config.paths.cache
. A subfolder I mean.
There should be a single cache directory in the root of the project.
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.
Left some comments re the location of the cache
477552e
to
9f93405
Compare
config.solidityTest.rpcCachePath
defaults toedr-cache
, which is the directory that edr uses when running a node in fork mode.The motivation for this is that by default, running solidity tests with fork were not using any cache, taking a long time on each run
Closes #6459