Attempting to add a new code class to a project that is not correctly set up for IWYU (such as an older project that may not have been properly modified for IWYU when upgrading) will result in the build of the project with the new class failing. The build fails because the .cpp file for the new code class is created with two #include statements on a single line.

No. The same behavior occurs in 4.20.3.

Steps to Reproduce
  1. Download the attached project (created in Main CL 4594480).
    • A new code project can be used instead by commenting out the PCHUsage line in the project's Build.cs file and adding an include for the project's .h file to each .cpp file in the project.
  2. Associate the project with your version of Main.
  3. Build the project in Visual Studio.
  4. Open the project in the Editor.
  5. Add a new code class to the project.

The new code class will be added to the project, but the hot reload of the project with the new class will fail.

The new code class is added to the project, and the hot reload completes successfully.

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-66879 in the post.

Login to Vote

Affects Versions4.
Target Fix4.22
Fix Commit4617006
Main Commit4676940
Release Commit4862694
CreatedNov 27, 2018
ResolvedNov 30, 2018
UpdatedFeb 12, 2019