Open Johennes opened 2 weeks ago
I started working on this before realizing it'll first require a new release of uniffi-rs. So leaving this here as a draft to be picked up again later.
I don't think this relies on uniffi-rs, but there maybe some more self::
and borrow
s to add to the templates. Would @GuillaumeGomez be able to help here?
I haven't dug deeply but this error looked as if it was still pulling in askama (even though its not a direct dependency anymore) and the only crate that appears to do it was from uniffi-rs.
115 | #[derive(Template)]
| ^ the trait `From<askama::error::Error>` is not implemented for `bindings::_::rinja::Error`, which is required by `Result<(), bindings::_::rinja::Error>: FromResidual<Result<Infallible, askama::error::Error>>`
Maybe that error is just a surrogate though?
That's strange. Unless you still have askama
in your dependency tree, you should never see askama
anywhere as rinja
doesn't depend on it (directly or indirectly).
Poking at it a little, the build fails on a number of statements in the templates, for instance:
{%- let obj = ci|get_object_definition(name) %}
If I'm reading things correctly, that function bubbles up into lookup_error
which results in askama::Error
in the versions of the uniffi-rs crates that we're using and was changed to rinja::Error
in the merged yet unreleased pull request that migrated uniffi-rs to rinja.
Ah then until you use the latest version, I suppose you'll have the issue.
Fixes: #150
I started working on this before realizing it'll first require a new release of uniffi-rs. So leaving this here as a draft to be picked up again later.