D-Scanner icon indicating copy to clipboard operation
D-Scanner copied to clipboard

preGenerateCommands should not run when used as a library

Open WebFreak001 opened this issue 7 years ago • 2 comments

The preGenerateCommands in dub.json cause dscanner to be rebuilt every time even if there was no change in the application. When using dscanner as a library it's rare (but not completely out of question) to use DSCANNER_VERSION so I think it would be a better idea leaving that blank for library builds.

WebFreak001 avatar Sep 19 '18 19:09 WebFreak001

I solved a similar issue by having a debug config and a deploy config in dub.json. The preGenerateCommands creating the version file is only in the deploy config. Maybe s.th. similar can help here too.

andre2007 avatar Sep 19 '18 19:09 andre2007

You can add a config for that too if needed. As long as the default stuff that's built is the application then it is okay, meaning that dub build continues to build the application and that the pregenerate command is run.

ghost avatar Sep 19 '18 20:09 ghost