Hello,
We’re encountering a fatal error when trying to set up a project in Horde using the AutoSdk:
Fatal error: EpicGames.Perforce.PerforceException: Unable to parse view map entry: “//MyDepot/UE5-AutoSdk-Windows/HostWin64/Win64/Windows Kits/10/Extension SDKs/WindowsDesktop/10.0.22621.0/…” “HostWin64/Win64/Windows Kits/10/Extension SDKs/WindowsDesktop/10.0.22621.0/…”
The AutoSdk stream imports only the 10.0.22621.0 Windows kit from another stream that contains multiple Windows kits.
An example line from the stream specs looks like this:
import “HostWin64/Win64/Windows Kits/10/Extension SDKs/WindowsDesktop/10.0.22621.0/…” “//MyDepot/UE5-AutoSdk-Windows/HostWin64/Win64/Windows Kits/10/Extension SDKs/WindowsDesktop/10.0.22621.0/…”
The paths are enclosed in quotes because the directories contain spaces.
Is there a workaround for using paths with spaces in Perforce stream specs? While this issue isn’t critical, it would be beneficial to resolve it.
Thank a lot!
Hey there,
Apologies for the delay, as I’ve been out at a conference the past week.
Just reading through the code, I can see where this could go wrong.
In PerforceViewMap.cs, you can implement a bit of a workaround as follows:
`public static PerforceViewMapEntry Parse(string entry)
{
Match match = Regex.Match(entry, @“^\s*(-?)\s*(?:”“([^”“]+)”“|([^ “”\t]+))\s+(?:”“([^”“]+)”“|([^ “”\t]+))\s*$”);
if (!match.Success)
{
throw new PerforceException($“Unable to parse view map entry: {entry}”);
}
string left = match.Groups[2].Success ? match.Groups[2].Value : match.Groups[3].Value;
string right = match.Groups[4].Success ? match.Groups[4].Value : match.Groups[5].Value;
bool isInclude = match.Groups[1].Length == 0;
return new PerforceViewMapEntry(isInclude, left, right);
}`I’ve verified this with the PerforceViewMapTests.cs:
// ... spaces AssertMapSpec("\"//MyDepot/UE5-AutoSdk-Windows/HostWin64/Win64/Windows Kits/10/Extension SDKs/WindowsDesktop/10.0.22621.0/...\" \"HostWin64/Win64/Windows Kits/10/Extension SDKs/WindowsDesktop/10.0.22621.0/...\"") .Maps("//MyDepot/UE5-AutoSdk-Windows/HostWin64/Win64/Windows Kits/10/Extension SDKs/WindowsDesktop/10.0.22621.0/SomeFile.xml", "HostWin64/Win64/Windows Kits/10/Extension SDKs/WindowsDesktop/10.0.22621.0/SomeFile.xml");
I can create a jira ticket internally to get this fixed.
Julian