Replies: 2 comments
-
To be honest, there isn't a good reason other than "it's not as easy as it seems (e.g., you have to re-think caching) and it's not clear how valuable it is". Maybe you can help with the second part? Why do you need this frequently? Having specific use cases would help us a lot to prioritize this, since other people have already asked for it (albeit not too many, as far as I can remember). |
Beta Was this translation helpful? Give feedback.
-
I'm not sure what I'm missing, but I would think that adding this feature will be as easy as setting Regarding the use case, I have a repo with many contracts, some with more than 24576 bytes (which will be deployed in a private blockchain). Due to that, compiling the entire project takes a while (around 5 minutes), so I usually compile only the contracts I'm working on, this way it will only compile the changed files in the path of the contracts I'm working on, and if for example changed the branch or so, instead of compiling the entire project only a few contracts will compile. When opened this discussion I had a different scenario, I was receiving this error:
without specification of where the stack too deep could be, in those cases having a way to compile a few contracts instead of the entire project will be really helpful. In this particular case compiling a list of contracts could be even better than all contracts in a path but maybe that solution is not that easy, as you mentioned. I also remember this issue , the solution that the author found was compiling all except some contracts (deleting them), and after that, compiling the missing ones. The ability to compile specific contracts could also help in cases like this one. |
Beta Was this translation helpful? Give feedback.
-
I was wondering if there is a way to compile specific contracts instead of the ones defined in the path configuration.
I haven't found how to do it, other than changing the path of the source in the configuration file which is not practical in the scenarios when I'm needing it, a task param to overwrite the source's path suits it better.
Due to I need this feature frequently, I have redefined the compile task and added a source path param to be able to change it.
But, my question is if there is a special reason (vulnerability, etc.) for not adding this feature in hardhat core
Beta Was this translation helpful? Give feedback.
All reactions