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

add debug logging to ascertain the base path the asset server is using #13820

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alphastrata
Copy link
Contributor

Objective

Explicitly and exactly know what of the environment variables (if any) are being used/not-used/found-not-found by the bevy_asset::io::file::get_base_path().

  • Describe the objective or issue this PR addresses:
    In a sufficiently complex project, with enough crates and such it can be hard to know what the Asset Server is using as, what in the bevy parlance is its 'base path', this change seems to be the lowest effort to discovering that.

Solution

  • Added debug! logging to the FileAssetReader::new() call.

Testing

See output by making a project and trying something like RUST_LOG=bevy_asset::io::file=debug cargo run

  • Ran Bevy's tests.

  • How can other people (reviewers) test your changes?: Intentionally mess with your env variables (BEVY_ASSET_ROOT and CARGO_MANIFEST_DIR, scatter assets about and attempt to (without this change) locate where it's going wrong.

  • Is there anything specific they need to know?: I encountered this issue in a rather large workspace with many many crates with multiple nested asset directories.

  • If relevant, what platforms did you test these changes on, and are there any important ones you can't test? Linux.


@alice-i-cecile alice-i-cecile added A-Assets Load files from disk to use for things like images, models, and sounds C-Usability A simple quality-of-life change that makes Bevy easier to use S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Jun 12, 2024
@alphastrata alphastrata marked this pull request as ready for review June 13, 2024 06:26
@alice-i-cecile alice-i-cecile changed the title add debug logging to ascertain the base bath the asset server is using add debug logging to ascertain the base path the asset server is using Jun 13, 2024
@alice-i-cecile alice-i-cecile added S-Needs-Review Needs reviewer attention (from anyone!) to move forward and removed S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Jun 13, 2024
@alphastrata
Copy link
Contributor Author

@alice-i-cecile presumably this one's pretty uncontroversial yeah?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Usability A simple quality-of-life change that makes Bevy easier to use S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants