Thread overview
Dub Renaming source/app.d makes project a library
Oct 28, 2018
Nicholas Wilson
Oct 28, 2018
Neia Neutuladh
Oct 28, 2018
Nicholas Wilson
October 28, 2018
So I have a project that is a simple dub app with
source/
    app.d

$dub
Performing "debug" build using /Library/D/dmd/bin/dmd for x86_64.
foo ~master: building configuration "application"...
Linking...
Running ./foo
Edit source/app.d to start your project.
$mv source/app.d source/foo.d
$dub
Performing "debug" build using /Library/D/dmd/bin/dmd for x86_64.
foo ~master: building configuration "library"...
Target is a library. Skipping execution.

How do I get it to continue to build in the application configuration by default with the renamed file?

I've tried

mainSourceFile "source/foo.d"
targetType "application"
targetType "executable"

to no avail.

Thanks
Nic
October 28, 2018
targetType "executable" does it for me (dub 1.11.0).

Can you post your full dub.sdl?
October 28, 2018
On Sunday, 28 October 2018 at 03:34:57 UTC, Neia Neutuladh wrote:
> targetType "executable" does it for me (dub 1.11.0).
>
> Can you post your full dub.sdl?

I'm an idiot, I was in the wrong directory that does seem to work.