Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(assets): Add feature flag cid_debug_trace to bones_asset #422

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

MaxCWhitehead
Copy link
Collaborator

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#995

@MaxCWhitehead MaxCWhitehead added this pull request to the merge queue Jul 17, 2024
Merged via the queue into fishfolk:main with commit ed43890 Jul 17, 2024
10 checks passed
@MaxCWhitehead MaxCWhitehead deleted the cid-trace branch July 17, 2024 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant