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
{{ message }}
Repository navigation
[Bug] Infinite loop when just running sift with no input #37
Describe the bug
If you just run sift with no input, it hangs on the "Compiling" and/or "Waiting for test results..." stages, even if I press Ctrl+C in the terminal.
It appears that if I press Ctrl+C, it goes from the "Compiling" stage to the "Waiting for test results..." one, but doesn't go anywhere from that.
To Reproduce
Just run sift, with no piped input:
> sift
Expected behavior
The program should either not run or allow me to exit somehow, even if just by pressing CTRL+C.
Screenshots
This is a screen recording that should illustrate the behaviour:
Gravacao.de.Tela.2025-11-09.as.17.34.54.mov
Versions:
Go Version: 1.25.0
CLI Version: 0.12.1
Additional context
I'm running MacOS, and would be open to open a PR to handle SIGINT in the code.
If that's of any help, I created a PR that attempts to fix it. I did some local testing and it does seem to work, but it requires a few presses at CTRL+C or holding it for a couple seconds, for some reason. But I guess that's better than nothing 😅
not sure if related, without tests, also gets stuck:
$ go test -v -json
{"Time":"2025-11-16T22:17:20.690021283Z","Action":"start","Package":"foobar"}
{"Time":"2025-11-16T22:17:20.690090003Z","Action":"output","Package":"foobar","Output":"? \tfoobar\t[no test files]\n"}
{"Time":"2025-11-16T22:17:20.690097123Z","Action":"skip","Package":"foobar","Elapsed":0}
and
$ go test -v -json | sift
∇ sift v0.12.1
⣻ Compiling
# stuck here forever
Activity
timtatt commentedon Nov 12, 2025
Thanks for raising, I'll take a look!
GCrispino commentedon Nov 13, 2025
Hi @timtatt , sounds good!
If that's of any help, I created a PR that attempts to fix it. I did some local testing and it does seem to work, but it requires a few presses at CTRL+C or holding it for a couple seconds, for some reason. But I guess that's better than nothing 😅
Here it is: #39
timtatt commentedon Nov 13, 2025
Thanks for the PR, I'm thinking of splitting 'q' from ctrl+c.
Ctrl+c will be an immediate exit from interactive mode also where q will just go to inline mode.
Let me play around with the experience here and see how we go!
jpillora commentedon Nov 16, 2025
not sure if related, without tests, also gets stuck:
and