[CLOSED] How to deal with generated code via preBuildCommands?
AndrejMitrovic opened this issue · 1 comments
AndrejMitrovic commented
I have what is essentially:
preBuildCommands "./scripts/run-protobuf.sh"
sourcePaths "lib/generated"
Where the script runs the protobuf compiler and generates some D code within lib/generated
.
But on the first invocation dub will emit a warning (plus a build error):
Warning Invalid source/import path: /c/dev/project/lib
Is there a better way to do this?
Because the current behavior is very unstable, essentially the build will fail the first time around if any of the project's code imports the generated code, but it will then succeed on the next dub rebuild as the preBuildCommands
will have been executed by then and the import warnings will no longer exist.
AndrejMitrovic commented
Wrong repo, apologies!