I wanted to use preBuildCommands to generate some .d files to add to my project, but dub doesn't include those files in the build. You have to build the project a second time. I don't see a good reason for this behavior, so I'd argue it's a bug. preGenerateCommands has the same limitation.