Closed kakoc closed 2 years ago
Preserving things is on pourpouse since even under local development you will want most probably to keep state across different executions of the same contract to emulate how things would work in a real environment.
What we could do is add a commad line parameter for when the local node is executed to perform a tear down of any state which is kept alive. I would rather do that that introduce scripts just for it, as it seems more portable and maintainable and it makes sense to give those options to the developer (I also have faced similar situations where I had to clean manually any output to have a blank slate, but other tiems you want to keep previous state around, so I think having the flexibility is good).
Adding a command line argument sounds good. I can tackle on it.
But what do you think about automated build of the dev contracts for dev purposes like I mentioned above via bash file?
But what do you think about automated build of the dev contracts for dev purposes like I mentioned above via bash file?
Yes we will need scripts for those eventually when we enable them at the CI level and add them to testing pipelines.
Which because rising popularity we shall do sooner rather than later. But we can pick up on that later.
While developing locally
temp_dir()
is used. So I faced with the issue when I changed my html files but they won't applied for new run just because files in temp dir preserved(in my case it was:/var/...locutus/webs/...
; m1 Monterey platform) I needed explicitlyrm -rf /var/.../locutus
So probably we need to do some cleanup when exit? Also I faced with the issue when I changed some file and I need to run bunch of comands(recompile web/data contract/data and move into examples) Since it's an active development as a quick solution - does it make sense to introduce some Makefile/bashscript for that? Something like that:We also can place a temp dir clean command there