add debug logging to ascertain the base path the asset server is using#13820
Merged
alice-i-cecile merged 4 commits intobevyengine:mainfrom Jul 15, 2024
Merged
add debug logging to ascertain the base path the asset server is using#13820alice-i-cecile merged 4 commits intobevyengine:mainfrom
alice-i-cecile merged 4 commits intobevyengine:mainfrom
Conversation
Contributor
Author
|
@alice-i-cecile presumably this one's pretty uncontroversial yeah? |
alice-i-cecile
approved these changes
Jul 6, 2024
torsteingrindvik
approved these changes
Jul 14, 2024
Contributor
torsteingrindvik
left a comment
There was a problem hiding this comment.
The asset root path can indeed be confusing so this is a nice log statement to have.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 runRan Bevy's tests.
How can other people (reviewers) test your changes?: Intentionally mess with your
envvariables (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.