Code Monkey home page Code Monkey logo

Comments (13)

Hyde46 avatar Hyde46 commented on August 17, 2024 1

Thanks for pointing this out!
Actually yes it seems transitively affected. I'm relying on the reqwest library for http calls which is using a version of h2 which includes the issue.
I'll replace some dependencies and build&publish a new version in the next couple days

from hoard.

Hyde46 avatar Hyde46 commented on August 17, 2024

Whoops, didnt mean to close it

from hoard.

Hyde46 avatar Hyde46 commented on August 17, 2024

New release is finished 👍
Thanks again!

from hoard.

jubalh avatar jubalh commented on August 17, 2024

Thanks for the update!

When updating the openSUSE package I got the following error during building though:

[   54s]    Compiling hoard-rs v1.3.1 (/home/abuild/rpmbuild/BUILD/hoard-1.3.2~0)
[   55s] warning: unused import: `DrawState`
[   55s]  --> src/gui/list_search/key_not_set_controls.rs:2:46
[   55s]   |
[   55s] 2 | use crate::gui::commands_gui::{ControlState, DrawState, State};
[   55s]   |                                              ^^^^^^^^^
[   55s]   |
[   55s]   = note: `#[warn(unused_imports)]` on by default
[   55s] 
[   55s] warning: unused import: `chatgpt::prelude::ChatGPT`
[   55s]   --> src/hoard.rs:27:5
[   55s]    |
[   55s] 27 | use chatgpt::prelude::ChatGPT;
[   55s]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
[   55s] 
[   55s] error[E0597]: `theme` does not live long enough
[   55s]    --> src/gui/prompts.rs:95:26
[   55s]     |
[   55s] 94  |     let theme = HoardTheme::default();
[   55s]     |         ----- binding `theme` declared here
[   55s] 95  |     Password::with_theme(&theme)
[   55s]     |     ---------------------^^^^^^-
[   55s]     |     |                    |
[   55s]     |     |                    borrowed value does not live long enough
[   55s]     |     a temporary with access to the borrow is created here ...
[   55s] ...
[   55s] 100 | }
[   55s]     | -
[   55s]     | |
[   55s]     | `theme` dropped here while still borrowed
[   55s]     | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `Password<'_>`
[   55s]     |
[   55s]     = note: the temporary is part of an expression at the end of a block;
[   55s]             consider forcing this temporary to be dropped sooner, before the block's local variables are dropped
[   55s] help: for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block
[   55s]     |
[   55s] 95  ~     let x = Password::with_theme(&theme)
[   55s] 96  |         .with_prompt(text)
[   55s] 97  |         .with_confirmation("Repeat password", "Error: the passwords don't match.")
[   55s] 98  |         .interact()
[   55s] 99  ~         .unwrap(); x
[   55s]     |
[   55s] 
[   55s] error[E0597]: `theme` does not live long enough
[   55s]    --> src/gui/prompts.rs:104:26
[   55s]     |
[   55s] 103 |     let theme = HoardTheme::default();
[   55s]     |         ----- binding `theme` declared here
[   55s] 104 |     Password::with_theme(&theme)
[   55s]     |     ---------------------^^^^^^-
[   55s]     |     |                    |
[   55s]     |     |                    borrowed value does not live long enough
[   55s]     |     a temporary with access to the borrow is created here ...
[   55s] ...
[   55s] 108 | }
[   55s]     | -
[   55s]     | |
[   55s]     | `theme` dropped here while still borrowed
[   55s]     | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `Password<'_>`
[   55s]     |
[   55s]     = note: the temporary is part of an expression at the end of a block;
[   55s]             consider forcing this temporary to be dropped sooner, before the block's local variables are dropped
[   55s] help: for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block
[   55s]     |
[   55s] 104 ~     let x = Password::with_theme(&theme)
[   55s] 105 |         .with_prompt(text)
[   55s] 106 |         .interact()
[   55s] 107 ~         .unwrap(); x
[   55s]     |
[   55s] 
[   55s] For more information about this error, try `rustc --explain E0597`.
[   55s] warning: `hoard-rs` (bin "hoard") generated 2 warnings
[   55s] error: could not compile `hoard-rs` (bin "hoard") due to 2 previous errors; 2 warnings emitted

from hoard.

Hyde46 avatar Hyde46 commented on August 17, 2024

Hmm, current main builds for me locally.
What version of rust are you on?

