Ensure outdated/removed/zombie outputs are deleted
- 主要语言
- Rust
- 星标
- 17
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
描述
Given a rule like:
```
build/%{1}: cmd/*
inputs: **/*.go
build: go build -o %{OUT} -o build/%{1}
```
If a `cmd` is removed or renamed between builds, the `build` directory will contain stale outputs. The Bit database could be used to track this . This should be relatively straightforward, in that we could populate a variable with a list of files that have been removed from the build since the last run.
eg.
```
build/%{1}: cmd/*
inputs: **/*.go
build:
for stale in %{STALE}; do [[ $stale == build/* ]] && rm $stale; done
go build -o %{OUT} -o build/%{1}
```
Shake has the concept of ["pruning"](http://neilmitchell.blogspot.com/2015/04/cleaning-stale-files-with-shake.html), which could be useful inspiration.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。