DCE won't turn off? Can't instantiate class reflectively

We’re currently using this entry in our project.xml to preserve entire packages:

<haxeflag name="--macro" value="include('com.yourpackage.package')" />

Before this, we also did a dummy instantiation like you mentioned. Note: if you do that dummy instantiation, you can actually do it in a static method that never gets executed, so you don’t pay the cost at runtime. We still use this technique for certain Std methods that don’t get compiled in but are used by remotely downloaded swfs. For our own code, we use the above haxeflag.