from hoard.

jubalh avatar jubalh commented on August 17, 2024

What version of rust are you on?

Rust 1.71

from hoard.

Hyde46 avatar Hyde46 commented on August 17, 2024

Also builds for me with 1.71
I see Compiling hoard-rs v1.3.1 this at the top of your message.
Can you make sure that you are on the latest changes on main and try to build again please?

from hoard.

jubalh avatar jubalh commented on August 17, 2024

I see Compiling hoard-rs v1.3.1 this at the top of your message.

I do believe that is because you did 9a6599b after tagging the release. Thus it still prints the 1.3.1 version.

Can you make sure that you are on the latest changes on main and try to build again please?

I'm using the tarball from here https://github.com/Hyde46/hoard/releases/tag/v1.3.2

I took the changes on master from https://github.com/Hyde46/hoard/compare/v1.3.2...main.patch and added them in a patch. Resulting in the correct version printed in Compiling hoard-rs v1.3.2 .

But the error still stays. I'll upload the full build log in a second in case that helps.

from hoard.

jubalh avatar jubalh commented on August 17, 2024

buildlog.txt

from hoard.

jubalh avatar jubalh commented on August 17, 2024

I tried the 1.4.0 release and now get only:

[   78s]    Compiling hoard-rs v1.4.0 (/home/abuild/rpmbuild/BUILD/hoard-1.4.0~0)
[   79s] error[E0597]: `theme` does not live long enough
[   79s]    --> src/gui/prompts.rs:95:26
[   79s]     |
[   79s] 94  |     let theme = HoardTheme::default();
[   79s]     |         ----- binding `theme` declared here
[   79s] 95  |     Password::with_theme(&theme)
[   79s]     |     ---------------------^^^^^^-
[   79s]     |     |                    |
[   79s]     |     |                    borrowed value does not live long enough
[   79s]     |     a temporary with access to the borrow is created here ...
[   79s] ...
[   79s] 100 | }
[   79s]     | -
[   79s]     | |
[   79s]     | `theme` dropped here while still borrowed
[   79s]     | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `Password<'_>`
[   79s]     |
[   79s]     = note: the temporary is part of an expression at the end of a block;
[   79s]             consider forcing this temporary to be dropped sooner, before the block's local variables are dropped
[   79s] help: for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block
[   79s]     |
[   79s] 95  ~     let x = Password::with_theme(&theme)
[   79s] 96  |         .with_prompt(text)
[   79s] 97  |         .with_confirmation("Repeat password", "Error: the passwords don't match.")
[   79s] 98  |         .interact()
[   79s] 99  ~         .unwrap(); x
[   79s]     |
[   79s] 
[   79s] error[E0597]: `theme` does not live long enough
[   79s]    --> src/gui/prompts.rs:104:26
[   79s]     |
[   79s] 103 |     let theme = HoardTheme::default();
[   79s]     |         ----- binding `theme` declared here
[   79s] 104 |     Password::with_theme(&theme)
[   79s]     |     ---------------------^^^^^^-
[   79s]     |     |                    |
[   79s]     |     |                    borrowed value does not live long enough
[   79s]     |     a temporary with access to the borrow is created here ...
[   79s] ...
[   79s] 108 | }
[   79s]     | -
[   79s]     | |
[   79s]     | `theme` dropped here while still borrowed
[   79s]     | ... and the borrow might be used here, when that temporary is dropped and runs the destructor for type `Password<'_>`
[   79s]     |
[   79s]     = note: the temporary is part of an expression at the end of a block;
[   79s]             consider forcing this temporary to be dropped sooner, before the block's local variables are dropped
[   79s] help: for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block
[   79s]     |
[   79s] 104 ~     let x = Password::with_theme(&theme)
[   79s] 105 |         .with_prompt(text)
[   79s] 106 |         .interact()
[   79s] 107 ~         .unwrap(); x
[   79s]     |

Full build log: https://build.opensuse.org/build/utilities/openSUSE_Factory/x86_64/hoard/_log

from hoard.

Hyde46 avatar Hyde46 commented on August 17, 2024

Finally could replicate the issue and could fix it. Thanks for the build logs!

from hoard.

Hyde46 avatar Hyde46 commented on August 17, 2024

Should hopefully be okay with release 1.4.2 now

from hoard.

jubalh avatar jubalh commented on August 17, 2024

That did the trick :)

from hoard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.