askama
askama copied to clipboard
askama_rocket 0.11.0-rc.1 seems to be broken
Relevant dependencies:
askama = { version = "0.10.5", features = ["with-rocket"] }
askama_rocket = "0.11.0-rc.1"
rocket = "0.5.0-rc.1"
First template derive that fails:
#[derive(Template)]
#[template(path = "index.html")]
struct IndexTemplate;
Error message:
error[E0107]: this trait takes 2 lifetime arguments but 1 lifetime argument was supplied
--> src/routes.rs:18:10
|
18 | #[derive(Template)]
| ^^^^^^^^
| |
| expected 2 lifetime arguments
| supplied 1 lifetime argument
|
note: trait defined here, with 2 lifetime parameters: `'r`, `'o`
--> /home/jplatte/.cargo/registry/src/github.com-1ecc6299db9ec823/rocket-0.5.0-rc.1/src/response/responder.rs:181:11
|
181 | pub trait Responder<'r, 'o: 'r> {
| ^^^^^^^^^ -- --
= note: this error originates in the derive macro `Template` (in Nightly builds, run with -Z macro-backtrace for more info)
help: add missing lifetime argument
|
18 | #[derive(Template, 'askama)]
| ^^^^^^^^^
Full code: https://github.com/jplatte/turbo.fish/compare/askama
askama_rocket 0.11.0-rc.1 is mismatched with askama_shared 0.10.x. I'll try to publish newer releases for the core crates after #528 lands, and then hopefully you can use askama_rocket 0.11.0-rc.2.
Since #528 was merged is there anything else blocking the release of an rc2? I'm assuming your time is a constraint @djc , not trying to be pushy here just checking to see if I can help with this?
So I guess until this gets officially released, we can use it like this, correct?
[dependencies]
askama = { git = "https://github.com/djc/askama.git", rev = "8142963", default-features = false, features = ["with-rocket", "mime", "mime_guess"] }
askama_rocket = { git = "https://github.com/djc/askama.git", rev = "8142963" }