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

SBT 0.13.7 does not react on Ctrl-C or Ctrl-D hotkeys #1855

Closed
tttomat19 opened this issue Feb 11, 2015 · 14 comments
Closed

SBT 0.13.7 does not react on Ctrl-C or Ctrl-D hotkeys #1855

tttomat19 opened this issue Feb 11, 2015 · 14 comments
Assignees
Labels
Milestone

Comments

@tttomat19
Copy link

Steps to reproduce:

Win 8.1 ruRU, chcp 1251 (866, 60001 and 1252 don't work either)
build.sbt https://gist.github.com/flirtomania/e1273618ab706a39eaba
Main class: https://gist.github.com/flirtomania/aee23feca65126db6c61

  1. run sbt in project directory (now it does not react on ctrl-c, still terminates on ctrl-d)
  2. call "run" task, (application runs ok)

Problems:

sbt run task does not react on ctrl-c or ctrl-d hotkeys

Expectations:

pressing ctrl-c / ctrl-d should cause run task to stop or quit sbt

@eed3si9n
Copy link
Member

Hi, could you see #1442 and see if

cancelable in Global := true

fixes it? Also is this an Akka specific issue?

@eed3si9n eed3si9n added the needs info Needs more information to take further actions. label Feb 11, 2015
@tttomat19
Copy link
Author

tttomat19 commented Feb 16, 2015

Hi, cancelable in Global := true didn't work.
The issue reproduces also on Windows 7 running with sbt -Dinput.encoding=Cp1252 and without input encoding also (this is related to up arrow behaviour on russian versions of windows).
This is how I tried without Akka: https://gist.github.com/flirtomania/a2c291551c5b53c7e1f4
It still did not react on Ctrl-C or Ctrl-D
Both Windows 8.1 and Windows 7 have Russian language. (Cp866)

@torgeirsh
Copy link

Ctrl-C doesn't work for me either, with or without "cancleable" set. Ctrl-D does work however (Windows 8.1).

@mkotsbak
Copy link

Same problem running a Spring Boot application in Windows with "sbt run". "cancelable in Global := true" does not help. Using sbt 0.13.8.

@mkotsbak
Copy link

I noticed now that it is not stoppable when running "run" from within the sbt console, but when running "sbt run" directly from the windows terminal/cygwin, ctrl-c works fine.

@Araeos
Copy link

Araeos commented Dec 17, 2015

I also experience this issue on windows 10 with sbt 0.13.9 and it hinders the workflow when a task, such as run, cannot be interrupted without killing the whole cmd/powershell session.
Additionally, when forked is set to true, the forked task will run even after sbt has been killed.

@aholland
Copy link

Still a problem on Windows 10 with sbt ~run running sbt 0.13.11

@nartamonov
Copy link

Same story with Windows 7 and SBT 0.13.8. Since I started working with sbt in 2012 I can't remember that Ctrl+C works as expected. It's one of many small things that makes work with SBT harassing 😩

@folex
Copy link

folex commented Aug 3, 2016

Same thing with sbt 0.13.8 -- Ctrl-C doesn't work either

@frozenspider
Copy link

Pretty annoying, any updates on this?

@Araeos
Copy link

Araeos commented Feb 24, 2017

This seems to be a bug with jline, because using version 2.14.3 fixes this issue for me. The relevant issue jline/jline2#127 mentions as much.
Since the currently stable release does not use jline version 2.14.3 (or above) I just replaced the jline.jar in my .sbt folder (C:\Users\<USER>\.sbt\boot\scala-2.10.6\lib\jline.jar) with a newer version from the maven repository. This is just a dirty hack and since the original file was likely jline version 2.13 this might cause severe bugs due to incompatibilies.
Also, the jline version seems to be a dependency of scala-2.10.6 and might not be easily updated with just an sbt release.
I hope this clears things up as to why ctrl+c is ignored completely by sbt on windows.

@dwijnand
Copy link
Member

dwijnand commented Mar 6, 2017

TL;DR: We should update JLine. At least 2.14.3. The Scala Team has already.

Thanks @Araeos for the detail and cross-linking.

@eed3si9n eed3si9n added Bug and removed needs info Needs more information to take further actions. labels Mar 9, 2017
@eed3si9n
Copy link
Member

eed3si9n commented Mar 9, 2017

This issue will now be expedited via the Lightbend subscription.

@eed3si9n eed3si9n added this to the 0.13.14 milestone Mar 9, 2017
eed3si9n added a commit to eed3si9n/sbt that referenced this issue Mar 9, 2017
eed3si9n added a commit to eed3si9n/sbt that referenced this issue Mar 9, 2017
@eed3si9n eed3si9n mentioned this issue Mar 9, 2017
@eed3si9n eed3si9n self-assigned this Mar 9, 2017
eed3si9n added a commit to eed3si9n/util that referenced this issue Apr 4, 2017
@ChuckkNorris
Copy link

The latest advertised release linked on the Download Scala states it's for Scala v2.12.3, but it downloads the the SBT v1.0.2 which still installs Scala v2.10.6 (with the bad jline.jar).

Specifically, this is occurring for the Windows MSI installer. Any idea when the link will be updated so new people don't have to deal with this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests