Commit ed43890
authored
feat(assets): Add feature flag
With feature flag, during asset load, each input used to update cid are
tracked and then logged.
One issue is that for dep_cid, I tried to get the AssetLoc for deps, but
it appears to be None. Would be good to improve with some identifying
information on dependency, right now just logs dep_cid and asset cid
after update. If dep_cid differs, hard to tell which it is / why.
Dump for each asset is a single trace call, which hopefully will avoid
any interleaved output as this runs in parallel for multiple assets.
Sample output:
```
2024-07-11T01:45:13.558171Z INFO bones_asset::server: Cid trace schema: u!("jumpy::GameMeta") file path: "/game.yaml"
Trace is in order of updates, which impacts result
[Intermediate] Cid from schema fullname: u!("jumpy::GameMeta") cid: GqGtXP1KVcKyCvAHaUFYKt6miTj83mNfamjHYhfnScDm
[Intermediate] Cid from contents: cid: Ee6Z9iFMXp9PZkHgH5UCdbT9RQqy1UwUBZPePWaqUXgu
Dumping updates from sorted dependency cids:
dep_cid: 1sp1JT5VhgEas7h5A55pmMLSo7SGj44VtnwKF3xVtjq, cid: 5MtTGxtP5C2ytUANTrQRw8cufhRvVykGALggTzgY1eFA, dep_asset_loc: None
... <truncated, quite long> ...
dep_cid: 5VYCqN78NFaPYig354UZW9Pu6Bj8qoLHCDP59UXF2cr, cid: 8NCDAQU5ETULQ78FcSWtyHZePi5iWZciyAoRF2C2fyET, dep_asset_loc: None
Final cid: A71MVvdDbboEKKx8tQULZh9baqoqDQn45PDeS6QxWrWQ
```
Hopefully useful for issues like:
fishfolk/jumpy#995cid_debug_trace to bones_asset (#422)1 parent cfce040 commit ed43890
3 files changed
+120
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
610 | 614 | | |
611 | 615 | | |
612 | 616 | | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
613 | 624 | | |
614 | 625 | | |
615 | 626 | | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
616 | 633 | | |
617 | 634 | | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
618 | 640 | | |
619 | 641 | | |
620 | 642 | | |
| |||
654 | 676 | | |
655 | 677 | | |
656 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
657 | 695 | | |
658 | 696 | | |
659 | 697 | | |
| |||
0 commit comments