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

Build problem with 1.20.0 #925

Closed
fxwiegand opened this issue Jun 18, 2024 · 6 comments
Closed

Build problem with 1.20.0 #925

fxwiegand opened this issue Jun 18, 2024 · 6 comments

Comments

@fxwiegand
Copy link

There seems to be an issue with the build of 1.20.0:

   Compiling tera v1.20.0
error[E0599]: no method named `len` found for struct `Pairs` in the current scope
Error:     --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tera-1.20.0/src/parser/mod.rs:1049:46
     |
1049 |     let mut nodes = Vec::with_capacity(pairs.len());
     |                                              ^^^
     |
help: there is a method `le` with a similar name, but with different arguments
    --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/iter/traits/iterator.rs:3887:5

For more information about this error, try `rustc --explain E0599`.
error: could not compile `tera` (lib) due to 1 previous error

This happens on our dependabot PR that wants to update tera.

@fxwiegand
Copy link
Author

Solved with updating other crates.

@hubcio
Copy link

hubcio commented Jul 10, 2024

@fxwiegand do you mind tell me how did you fix it?

EDIT: nevermind, I just did cargo update and it looks like everything works fine.

@fxwiegand
Copy link
Author

Yep that also did the trick for me.

@rorynugent
Copy link

Any chance you could share what crates were updated in Cargo.lock that addressed this issue?
There are scenarios where a blanket cargo update for a complex workspace is not an option.

@fxwiegand
Copy link
Author

Any chance you could share what crates were updated in Cargo.lock that addressed this issue? There are scenarios where a blanket cargo update for a complex workspace is not an option.

Sure should have been this commit: alignoth/alignoth@c798da1

@rorynugent
Copy link

Thanks @fxwiegand! That was very helpful.

I narrowed it down to pest and v2.6.0 where the len() function was added. In other words, tera needs to be run alongside pest of >= v2.6.0.

pest-parser/pest@v2.5.7...v2.6.0#diff-6557813bfc2001db4901f6a0f6b9c6da4631fd4c269a5ad24cc4bb3172a60452R105-R111

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

3 participants