Commit Graph

10070 Commits

Author SHA1 Message Date
Ethan Atkins 1b1690bec1 Make proxyErrorStream an object
This is useful for debugging
2020-09-21 13:42:03 -07:00
Eugene Yokota 894d005f12 Merge branch 'wip/prep' of sbt-dependency-graph into wip/dependencygraph 2020-09-21 15:14:18 -04:00
Eugene Yokota 167a10bbad Move to sbt-dependency-graph/. 2020-09-21 15:01:07 -04:00
eugene yokota 6e181ac843
Merge pull request #5879 from eatkins/windows-access-denied
Abort thin client on access denied exception
2020-09-21 14:29:07 -04:00
eugene yokota eaf74e462c
Merge pull request #5878 from adpi2/bsp-test
[BSP] Add support for `buildTarget/test`
2020-09-21 14:23:11 -04:00
eugene yokota 8f1bbcc0c6
Merge pull request #5865 from adpi2/bsp-run
[BSP] Add buildTarget/scalaMainClasses and buildTarget/run endpoints
2020-09-21 14:22:02 -04:00
Ethan Atkins 6247362725 Abort thin client on access denied exception
There are situations in windows where it is possible that a client
attempts to connect to a portfile that it did not have access to. This
can happen if, for example, the server is started in administrator mode
but the client is started as a regular user. When this happens, the
client would try to remove the portfile and start a new server. This new
server would not actually be able to start a server though becuase it
would not be able to open the named point because the other server had
it open. As a result, the client would just hang. The fix is to just
abort the thin client if it gets an access denied exception.
2020-09-21 10:58:57 -07:00
eugene yokota 56cca22baf
Merge pull request #5877 from eatkins/shutdown-interrupt
Catch interrupted exception in shell
2020-09-21 12:21:05 -04:00
Adrien Piquerez f5753f763c Add BSP buildTarget/test endpoint 2020-09-21 12:17:20 +02:00
Adrien Piquerez 50cf74cc67 Add BSP `buildTarget/scalaTestClasses` endpoint 2020-09-21 12:17:20 +02:00
Adrien Piquerez cfaede2bf6 Increase buildTarget/scalaMainClasses test timeout 2020-09-21 09:18:07 +02:00
Ethan Atkins ca251eb7c8 Catch interrupted exception in shell
I noticed in CI that sometimes the client tests exit with an interrupted
exception printed. I tracked it down the exception to the call to
getExec, which delegateds to CommandExchange.blockUntilNextExec.
2020-09-20 21:34:27 -07:00
Eugene Yokota b631dffed6 Support whitespace after --sbt-script
`=` gets treated as a whitespace in batch, so it would be good to support whitespace.
2020-09-20 22:07:08 -04:00
eugene yokota 350f5497c6
Merge pull request #5875 from eatkins/watch-bad-input
Don't stop watch input thread on bad input
2020-09-20 22:00:52 -04:00
Eugene Yokota 6ebbbe5e0a sbt.cmd -> sbt.bat 2020-09-20 21:31:55 -04:00
eugene yokota 923ae57c1c
Merge pull request #5873 from eatkins/supershell-batch-fix
Don't display progress in skip tasks in batch mode
2020-09-20 19:52:34 -04:00
Ethan Atkins 1e448bb403 Don't stop watch input thread on bad input
In a continuous build in sbt 1.4.0-RC1, if the user enters an invalid
option, it causes the input thread to exit which means the watch would
no longer accept input commands (including <enter> to exit). This fixes
that behavior.
2020-09-20 16:31:27 -07:00
Ethan Atkins 41afe9fbdb Don't display progress in skip tasks in batch mode
In sbt 1.4.0-RC1, if a user ran `sbt console`, the progress lines would
be printed after they had entered the console. This was because the
prompt state was incorrect. To get the prompt in the correct state, we
initialize the prompt to batch and then switch to pending when either
sbt enters the shell or the network client attaches in interactive mode.
We also will now immediately print progress as soon as we enter a skip
task to clear out the progress lines and display the warning about a
running task if there is another client connected while the task is
running.
2020-09-20 15:36:42 -07:00
eugene yokota cc0445db4e
Merge pull request #5871 from eed3si9n/wip/build_improvements
Some new modules need to be cross published
2020-09-20 17:15:47 -04:00
Eugene Yokota 0ba3a03495 Some new modules need to be cross published 2020-09-20 15:02:09 -04:00
eugene yokota 870be12f41
Merge pull request #5862 from eatkins/success
Set isSuccessEnabled on SimpleTerminal
2020-09-19 01:13:09 -04:00
eugene yokota 908371ff5c
Merge pull request #5857 from adpi2/issue/full-paths
Report absolute paths by default during compilation
2020-09-19 01:12:26 -04:00
Adrien Piquerez 8b8745cb0b Fix completion 2020-09-17 14:23:28 +02:00
Adrien Piquerez 759392aaf0 Add BSP `buildTarget/run` test 2020-09-17 14:23:07 +02:00
Adrien Piquerez 9f04358fce Add BSP buildTarget/run endpoint 2020-09-17 13:40:50 +02:00
Adrien Piquerez 92fb69f370 Add BSP buildTarget/scalaMainClasses endpoint 2020-09-17 13:32:30 +02:00
Ethan Atkins c9e98c4cd5 Set isSuccessEnabled on SimpleTerminal
The SimpleTerminal is used when sbt is run with -Dsbt.log.noformat=true.
There is no reason to disable success messages by default.

