Comments (13)
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.
Whoops, didnt mean to close it
from hoard.
New release is finished 👍
Thanks again!
from hoard.
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.
Hmm, current main
builds for me locally.
What version of rust are you on?
from hoard.
What version of rust are you on?
Rust 1.71
from hoard.
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.
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.
from hoard.
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.
Finally could replicate the issue and could fix it. Thanks for the build logs!
from hoard.
Should hopefully be okay with release 1.4.2 now
from hoard.
That did the trick :)
from hoard.
Related Issues (20)
- Allow escape character HOT 2
- GUI command edit HOT 1
- GUI new command from history HOT 3
- Ubuntu .deb packages missing from releases HOT 3
- install.sh write BASH config to .zshrc not .bashrc HOT 3
- Customize tab highlight color HOT 1
- Select name space for new command HOT 1
- Named parameters using `hoard pick` are not interpreted as expected HOT 3
- Allow api_url to be configured that gets used in chatgpt_rs HOT 1
- Unused import/function in the recent release HOT 3
- Problem installling Hoard HOT 3
- New releases not being published, causing installation errors. HOT 1
- Typo in the latest tag HOT 1
- Improve Input Parameter Prompt Clarity and User-Friendliness HOT 2
- Homebrew download failure (most v1.4.2 url paths contain a typo) HOT 1
- Improve descriptions with Markdown or other lightweight formatting options HOT 1
- The version check conflicts with `shell-config` HOT 4
- CVE-2024-32650 HOT 1
- Better editing commands: cursor and navigation HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hoard.