In addition, it would be nice if not only file-based artifacts can clean themselves in another process. I mean, if a CLI invocation starts a process/service (or deployment, later), then it should be possible to kill it through a new CLI invocation, i.e., in another process. That would mean looking for the exact command and signalling TERM (I guess using psutil). Also, a similar technique could be used to see whether the process is already running, so we report "done" rather than "clean" and don't attempt to remake the process/service on make() (which often fails, e.g., for webapps trying to reuse a port).
In addition, it would be nice if not only file-based artifacts can clean themselves in another process. I mean, if a CLI invocation starts a process/service (or deployment, later), then it should be possible to kill it through a new CLI invocation, i.e., in another process. That would mean looking for the exact command and signalling TERM (I guess using
psutil). Also, a similar technique could be used to see whether the process is already running, so we report "done" rather than "clean" and don't attempt to remake the process/service on make() (which often fails, e.g., for webapps trying to reuse a port).