Commit Graph

9096 Commits

Author SHA1 Message Date
Ethan Atkins 44ef718448 Improve run command warning
When the user inputs `run` or `runMain` we shouldn't print the warning
about multiple classes because in the case of run they already will be
prompted to select the classes and in the case of runMain, they are
already required to specify the class name.

Bonus:
 * improve punctuation
 * add clear screen to selector dialogue
 * print selector dialogue in one call to println -- this should prevent
   the possibility of messages from other threads being interlaced with
   the dialogue
2020-05-01 12:35:43 -07:00
Ethan Atkins 293e83ef9f Add Delete line to terminal prompt 2020-05-01 12:35:43 -07:00
Ethan Atkins 2e3a1e767d Don't poll System.in in ConsoleChannel
The ask user thread is a background thread so it's fine for it to block
on System.in. By blocking rather than polling, the cpu utilization of
sbt drops to 0 on idle. We have to explicitly handle <ctrl+d> if we
block though because the JLine console reader will return null both if
the input stream returns -1
2020-05-01 12:35:43 -07:00
Ethan Atkins 7902ec3b7d Add Terminal abstraction
This commit aims to centralize all of the terminal interactions
throughout sbt. It also seeks to hide the jline implementation details
and only expose the apis that sbt needs for interacting with the
terminal.

