On Wed, 20 Jul 2016 23:35:14 GMT, Steven Schveighoffer wrote:

OK, that kind of worked. But now it says there is an error because I didn't define mainSourceFile. It seems to run the tests now at least.

Yeah, I noticed that as well. Not sure if that was present before Dub 1.0.0.

There's some strange things going on here. If I remove targetType "executable" I get back the error with a duplicated main function. But if I look at how Dub actually compiles the code, in both cases (with and without targetType) it will compile vibe-d/source/vibe/appmain.d with the version VibeDefaultMain specified.

Looking a bit more closely on the command Dub is executing, if targetType "executable" is specified it will not generate the standard main function it usually does for unit tests. Instead the vibe.d default main function will be used. When I run the unit tests, after they finished, I see that the vibe.d application is started just before the application exits:

Listening for requests on http://0.0.0.0:3000/
Please open http://0.0.0.0:3000/ in your browser.

@Sönke, this behavior is not good.

/Jacob Carlborg