spatial-lang icon indicating copy to clipboard operation
spatial-lang copied to clipboard

rm -rf Generated Directory by Default

Open mattfel1 opened this issue 7 years ago • 2 comments

When doing sbt run-main (or bin/spatial), the generated files get dumped in whatever output directory on top of what is already there. Is there a scenario where this is desired? It seems like this often causes more issues than problems that it solves. Should rm -rf be included in the sbt command or bin/spatial script?

mattfel1 avatar May 05 '17 17:05 mattfel1

+1 to removing generated directory by default, that would speed up debug iterations.

raghup17 avatar May 05 '17 18:05 raghup17

rm -rf as default behavior is a bit scary to me.. what if I made a typo and accidentally made the generated directory /home or something?

Perhaps we can have a compromise and only delete file structures which we're expecting to see? e.g. if you generate stuff to gen/hardware-templates, attempt to remove the hardware-templates folder?

dkoeplin avatar May 10 '17 01:05 dkoeplin