Quit instantly when no items marked for deletion#297
Conversation
Co-authored-by: Byron <63622+Byron@users.noreply.github.com>
c9455a1 to
d0f66d6
Compare
| [[package]] | ||
| name = "home" | ||
| version = "0.5.11" | ||
| version = "0.5.12" |
There was a problem hiding this comment.
Note that this version requires Rust 1.88, contrary to your own MSRV 1.83.
You could use CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback when updating your lockfile to avoid this automatically.
There was a problem hiding this comment.
Thanks for the hint!
I would have thought that if Cargo treats rust-version as MSRV, it would automatically assure version updates don't violate it.
Personally, I didn't think of it as MSRV, just as the minimal version that is needed to build the application code, just as a service to those who want to build it themselves.
If dependencies aren't adhering to it, I'd rather remove the field, I think.
Does that make sense?
There was a problem hiding this comment.
I would have thought that if Cargo treats
rust-versionas MSRV, it would automatically assure version updates don't violate it.
That's what the fallback resolver is about, but it's relatively new. You can opt into this more directly starting in 1.84, and it's the default in 2024 edition (1.85+).
https://blog.rust-lang.org/2025/01/09/Rust-1.84.0/#cargo-considers-rust-versions-for-dependency-version-selection
Personally, I didn't think of it as MSRV, just as the minimal version that is needed to build the application code, just as a service to those who want to build it themselves.
If dependencies aren't adhering to it, I'd rather remove the field, I think. Does that make sense?
Even as just a hint, I think it's still useful to keep, but maybe it would be worth adding a CI job for it so you know when it needs to be increased.
I don't think it's a big deal for dependencies to raise their MSRV now that we have a resolver that deals with it, and you don't necessarily need to follow them if you're not using new features too. It's up to you!
There was a problem hiding this comment.
Then I think it's fixed now - I intuitively removed that version field and added edition = 2024. But from what I read here, it seems it can be re-added to protect against new lints showing up unexpectedly.
In any case, thanks for all your help, it was quite inspirational.
Pressing 'q' in the main view previously required two confirmations regardless of whether items were marked for deletion. This added unnecessary friction when no destructive action was pending.
Changes
Modified
handle_quit()insrc/interactive/app/eventloop.rs:window.mark_pane.is_none()(no deletion risk)Added tests covering both instant quit and two-press scenarios.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.