-
Notifications
You must be signed in to change notification settings - Fork 196
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
fix(cli): always rebuild IWorld ABI #1929
Conversation
🦋 Changeset detectedLatest commit: 9147209 The changes in this PR will be included in the next version bump. This PR includes changesets to release 30 packages
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 |
packages/cli/src/runDeploy.ts
Outdated
@@ -63,6 +64,10 @@ export async function runDeploy(opts: DeployOptions): Promise<WorldDeploy> { | |||
if (!opts.skipBuild) { | |||
const outPath = path.join(srcDir, config.codegenDirectory); | |||
await Promise.all([tablegen(config, outPath, remappings), worldgen(config, getExistingContracts(srcDir), outPath)]); | |||
|
|||
// TODO remove when https://github.com/foundry-rs/foundry/issues/6241 is resolved | |||
await rm(path.join(outDir, "IWorld.sol"), { recursive: true, force: true }); |
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 think @alvrs and I tested this and this basically kills the cache/causes it to do a fresh build. Did you happen to try and see how long this takes?
As an alternative, we played around with unsetting the forge cache's hash or timestamp for this file and it seemed to regenerate just this file afterward (~1s vs full build of ~5s).
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.
Did you happen to try and see how long this takes?
a while, but my laptop is just slow, not a good benchmark
As an alternative, we played around with unsetting the forge cache's hash or timestamp for this file and it seemed to regenerate just this file afterward (~1s vs full build of ~5s).
yeah I wanted to look into this but I dunno if I even have forge cache or where it is
forge cache ls
returns nothing for me
~/.foundry/cache
is also pretty much empty
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.
for me the cache was in the project directory
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.
updated to clear the hash instead of deleting the file
hack to rebuild
IWorld
abi until foundry-rs/foundry#6241 is fixed