On Thu, 14 Jul 2016 21:45:03 GMT, Steven Schveighoffer wrote:

I am working on a vibe.d project, and I was adding some unittests.

I'm allowing vibe.d to define its own main function for the project.

When running dub test, I get the error: only one main allowed
dmd failed with exit code 1.

How do I fix dub test so it doesn't create its own main function? Shouldn't this be the default config for vibe.d programs?

I had the same problem but in combination with unit-threaded. With some combination of suggested config I can get it to run, but then unit-threaded's runner freezes.

I decided to ditch unit-threaded in the project, and rely on plain unittests. Sadly, now dub decides to run the program after unittests are complete.

This is unworkable.

What is vibe.d doing that causes all these problems?

I reckon unit-threaded's approach of running the unittests in separate threads goes against vibe.d. But surely, it must be possible.