add debug logging to ascertain the base path the asset server is using #13820
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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()
.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
debug!
logging to theFileAssetReader::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.