Open shark0der opened 3 years ago
@shark0der would you be ok with it being opt out if it were only run when new contracts were actually compiled?
@alcuadrado I am not OP but I have the same problem. Personally I'd prefer it was opt-in, or at least that I can opt-out for all tasks and not just compile. Quite often contracts are changed in a way that does not affect types.
I'm all for sensible config defaults and perhaps enabling this by default is fine for most users, but making any step that takes noticeable elapsed time compulsory feels like it's going too far.
By the way - great plugin - thank you!
@shark0der would you be ok with it being opt out if it were only run when new contracts were actually compiled?
Only running when contracts change. Yes! Also the option to opt-out globally via direct hardhat flag. Appears to not work when passing to hardhat directly, e.g. hardhat --no-typechain coverage results in "Unrecognized param --no-typechain"
The recently added zero-config feature that overrides the compile task to generate typechain should be opt-in. Although there is a flag to turn it off for the compile task when running it from the command-line, there's no way to stop it from running when running other tasks that automatically compile the contracts. Specifically, when running the
test
task - the typechain is generated and there's no way to stop this.My current workflow triggers
hardhat test
to be run whenever a test is changed (watching file changes using nodemon) and typechain generation adds a few extra seconds to this loop thus slowing down the development.My config:
Behavior:
package.json:
Please make this feature opt-in!