code from docs (first steps) doesn't run with current master #5

Closed
tomash opened this Issue Apr 27, 2012 · 9 comments

Comments

Projects
None yet
4 participants
@tomash

tomash commented Apr 27, 2012

res.render!("index.dt")(req); // doesn't work
/* instead, one below does work: */
auto output = res.bodyWriter();
parseDietFile!("index.dt", req)(output);

also

listenHttp(settings, ); // should be:
listenHttp(settings, &index);
@simendsjo

This comment has been minimized.

Show comment
Hide comment
@simendsjo

simendsjo Apr 27, 2012

Contributor

The error for .render! is
Error: function vibe.http.server.HttpServerResponse.render!("index.dt").render () is not callable using argument types (HttpServerRequest)

Contributor

simendsjo commented Apr 27, 2012

The error for .render! is
Error: function vibe.http.server.HttpServerResponse.render!("index.dt").render () is not callable using argument types (HttpServerRequest)

@rizo

This comment has been minimized.

Show comment
Hide comment
@rizo

rizo Apr 27, 2012

tomash: Actually, in this case you should pass the routes variable to the listenHttp instead.

rizo commented Apr 27, 2012

tomash: Actually, in this case you should pass the routes variable to the listenHttp instead.

@ghost ghost assigned s-ludwig Apr 28, 2012

@simendsjo

This comment has been minimized.

Show comment
Hide comment
Contributor

simendsjo commented Apr 28, 2012

@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Apr 28, 2012

Member

Fixed page is now live.

Member

s-ludwig commented Apr 28, 2012

Fixed page is now live.

@s-ludwig s-ludwig closed this Apr 28, 2012

@simendsjo

This comment has been minimized.

Show comment
Hide comment
@simendsjo

simendsjo Apr 28, 2012

Contributor

Isn't that example too complicated? With pull #21, this becomes res.render!("index.dt"); quite like the original sample. Or is the pull wrong?

Contributor

simendsjo commented Apr 28, 2012

Isn't that example too complicated? With pull #21, this becomes res.render!("index.dt"); quite like the original sample. Or is the pull wrong?

@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Apr 28, 2012

Member

The problem is http://d.puremagic.com/issues/show_bug.cgi?id=2962 which fortunately seems like it was fixed some days ago. So with DMD 2.060 it can be changed to the non-compatibility version.

Member

s-ludwig commented Apr 28, 2012

The problem is http://d.puremagic.com/issues/show_bug.cgi?id=2962 which fortunately seems like it was fixed some days ago. So with DMD 2.060 it can be changed to the non-compatibility version.

@simendsjo

This comment has been minimized.

Show comment
Hide comment
@simendsjo

simendsjo Apr 28, 2012

Contributor

Didn't read the bug report, but it seems to work for me (2.059 linux 64) on the simple example from the home page.

Contributor

simendsjo commented Apr 28, 2012

Didn't read the bug report, but it seems to work for me (2.059 linux 64) on the simple example from the home page.

@s-ludwig

This comment has been minimized.

Show comment
Hide comment
@s-ludwig

s-ludwig Apr 28, 2012

Member

The bug has multiple faces.. a compiler error or just invalid code generated or sometimes it even works correctly. But since this can suddenly crop up when you add some code to the project and since it can be really difficult to track down, I would not recommend to use the render() function without a fixed DMD.

Member

s-ludwig commented Apr 28, 2012

The bug has multiple faces.. a compiler error or just invalid code generated or sometimes it even works correctly. But since this can suddenly crop up when you add some code to the project and since it can be really difficult to track down, I would not recommend to use the render() function without a fixed DMD.

@simendsjo

This comment has been minimized.

Show comment
Hide comment
@simendsjo

simendsjo Apr 28, 2012

Contributor

I see. Vibe seems to work just fine with 2.060, so I guess I can continue to experiment with trunk for the time being.

Contributor

simendsjo commented Apr 28, 2012

I see. Vibe seems to work just fine with 2.060, so I guess I can continue to experiment with trunk for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment