-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix EditorFileSystemDirectory::get_file_deps()
may return wrong result
#83081
Conversation
4d50775
to
937ab4a
Compare
…ults Limit the maxsplit to `8` to get complete `deps`. `deps` caches the return value of `ResourceLoader::get_dependencies()`, which is also separated by "::". "::" is quite popular as a splitter.
937ab4a
to
203f3e7
Compare
I'm wondering about the code below: godot/editor/editor_file_system.cpp Lines 287 to 294 in e8d57af
It uses the last split and splits it using <> separator. Which is weird, because the dependencies are written with :: 🤔Also the :: has caused an error in the past (#78242).Not sure what does this code do, it seems it wasn't working correctly for quite some time. In any case, while your change is correct, I think the splitting code I linked is wrong. It should either use |
godot/editor/editor_file_system.cpp Line 936 in e8d57af
godot/editor/editor_file_system.cpp Lines 1520 to 1525 in e8d57af
godot/doc/classes/ResourceLoader.xml Lines 37 to 43 in e8d57af
godot/scene/resources/resource_format_text.cpp Lines 858 to 882 in e8d57af
The format of a single dep is UID::TYPE::FILEPATH (TYPE usually does not exist). And if it is a script, the format is FILEPATH (personally, I feel that for non-scripts, it would be better if its format is FILEPATH::TYPE::UID, Eg. the dependencies of These single dep:
The deps will be recorded as:
A correct and complete record should be:
split would be the opposite operation. |
Thanks! |
Limit the max split to
8
to get completedeps
.deps
caches the return value ofResourceLoader::get_dependencies()
, which is also separated by "::" (eguid://dnl1wt40gvcuu::::res://icon.svg
)."::" is quite popular as a splitter.
Reference: Code for storing information
godot/editor/editor_file_system.cpp
Lines 1326 to 1335 in 6b727eb