digitalmars.D.learn - Are files in dub's "copyFiles" copied every time dub is run?
Marc <jckj33 gmail.com> writes:
if so, can I somehow make it copy only if newest?
Jonathan M Davis <newsgroup.d jmdavisprog.com> writes:
On Monday, March 05, 2018 21:26:48 Marc via Digitalmars-d-learn wrote:if so, can I somehow make it copy only if newest?It actually would have been my guess that it would copy too infrequently - e.g. only on a fresh build - but I don't know. IIRC, it does have that problem when running pre-build steps, but I'd have to check to be 100% sure. And if you're worried about what it's doing with copy, I'd suggest that you test to see what it's doing by having huge files or something (so that the time difference can be seen). dub generally isn't configurable for stuff like this though. In general, it has the problem that it's trying to do all of the build stuff for you in a standard way and thus configurability seems to have been tacked on to it over time where it's had to be added or where enough people have complained about it. It's really not a general purpose build system like make. Part of that is the price of making dub easy to use for the simple stuff, and part of it stems from the fact that the dub devs don't want to have to worry about whether a dependency requires installing a bunch of extra software to be built. If everything builds in a completely standard way, then that's not a problem - but it also makes it much less flexible, which is a good part of why some folks really don't like using dub. If dub's copyFiles isn't working how you'd like, I'd suggest looking at adding pre or post-build scripts to do the copying for you, though depending on when dub runs them and when it skips them, that may or may not do what you want. - Jonathan M Davis