I was pleased to discover that the Unreal Unity build system had a single file compilation option, however I was dismayed to discover that compiling a single file generally takes more than 10 seconds, due to the overhead of the Unity build. I was hopeful that the upgrade to 4.22 might improve that overhead, however, in practice, it seems that single file compile is just completely broken for me now. Here is the output I see:
1> UnrealBuildTool: ERROR: Unhandled exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
1> at System.ThrowHelper.ThrowKeyNotFoundException()
1> at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
1> at UnrealBuildTool.HotReload.ApplyState(HotReloadState HotReloadState, TargetMakefile Makefile) in D:\depot\dev\prototype\Engine\Source\Programs\UnrealBuildTool\System\HotReload.cs:line 320
1> at UnrealBuildTool.BuildMode.GetActionsForTarget(BuildConfiguration BuildConfiguration, TargetDescriptor TargetDescriptor, TargetMakefile Makefile) in D:\depot\dev\prototype\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 532
1> at UnrealBuildTool.BuildMode.Build(List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, BuildOptions Options) in D:\depot\dev\prototype\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 242
1> at UnrealBuildTool.BuildMode.Execute(CommandLineArguments Arguments) in D:\depot\dev\prototype\Engine\Source\Programs\UnrealBuildTool\Modes\BuildMode.cs:line 191
1> at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in D:\depot\dev\prototype\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 443