Skip to content

[Bug] Infinite loop when just running sift with no input #37

Closed

Description

@GCrispino

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.

Activity

  1. timtatt commented on Nov 12, 2025

    @timtatt
    Owner

    Thanks for raising, I'll take a look!

  2. GCrispino commented on Nov 13, 2025

    @GCrispino
    Author

    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

  3. timtatt commented on Nov 13, 2025

    @timtatt
    Owner

    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!

  4. jpillora commented on Nov 16, 2025

    @jpillora

    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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions