In NormalizePackageNames() (PackageUtilities.cpp), there is a PackageFilter parameter, which can be set to exclude developer packages (NORMALIZE_ExcludeDeveloperPackages).
The code only checks the base Developers folder, but doesn't check against _ExternalActors/Developers/ nor __ExternalObjects_/Developers/. (See code snippet below.)
Thist was an oversight when we added ExternalActors and ExternalObjects for world partition. Removing those folders from the list of packages reported by NormalizePackageNames with NORMALIZE_ExcludeDeveloperPackages is the right thing to do.
The behavior of NORMALIZE_ExcludeNonDeveloperPackages will also need to change. I think the other EPackageNormalizationFlags will not be affected.
Find a project with a WorldPartition map in the Developers folder, or create a new WorldPartition map under Content/Developers in an existing project.
Run the DerivedDataCacheCommandlet with -ProjectOnly and WITHOUT -Dev.
Add PRAGMA_DISABLE_OPTIMIZATIONS and put a breakpoint at
DerivedDataCommandlet.cpp:568, on these lines:
FilesInPath will contain the external actor packages for the WorldPartition map from
_ExternalActors/Developers/ and __ExternalObjects_/Developers/.
Those packages should be excluded since -dev is not present on the commandline.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-167189 in the post.