Plugin distribution FAB does not match Epic’s setup
I haven’t gotten a chance to look super deeply into this and figure out what flags are missing, but when trying to run with the fab distribution, I get no compiler errors where as when I submit to FAB, I do for things like inlining and forward declares.
It would be nice if running a plugin build with the distribution FAB setting would match with Epic’s settings.
According to Epic’s documentation (see 4.3.6.2.b) this should run:
Engine\Build\BatchFiles\RunUAT.bat BuildPlugin -Plugin=[Path to .uplugin file, must be outside engine directory] -Package=[Output directory] -Rocket
I am aware that BuildPlugin is just a set of flags for a BuildConfig but somehow somewhere, uet seems to not match.
When you set UET to distribute for Fab, that means it's preparing a package for submission to Fab, not that it is building it in the same way as Fab. In particular, when distribution for Fab is turned on, it doesn't build the plugin code at all for the ZIP, since the ZIP you submit to Fab should be source code only. That BuildPlugin command also does the same thing - it just assembles the ZIP without actually building anything.
UET will still build the plugin for automation tests if any have been set, but that's not guaranteed to build in the same way as Fab does and doesn't form part of the package ZIP.
The reason we don't build the same as Fab is that turning on all the build settings that Fab does requires a source engine - the installed builds through the launcher don't ship with the object files necessary to build with IWYU flags all turned on. But you're submitting plugins for the launcher builds that Epic distributes, so you could still run into edge cases where something works on your local machine but fails for Fab submission due to their specific environment.
I have asked for more specific details on the exact commits/build environment from Fab so we can replicate it more closely, but there's been no movement on that front.