Improves runtime dependencies input dependency (#3665)
Changes how runtime dependencies are hooked as dependencies to create depenedencies to the inputs This makes it that if an input to the runtime dependencies changes, it gets re-copied (e.g. a 3rdParty changes or a file added through ly_add_target_files) Closes Issue #3391 Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -673,18 +673,17 @@ namespace AZ
|
||||
{
|
||||
AZ_Assert(path && path[0] != '%', "%% is deprecated, @ is the only valid alias token");
|
||||
AZStd::string_view pathView(path);
|
||||
AZStd::string_view aliasKey;
|
||||
AZStd::string_view aliasValue;
|
||||
for (const auto& alias : m_aliases)
|
||||
{
|
||||
AZStd::string_view key{ alias.first };
|
||||
if (AZ::StringFunc::StartsWith(pathView, key)) // we only support aliases at the front of the path
|
||||
|
||||
const auto found = AZStd::find_if(m_aliases.begin(), m_aliases.end(),
|
||||
[pathView](const auto& alias)
|
||||
{
|
||||
aliasKey = key;
|
||||
aliasValue = alias.second;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return pathView.starts_with(alias.first);
|
||||
});
|
||||
|
||||
using string_view_pair = AZStd::pair<AZStd::string_view, AZStd::string_view>;
|
||||
auto [aliasKey, aliasValue] = (found != m_aliases.end()) ? string_view_pair(*found)
|
||||
: string_view_pair{};
|
||||
|
||||
size_t requiredResolvedPathSize = pathView.size() - aliasKey.size() + aliasValue.size() + 1;
|
||||
AZ_Assert(path != resolvedPath && resolvedPathSize >= requiredResolvedPathSize, "Resolved path is incorrect");
|
||||
// we assert above, but we also need to properly handle the case when the resolvedPath buffer size
|
||||
|
||||
Reference in New Issue
Block a user