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

breaking change with 0.7.6 release #54

Closed
jqnatividad opened this issue Feb 27, 2024 · 4 comments
Closed

breaking change with 0.7.6 release #54

jqnatividad opened this issue Feb 27, 2024 · 4 comments

Comments

@jqnatividad
Copy link

jqnatividad commented Feb 27, 2024

With the 0.7.6 release, my project qsv fails to compile with this error:

cargo t -F all_features
...                                                                                                                                                                           
error[E0107]: struct takes 2 lifetime arguments but 1 lifetime argument was supplied
  --> C:\Users\joeln\.cargo\registry\src\index.crates.io-6f17d22bba15001f\kiddo-4.2.0\src\common\generate_within_unsorted_iter.rs:44:32
   |
44 |                   mut gen_scope: Scope<'a, (), NearestNeighbour<A, T>>,
   |                                  ^^^^^ -- supplied 1 lifetime argument
   |                                  |
   |                                  expected 2 lifetime arguments
   |
  ::: C:\Users\joeln\.cargo\registry\src\index.crates.io-6f17d22bba15001f\kiddo-4.2.0\src\fixed\query\within_unsorted_iter.rs:18:5
   |
18 | /     generate_within_unsorted_iter!(
19 | |         (r#"Finds all elements within `dist` of `query`, using the specified
20 | | distance metric function.
21 | |
...  |
46 | | ```"#)
47 | |     );
   | |_____- in this macro invocation
   |
note: struct defined here, with 2 lifetime parameters: `'scope`, `'a`
  --> C:\Users\joeln\.cargo\registry\src\index.crates.io-6f17d22bba15001f\generator-0.7.6\src\scope.rs:16:12
   |
16 | pub struct Scope<'scope, 'a, A, T> {
   |            ^^^^^ ------  --
   = note: this error originates in the macro `generate_within_unsorted_iter` (in Nightly builds, run with -Z macro-backtrace for more info)
help: add missing lifetime argument
   |
44 |                 mut gen_scope: Scope<'a, 'a, (), NearestNeighbour<A, T>>,
   |                                        ++++

error[E0107]: struct takes 2 lifetime arguments but 1 lifetime argument was supplied
  --> C:\Users\joeln\.cargo\registry\src\index.crates.io-6f17d22bba15001f\kiddo-4.2.0\src\common\generate_within_unsorted_iter.rs:44:32
   |
44 |                   mut gen_scope: Scope<'a, (), NearestNeighbour<A, T>>,
   |                                  ^^^^^ -- supplied 1 lifetime argument
   |                                  |
   |                                  expected 2 lifetime arguments
   |
  ::: C:\Users\joeln\.cargo\registry\src\index.crates.io-6f17d22bba15001f\kiddo-4.2.0\src\float\query\within_unsorted_iter.rs:43:5
   |
43 | /     generate_float_within_unsorted_iter!(
44 | |         "
45 | | let mut tree: KdTree<f64, 3> = KdTree::new();
46 | | tree.add(&[1.0, 2.0, 5.0], 100);
47 | | tree.add(&[2.0, 3.0, 6.0], 101);"
48 | |     );
   | |_____- in this macro invocation
   |
note: struct defined here, with 2 lifetime parameters: `'scope`, `'a`
  --> C:\Users\joeln\.cargo\registry\src\index.crates.io-6f17d22bba15001f\generator-0.7.6\src\scope.rs:16:12
   |
16 | pub struct Scope<'scope, 'a, A, T> {
   |            ^^^^^ ------  --
   = note: this error originates in the macro `generate_within_unsorted_iter` which comes from the expansion of the macro `generate_float_within_unsorted_iter` (in Nightly builds, run with -Z macro-backtrace for more info)
help: add missing lifetime argument
   |
44 |                 mut gen_scope: Scope<'a, 'a, (), NearestNeighbour<A, T>>,
   |                                        ++++

For more information about this error, try `rustc --explain E0107`.

I fixed it by pinning generator to 0.7.5
dathere/qsv@0f53a4b

Perhaps, 0.7.6 should be yanked and re-released as 0.8.0 instead?

@Xudong-Huang
Copy link
Owner

you are right, we should use a new major version

@Xudong-Huang
Copy link
Owner

018b587 would cover this

@Xudong-Huang
Copy link
Owner

I yanked 0.7.6, thanks

jqnatividad added a commit to dathere/qsv that referenced this issue Mar 4, 2024
now that 0.7.6 has been yanked and re-released as 0.8.0

see Xudong-Huang/generator-rs#54
@jqnatividad
Copy link
Author

Thanks!

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

2 participants