www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Dub Renaming source/app.d makes project a library

reply Nicholas Wilson <iamthewilsonator hotmail.com> writes:
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
Oct 27 2018
parent reply Neia Neutuladh <neia ikeran.org> writes:
targetType "executable" does it for me (dub 1.11.0).

Can you post your full dub.sdl?
Oct 27 2018
parent Nicholas Wilson <iamthewilsonator hotmail.com> writes:
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.
Oct 27 2018