Am 17.02.2018 um 10:37 schrieb Christian Köstlin:
I really enjoy working with dub. In the last weeks I played around with
preGenerate- and preBuildCommands. It seems, that preBuildCommands are
not always executed (e.g. if you build a dependency that is pulled from
the dub repository), whereas preGenerateCommands are run more often.
Could somebody describe whats going on there?
preBuildCommands are supposed to get executed right before a certain
package is actually built, so they get skipped when there is already a
cached build result. On the other hand, they will also execute within a
foreign build tool, for example when generating a VisualStudio solution.
preGenerateCommands on the other hand are always executed before the
project is "generated". For the default mode where DUB itself is the
builder, this means for every invocation. For other generators (e.g.
VisualD) it means just once when "dub generate visuald" is executed, but
never within VisualStudio itself.