On Tue, 27 Mar 2018 15:40:28 +0200, Sönke Ludwig wrote:
The case of
preGenerateCommandscan definitely be argued, but
preBuildCommandsare simply executing in a logical step after the
build description has already assembled. This can be best seen when
generating a VisualD or CMake project. The commands will still be run as
part of the build, but the list of files has long been generated at that
point, and DUB is not in the game anymore.
The documentation on what "build" and "generate" are is minimal, so I was left to guess what they meant. For instance: "A list of shell commands that is executed always before the project is built". For me a straightforward interpretation of that is 1) it executes the commands and; 2) does a
dub build. Therefore, the
dub build would include any files generated by the commands.
However, as long as the generated file name is known, it can simply be
added explicitly with
sourceFiles. There should be no missing file
errors, as long as it is present just before the compiler gets invoked.
That's really inconvenient. IMO there should be a way to run commands that allows the generated files to be included in the build. If that is
preGenerateCommands that's fine by me.