Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

askama_rocket 0.11.0-rc.1 seems to be broken #524

Open
jplatte opened this issue Aug 2, 2021 · 3 comments
Open

askama_rocket 0.11.0-rc.1 seems to be broken #524

jplatte opened this issue Aug 2, 2021 · 3 comments

Comments

@jplatte
Copy link
Contributor

jplatte commented Aug 2, 2021

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

@djc
Copy link
Owner

djc commented Aug 5, 2021

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.

@stchris
Copy link

stchris commented Nov 19, 2021

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?

@alexfromapex
Copy link

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" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants