fix: the pick_file() can return None when cancelled#258
Merged
PolyMeilex merged 4 commits intoPolyMeilex:masterfrom Jul 16, 2025
Merged
fix: the pick_file() can return None when cancelled#258PolyMeilex merged 4 commits intoPolyMeilex:masterfrom
pick_file() can return None when cancelled#258PolyMeilex merged 4 commits intoPolyMeilex:masterfrom
Conversation
Contributor
Author
|
The way I used for debugging is to add dependencies in console_error_panic_hook = "0.1"
console_log = "1.0"
log = "0.4"Also register the hook in console_log::init().expect("Initialize logger");
std::panic::set_hook(Box::new(console_error_panic_hook::hook));Do you think it's necessary for adding these into Finally in the |
PolyMeilex
approved these changes
Jul 16, 2025
Owner
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey dude,
I feel apologetic for such a slipup.
In my earlier PR #252, the overlay was removed directly from the
body, which left the JavaScript Promise unresolved, breaking the event loop during.awaitand preventing the correct return valueNonefrom being obtained frompick_file().To address this issue, the Promise will now be rejected if cancelled. Since the current
show()does not permit failure, I am marking the future result with.ok()instead of.unwrap(). Hope it's good enough this time 😅