rosetta-rs / template-benchmarks-rs

Collected benchmarks for templating crates written in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sailfish templates are failing to compile

djc opened this issue · comments

With latest git, I see errors like this:

error[E0432]: unresolved import `sfrt`
  --> src/sailfish.rs:49:10
   |
49 | #[derive(TemplateOnce)]
   |          ^^^^^^^^^^^^ no `RenderInternal` in `runtime`
   |
   = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0422]: cannot find struct, variant or union type `Context` in module `sfrt`
  --> src/sailfish.rs:49:10
   |
49 | #[derive(TemplateOnce)]
   |          ^^^^^^^^^^^^ not found in `sfrt`
   |
   = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0046]: not all trait items implemented, missing: `render_once_to_string`
  --> src/sailfish.rs:49:10
   |
49 | #[derive(TemplateOnce)]
   |          ^^^^^^^^^^^^ missing `render_once_to_string` in implementation
   |
   = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
   = help: implement the missing item: `fn render_once_to_string(self, _: &mut std::string::String) -> std::result::Result<(), sailfish::runtime::RenderError> { todo!() }`

@Kogia-sima can you take a look at fixing these?

This seems to be caused because sailfish-macros version is not compatible with sailfish crate. I found that sailfish-macros v0.1.* is not compatible with sailfish v0.2.*, though it is not documented. Updating sailfish-macros crate may fix this problem.

Okay, fixed it in c8c2404. Thanks!