On Thu, 18 Apr 2013 21:23:32 +0200, Sönke Ludwig wrote:

Currently it is necessary to add {"versions": ["VibeCustomMain"]} to
the project's package.json.

Thanks! I'll just use "shared static this()" for now though. I really had no good reason to use custom main(), and the original idea is very D-ish.

Another problem creeped up though, I get an assert error when using normal build (not -release). Also, if I specify -release as a dflag in package.json, DUB complains about it, saying I should call it instead with --build=release. Can this be set as a default in package.json?

This is the error:

[B7235F80:B7235F00 ERR] Error after page has been written: core.exception.AssertError@diet.d(95): Assertion failure
----------------
/tmp/dub/3857266684/Gaol(_d_assert+0x12) [0x8282092]
/tmp/dub/3857266684/Gaol(void vibe.templ.diet.compileDietFileCompatV!("javarun.dt", javarun.JavaRunVM, "model").compileDietFileCompatV(vibe.core.stream.OutputStream, void*, TypeInfo[])+0x95) [0x82693d1]
/tmp/dub/3857266684/Gaol(void vibe.http.server.HttpServerResponse.renderCompat!("javarun.dt", javarun.JavaRunVM, "model").renderCompat(, ...)+0x88) [0x826283c]
/tmp/dub/3857266684/Gaol(void javarun.renderJavaRun(vibe.http.server.HttpServerResponse, const(javarun.JavaRunVM))+0x21) [0x81b9db1]
/tmp/dub/3857266684/Gaol(void javarun.showJavaRun(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)+0x10a) [0x81b98e6]
/tmp/dub/3857266684/Gaol(void std.functional.DelegateFaker!(void function(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)*).DelegateFaker.doIt(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)+0x45) [0x821b71d]
/tmp/dub/3857266684/Gaol(void vibe.http.router.UrlRouter.handleRequest(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)+0x102) [0x825de6e]
/tmp/dub/3857266684/Gaol(bool vibe.http.server.handleRequest(vibe.core.stream.Stream, immutable(char)[], vibe.http.server.HTTPServerListener, ref vibe.http.server.HttpServerSettings, ref bool)+0xe85) [0x8261c99]
/tmp/dub/3857266684/Gaol(void vibe.http.server.handleHttpConnection(vibe.core.net.TcpConnection, vibe.http.server.HTTPServerListener)+0x9d) [0x8260d85]
/tmp/dub/3857266684/Gaol(void vibe.http.server.listenHttpPlain(vibe.http.server.HttpServerSettings, void delegate(vibe.http.server.HttpServerRequest, vibe.http.server.HttpServerResponse)).void doListen(vibe.http.server.HttpServerSettings, vibe.http.server.HTTPServerListener, immutable(char)[]).void __lambda72(vibe.core.net.TcpConnection)+0x23) [0x825e65b]
/tmp/dub/3857266684/Gaol(extern (C) nothrow void vibe.core.drivers.libevent2_tcp.onConnect(int, short, void*).void ClientTask.execute()+0x20e) [0x81c1b06]
/tmp/dub/3857266684/Gaol(void vibe.core.core.CoreTask.run()+0x99) [0x822980d]
/tmp/dub/3857266684/Gaol(void core.thread.Fiber.run()+0x21) [0x82a8501]
/tmp/dub/3857266684/Gaol(fiber_entryPoint+0x4e) [0x82a843e]
[(nil)]
Error: Program exited with code -11