Fixes https://github.com/sbt/sbt/issues/5861
2020-09-16 09:52:57 -07:00
Adrien Piquerez 3c24e9d29d Report absolute paths by default 2020-09-16 11:12:12 +02:00
eugene yokota 3bee2cff9a
Merge pull request #5854 from eatkins/jline-reader
Use DumbTerminal if sbt.log.noformat=true
2020-09-15 16:45:04 -04:00
eugene yokota 3923d52c18
Merge pull request #5855 from eatkins/symlinks
Skip contents of symlinked directories in clean
2020-09-15 16:08:18 -04:00
Ethan Atkins a946cbf702 Skip contents of symlinked directories in clean
The clean task was previously deleting the contents of directories that
were symlinked into the target directory. This was an oversight because
it never occurred to me that users might symlink a directory whose
contents they did not want deleted into the target directory.
2020-09-15 09:24:04 -07:00
Ethan Atkins 334146f541 Use DumbTerminal if sbt.log.noformat=true
When sbt is run with the sbt.log.noformat system property set to true,
no virtual io is used which causes the jline 3 terminal that we creaate
to not work at all. For reasons that I don't understand, it is also
necessary to set the jline.terminal system property to none to make the
dumb terminal work.
2020-09-15 09:10:21 -07:00
eugene yokota 70111bb689
Merge pull request #5851 from eed3si9n/wip/bumpcoursier
lm-coursier-shaded 2.0.0-RC6-9
2020-09-14 23:58:36 -04:00
Eugene Yokota 72acc5ce74 lm-coursier-shaded 2.0.0-RC6-9
https://github.com/coursier/sbt-coursier/releases/tag/v2.0.0-RC6-9
2020-09-14 22:44:16 -04:00
eugene yokota 66308bae45
Merge pull request #5847 from eed3si9n/wip/promise_propagate
Cancel all promises if one fails
2020-09-14 22:33:18 -04:00
eugene yokota f033aa5ca1
Merge pull request #5844 from eed3si9n/wip/pipelining_adjustments
Fix mixed pipelining
2020-09-14 22:32:48 -04:00
eugene yokota 75da49556c
Merge pull request #5838 from adpi2/bsp-reload
Add BSP workspace/reload
2020-09-14 08:08:14 -04:00
Adrien Piquerez ac85117841 Add BSP workspace/reload 2020-09-14 13:10:11 +02:00
Eugene Yokota 55d2b0a3c6 Cancel all promises if one fails
Fixes https://github.com/sbt/sbt/issues/5822

Currently the entire shell gets stuck when there's a compilation error with pipelining.
This at least returns to sbt shell.
2020-09-14 01:04:10 -04:00
Ethan Atkins 10e2f2821e
Merge pull request #5846 from eatkins/json-read
Expand json rpc request input buffer if needed
2020-09-13 21:09:27 -07:00
Ethan Atkins 5ef777a806
Merge branch 'develop' into json-read 2020-09-13 20:32:38 -07:00
Ethan Atkins 7b31495ae3 Expand json rpc request input buffer if needed
When a json rpc request is specified without any headers, the size of
the message may exceed the buffer that was created for reading hdeaders.
This would cause an exception to be thrown when creating a string from
the header buffer because the number of bytes requested would exceed the
capacity of the buffer. To fix this, we can expand the buffer
dynamically if needed. For the common case when the headers are
specified, this should be a no-op.
2020-09-13 19:43:06 -07:00
eugene yokota 6ebba09020
Merge pull request #5845 from eed3si9n/wip/sig_files_written
Demote [sig files written]
2020-09-13 19:39:05 -04:00
Eugene Yokota 350a6af6ef Demote [sig files written]
It gets ridiculous seeing the screen fill up with [sig files written] after a while.
Here's a quick hack to demote that stuff.
2020-09-13 17:54:36 -04:00
Eugene Yokota 2a8c184a51 Fix mixed pipelining
Together with https://github.com/sbt/zinc/pull/920 this fixes most of the mixed pipelining issues.

1. Previous values are carried from `compileScalaBackend` in `compileJavaTask`.
2. `compileJava / compileOptions ` now uses `compile / compileOptions` to avoid unintentional change of javac or scalac options.
3. Hooks up early compile analysis store.
2020-09-13 16:25:09 -04:00
eugene yokota 8053ebea73
Merge pull request #5823 from eed3si9n/wip/server_cmd
Add pseudo --server command
2020-09-12 15:46:22 -04:00
Eugene Yokota d24cd2b3f7 Rename --close-io-streams to --detach-stdio 2020-09-12 14:19:37 -04:00
Eugene Yokota bba3d08aac Add pseudo --server command
Ref https://github.com/sbt/sbt/issues/5665

This adds `--server` command that is immediately filtered out in Main.scala.
The purpose of `--server` is so we can invoke thin client from `sbt` script at some point in the future when Bash script can parse `project/build.properties`.

`sbtn` would need to call `sbt` again to start the server, and at that point the shell script would need to actually invoke the server. The intent of `--server` is to be used as the tie breaker.

Also build users may want to sometimes call `sbt --server`.
2020-09-12 14:12:02 -04:00
eugene yokota 8160035f41
Merge pull request #5840 from eatkins/play-progress
Skip task progress work if already shutdown
2020-09-12 08:27:42 -04:00
eugene yokota a7f00ecd7a
Merge pull request #5839 from eatkins/play-shell-prompt
Honor shellPrompt override
2020-09-12 08:24:41 -04:00