Commit 4bee701
committed
feat(fingerprint): impl Serialize for DirtyReason
To implement Serialize for DirtyReason,
we need to also impl Serialize for underly types as well:
* `FileTime`: serialize as f64 milliseconds
Millisecond precision should be sufficient for mtime comparison,
if not we can change to nanosecond
* `Checksum`: serializing to Display format
(e.g., "sha256=abc123...")
* `StaleItem`: with internally tagged format, for example
```
{"stale-item":"missing-file","path":"src/lib.rs"}
{"stale-item":"changed-file","reference_mtimer":"...", ...}
```
* `FsStatus`: with internally tagged format, for example
```
{"fs-status":"stale-item","type":"missing-file","path":"..."}
```
The `UpToDate` variant is skipped
since it's not relevant for rebuild reason logging.
_Part of `-Zbuild-analysis` rebuild reason logging feature_1 parent 371b1c3 commit 4bee701
File tree
3 files changed
+551
-3
lines changed- src/cargo/core/compiler/fingerprint
3 files changed
+551
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
660 | 661 | | |
661 | 662 | | |
662 | 663 | | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
663 | 673 | | |
664 | 674 | | |
665 | 675 | | |
| |||
0 commit comments