Files
UnrealEngineUWP/Engine/Source/Programs/LowLevelTests
dave jones2 feaebd2165 UE-219092 - Warning: Flushing package <path> while it's being preloaded in the same callstack is not possible
Cyclic dependencies between Blueprints that also include a UDS in the mix can create a scenario where we might recursively load a package that we're already loading. Currently, Zen loader warns about this. While technically harmless, it makes the warning somewhat useless if it raises false positives.

The core issue is that preloading a UDS will use FObjectPropertyBase::FindImportedObject to resolve a string that represents a UObject path. In the case of a cycle, RequestPlaceholderValue creates a placeholder object, but it neglects to supply a package index for the import. As a result, ResolveDependencyPlaceholder forces a StaticLoadObject call that triggers the warning. This can be fixed by determining the package index of the corresponding object path in RequestPlaceholderValue, which avoids trying to find the import using StaticLoadObject.

This fix introduces two new API functions:
* FLinkerLoad::FindImport overload that takes a full object path and returns the corresponding package index.
* FPackageName::SplitFullObjectPath overload that returns each subobject in a path.

For this fix, the subobject support isn't necessary. However, FindImport's implementation would be incomplete if it didn't support subobjects. New tests for each function were also added to LowLevelTests. In order to test FLinkerLoad, we also need to compile out the "final" when running the tests. This makes it easier to setup a test harness for strictly testing FindImport functionality.

#jira UE-219092
#rb danny.couture, Francis.Hurteau
#rnx

[CL 35192522 by dave jones2 in ue5-main branch]
2024-07-30 14:50:16 -04:00
..