You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After updating to 2.2.3 to 2.3.0, waiting in a spingroup seems to have broken and now throws a ClosedQueueError.
Minimal test case:
require'cli/ui'CLI::UI::StdoutRouter.enableCLI::UI::SpinGroup.newdo |sg|
# Task 1sg.add('pending'){ |spinner|
result={'message'=>'mock api result'}sleep(0.5)spinner.update_title(result['message'])}# Wait for previous task to finish before starting the nextsg.wait# Task 2sg.add('pending 2'){ |spinner|
result={'message'=>'mock api result 2'}sleep(0.5)spinner.update_title(result['message'])}end
Full output:
# ruby test.rb
✓ mock api result
/usr/local/bundle/gems/cli-ui-2.3.0/lib/cli/ui/work_queue.rb:86:in `push': queue closed (ClosedQueueError)
from /usr/local/bundle/gems/cli-ui-2.3.0/lib/cli/ui/work_queue.rb:86:in `enqueue'
from /usr/local/bundle/gems/cli-ui-2.3.0/lib/cli/ui/spinner/spin_group.rb:135:in `initialize'
from /usr/local/bundle/gems/cli-ui-2.3.0/lib/cli/ui/spinner/spin_group.rb:315:in `new'
from /usr/local/bundle/gems/cli-ui-2.3.0/lib/cli/ui/spinner/spin_group.rb:315:in `block in add'
from /usr/local/bundle/gems/cli-ui-2.3.0/lib/cli/ui/spinner/spin_group.rb:314:in `synchronize'
from /usr/local/bundle/gems/cli-ui-2.3.0/lib/cli/ui/spinner/spin_group.rb:314:in `add'
from test.rb:17:in `block in <main>'
from /usr/local/bundle/gems/cli-ui-2.3.0/lib/cli/ui/spinner/spin_group.rb:93:in `initialize'
from test.rb:5:in `new'
from test.rb:5:in `<main>'
The text was updated successfully, but these errors were encountered:
After updating to 2.2.3 to 2.3.0, waiting in a spingroup seems to have broken and now throws a
ClosedQueueError
.Minimal test case:
Full output:
The text was updated successfully, but these errors were encountered: