module Term

Overview

Crystal 1.21 released execution contexts and made them the default: the runtime now starts a Fiber::ExecutionContext::Parallel context, whose scheduler rejects spawn(same_thread: true) with

Fiber::ExecutionContext::Parallel::Scheduler#spawn doesn't support same_thread:true

term-spinner still spawns its animation fiber with same_thread: true, so every auto_spin (e.g. bld login) aborts when the CLI is compiled with Crystal >= 1.21. Redefine auto_spin with a plain spawn, which behaves identically on every Crystal version we support. Drop this file once term-spinner ships the fix upstream.

Defined in:

lib/term-cursor/src/term-cursor.cr
lib/term-spinner/src/spinner/formats.cr
lib/term-spinner/src/spinner/multi.cr
lib/term-spinner/src/spinner/version.cr
lib/term-spinner/src/term-spinner.cr
ext/term_spinner.cr