alecthomas / alecthomas/bit

Ensure outdated/removed/zombie outputs are deleted

Đang mở
#5 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
17
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.