In general, we should be able to assume that the terminal is in
canonical (line buffered) mode with echo enabled. To switch to raw mode
or to enable/disable echo, there are apis: Terminal.withRawSystemIn and
Terminal.withEcho that take a thunk as parameter to ensure that the
terminal is reset back to the canonical mode afterwards.
2020-05-01 12:35:43 -07:00
Ethan Atkins cd65543d10 Deprecate unused ConsoleUnpromptEvent 2020-05-01 12:28:44 -07:00
Ethan Atkins 2f4c603be6 Stop continuous input thread if System.in is closed
The watch tests take forever on windows because wrapped.read() always
returns -1 during scripted.
2020-05-01 12:28:44 -07:00
eugene yokota 8f4d3f3f8e
Merge pull request #5522 from eatkins/jdk9-dummy-virtual-file
Fix DefinesClass implementation for jdk > 8
2020-05-01 13:01:52 -04:00
Ethan Atkins 7d07bbabbf Fix DefinesClass implementation for jdk > 8
When trying to use any jdk > 8 with the latest sbt, sbt will die in some
projects because it tries to call Locate.defineClass on rt.jar, which
is represented with a DummyVirtualFile and causes a crash.
2020-04-30 20:43:04 -07:00
eugene yokota 924d8e75cf
Merge pull request #5417 from eed3si9n/wip/machine_vf
integrate with VirtualFile changes
2020-04-24 19:30:11 -04:00
Eugene Yokota 45e8dcc354 Mark nio/external-hooks as pending 2020-04-24 18:26:21 -04:00
Eugene Yokota 49d4a9aa33 Mark scala-js-macro pending
This requires workaround from Zinc
2020-04-24 17:49:17 -04:00
Eugene Yokota a65390a811 Mima 2020-04-24 17:44:15 -04:00
Eugene Yokota af746d269e Zinc 1.4.0-M3 2020-04-24 17:44:15 -04:00
Eugene Yokota 7c4b01d9f7 Comment out external hooks
Zinc now uses farm hash to invalidate the virtual paths. To use watch to detect initial changes, we need to revalidate using content hash.
2020-04-24 17:44:15 -04:00
Eugene Yokota da999f60aa Update source deps 2020-04-24 17:44:15 -04:00
Eugene Yokota 2396b449fe Contraband 0.4.6 2020-04-24 17:44:15 -04:00
Eugene Yokota d7b3a5d61b Mark Dotty as pending 2020-04-24 17:44:14 -04:00
Eugene Yokota 3ce4d22b84 integrate with VirtualFile changes
Ref https://github.com/sbt/zinc/pull/712
2020-04-24 17:44:14 -04:00
eugene yokota 04a0b10ac4
Merge pull request #5513 from bjaglin/jsonwriter
add context-bound-relaxed helpers for write-only Tracked
2020-04-24 12:05:49 -04:00
Brice Jaglin 33b09dc765 update scaladoc to reflect argument type of the overload 2020-04-24 16:54:48 +02:00
Brice Jaglin 6be10901de add context-bound-relaxed helpers for write-only Tracked 2020-04-24 16:54:48 +02:00
eugene yokota e65224c834
Merge pull request #5512 from eed3si9n/wip/cross-fix
cross building tests and fixes
2020-04-24 10:17:55 -04:00
Brice Jaglin 8429187ecb util has been merged-in the main repo
https://github.com/sbt/sbt/pull/5274
2020-04-24 12:00:12 +02:00
Eugene Yokota 0a5c2edddf Fix strict switch command so +task is fixed 2020-04-24 01:18:16 -04:00
Eugene Yokota 11a403251a Fix cross + input task 2020-04-24 01:08:21 -04:00
Eugene Yokota 063b32bbba Fix cross + scoped task 2020-04-24 01:06:18 -04:00
Eugene Yokota 588d01b2dd Fix switch command -v flag 2020-04-24 01:04:05 -04:00
Eugene Yokota 4c1c4e6710 cross build -v verbose flag
Ref https://github.com/sbt/sbt/issues/5506
2020-04-23 23:26:58 -04:00
Eugene Yokota 5ed54affff Add test for cross + scoped task 2020-04-23 23:11:42 -04:00
Eugene Yokota 2ad28974c6 Add test for cross + inputTask 2020-04-23 23:06:48 -04:00
Eugene Yokota 111fe3826e Add test for cross + task
Ref https://github.com/sbt/sbt/issues/5497
2020-04-23 23:02:53 -04:00
Eugene Yokota 7a39841ecc Add test for command crossing using ! 2020-04-23 22:42:26 -04:00
Eugene Yokota 6035bc02ef Update cross test 2020-04-23 22:15:09 -04:00
eugene yokota 56cf50ff23
Merge pull request #5488 from eed3si9n/wip/bumpjna
ipcsocket 1.0.1 that uses latest JNA
2020-03-30 13:42:38 -04:00
Eugene Yokota e95dd544fc ipcsocket 1.0.1 that uses latest JNA 2020-03-30 12:33:57 -04:00
eugene yokota ef2256d22f
Merge pull request #5487 from eed3si9n/wip/coursier
lm-coursier-shaded 2.0.0-RC6-2
2020-03-30 09:55:17 -04:00
Eugene Yokota 5dd5296bcf lm-coursier-shaded 2.0.0-RC6-2 2020-03-29 21:01:11 -04:00
eugene yokota 7770479b2d
Merge pull request #5481 from anilkumarmyla/update/semanticdb-4.3.7
Update semanticdb to work with scala 2.12.11
2020-03-22 17:14:26 -04:00
Anil Kumar Myla 41c3f433e6
Update semanticdb to work with scala 2.12.11 2020-03-20 16:12:07 -07:00
eugene yokota fb38e1933d
Merge pull request #5479 from jtjeferreira/patch-1
Fix TaskTimings scaladocs
2020-03-19 17:06:05 -04:00
João Ferreira 09b2113379
fix units 2020-03-19 15:20:22 +00:00
João Ferreira 030252b653
Fix TaskTimings scaladocs 2020-03-19 15:07:26 +00:00
eugene yokota a6c727a4ae
Merge pull request #5476 from eed3si9n/wip/scala-2.12.11
Update scala to 2.12.11
2020-03-18 22:36:56 -04:00
Eugene Yokota d2def1ac74 Use Array to talk to proper build 2020-03-18 16:28:51 -04:00
eugene yokota ea4c008249
Merge pull request #5469 from nigredo-tori/patch-1
Fix a message about an undefined setting
2020-03-18 11:51:47 -04:00
Anil Kumar Myla 5840532687
Paradise is available for 2.12.11 2020-03-18 01:13:57 -07:00
Anil Kumar Myla 887eb17f9e
Update scala to 2.12.11 2020-03-18 00:49:14 -07:00
nigredo-tori 11b7173ec7
Fix a message about an undefined setting
`defining` seems to be the setting or a task that references `referencedKey`, not the other way around.
2020-03-13 12:53:44 +07:00
eugene yokota 6c13017075
Merge pull request #5463 from dwijnand/scripted-support-prereleases
Make ScriptedLauncher support Scala pre-releases
2020-03-12 12:59:54 -04:00
Dale Wijnand b58c99efee Make ScriptedLauncher support Scala pre-releases
Also add a dash of sanity checks here and there.
2020-03-12 15:32:02 +00:00