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

Fixes bugged run(expr) (#2023) by adding run_cb(expr, callback) and run_wait(expr) #2036

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Oxtaly
Copy link

@Oxtaly Oxtaly commented Feb 11, 2025

This PR fixes #2023 by adding run_cb(expr, callback) and run_wait(expr) functions that cover the previous return value use cases for run(expr)
More details and information in the committed Auxiliary.md

This also adds an error callback along with a setter setErrorCallback in SnoopyCommandSource to work with errors from the CommandSourceStack sendFailure being called after the resultConsumer from withCallback or being called too early with resultConsumer not being triggered

I've tried to follow the code practices and indentation of the project but I'm still new to contributing to open source so apologies if it doesn't match perfectly

…cumentation for `run_cb(...)` and `run_wait(...)` and changed documentation for `run(...)`
@Oxtaly Oxtaly changed the title Proposed replacement for bugged run(expr). Adds run_cb(expr, callback) and run_wait(expr) Fixes bugged run(expr) (#2023) by adding run_cb(expr, callback) and run_wait(expr) Feb 11, 2025
@gnembon
Copy link
Owner

gnembon commented Feb 14, 2025

I explained what the issue is about in the bug report in
#2023 (comment)
. I think there are mitigation measures. Maybe there is still a place for run_async with callbacks?

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

Successfully merging this pull request may close these issues.

Bug: Scarpet run('command') function does not return any values
2 participants