Commit Graph

9995 Commits

Author SHA1 Message Date
Eugene Yokota 4eb096de9c Unidoc 2020-10-04 22:49:08 -04:00
Ethan Atkins 40d4e6186e
Merge pull request #5923 from eed3si9n/wip/bump
Zinc 1.4.0, LM 1.4.0
2020-10-04 11:38:43 -07:00
Eugene Yokota 8ac96af3fb Zinc 1.4.0, LM 1.4.0 2020-10-04 13:47:49 -04:00
eugene yokota 49f3deae7d
Merge pull request #5922 from eed3si9n/wip/bumpio
IO 1.4.0
2020-10-04 01:41:41 -04:00
Eugene Yokota a9bda61ee5 Use Ivy for metabuild 2020-10-04 00:36:55 -04:00
Eugene Yokota 081f437afc Banner URL
Fixes https://github.com/sbt/sbt/issues/5921
2020-10-04 00:10:30 -04:00
Eugene Yokota c4517bfd5e versionScheme 2020-10-04 00:09:15 -04:00
Eugene Yokota b54f1fba0b IO 1.4.0 2020-10-04 00:06:54 -04:00
eugene yokota 6b5f2ab3f4
Merge pull request #5919 from eed3si9n/wip/epoch
Epoch directory src/main/{scala-2, scala-3}
2020-10-03 23:54:01 -04:00
Eugene Yokota c11259ee2f Epoch directory src/main/{scala-2, scala-3}
Fixes https://github.com/sbt/sbt/issues/5895
2020-10-03 22:52:06 -04:00
eugene yokota 89ad0db0a9
Merge pull request #5917 from eed3si9n/wip/bumpcoursier
lm-coursier-shaded 2.0.0
2020-10-03 10:35:17 -04:00
Eugene Yokota 6662b2cf99 lm-coursier-shaded 2.0.0
Uses Coursier 2.0.0
2020-10-02 23:07:27 -04:00
eugene yokota aa91a1b304
Merge pull request #5914 from eed3si9n/wip/dependencygraph_fix
Rename some sbt-dependency-graph keys
2020-10-02 08:37:03 -04:00
Eugene Yokota 51466e7b84 Rename some sbt-dependency-graph keys
Fixes https://github.com/sbt/sbt/issues/5894
2020-10-01 09:28:44 -04:00
eugene yokota b8673194cb
Merge pull request #5909 from eatkins/lazy-console-reader
Make ConsoleReader creation lazy
2020-10-01 05:34:51 -04:00
eugene yokota 34d1e62f27
Merge pull request #5908 from eatkins/scala-2.12-thin-client-console
Fix echo setting for scala 2.12 thin client console
2020-10-01 05:33:56 -04:00
eugene yokota e30b83f5a0
Merge pull request #5910 from eatkins/bg-service-hangs
Don't block sbt exit forever on bg service shutdown
2020-09-29 16:19:04 -04:00
Ethan Atkins 16bef0cfc8 Don't block sbt exit forever on bg service shutdown
Some of the sbt scripted tests somewhat frequently hang in CI. I added a
patch that printed a stack trace of the sbt process every 30 seconds. I
discovered that the main thread was stuck in DefaultBackgroundJobService
shutdown. To avoid the hangs, I updated the awaitTermination methods to
take a timeout parameter and we timeout shutdown if 10 seconds have
elapsed.
2020-09-29 11:48:51 -07:00
Ethan Atkins 2ccc0714e8 Make ConsoleReader creation lazy
I noticed while debugging a jline 2 issue that the SimpleReader was
creating a ConsoleReader on startup even if it was never used.
2020-09-29 10:22:28 -07:00
Ethan Atkins 7eaa46800a Fix echo setting for scala 2.12 thin client console
I noticed that when using the scala 2.12 console with the thin client
that there was weird behavior for the first few seconds of the session.
When prompted with 'scala> ' I would type a letter, say v, and the
output would be 'scala>v' instead of 'scala> v'. It turned out that this
was because the NetworkChannel was returning a stale value for
isEchoEnabled. This happened because NetworkChannel has a method
getProperties that is rate limited under the assumption that the
properties rarely change. This made sense for things like
isAnsiSupported or isSuperShellEnabled but not isEchoEnabled. It is
straightforward to fix this by actually getting the terminal attributes
and checking if the echo flag is set.
2020-09-29 10:21:44 -07:00
Ethan Atkins 57af6ba9b7
Merge pull request #5906 from eatkins/windows-capability-typo
Fix typo in windows end key capability
2020-09-28 17:51:53 -07:00
Ethan Atkins 6532b58482 Fix typo in windows end key capability
The normal ansi escape sequence for the end key is \u001B[4~ not
\u001B[4!. This didn't seem to matter in terms of whether or not the
end key worked but it still is worth changing for consistency. Pointed
out in an issue comment in jline 3
(https://github.com/jline/jline3/issues/578#issuecomment-699834705).
2020-09-28 08:46:06 -07:00
Ethan Atkins 1b2404b287
Merge pull request #5905 from eatkins/ci-hangs
Fix many instances of server test hangs
2020-09-28 08:02:24 -07:00
Ethan Atkins 3966d2fcb2 Catch interrupted exceptions in blockUntilNextExec
It is possible for an InterruptedException to be thrown here because of
logic in NetworkClient. This seemed to be the root cause of the fix I
tried in ca251eb7c8 so I'm reverting that
commit.

Revert "Catch interrupted exception in shell"

This reverts commit ca251eb7c8.
2020-09-28 07:28:24 -07:00
Ethan Atkins 5fee13ad5a Restore string cancellation test
The cancel on-going task with string id test was failing in CI because
of a race condition involving server log messages. We need to wait for a
notification that the project has been compiled before we wait for the
"Waiting for" message, otherwise we might pick up the "Waiting for"
message from the previous test case and try to cancel the task before it
has been created.
2020-09-28 07:28:24 -07:00
Ethan Atkins 90f6d77d59 Send exit in network client before shutdown
In the client test, the sbt server would keep open the the client
connection even after it had exited because the client was only shutting
down its side of the connection. Since in the test it wasn't exiting the
jvm, the read side of the connection was still open.
2020-09-28 07:28:24 -07:00
Ethan Atkins 7d4019614a Bypass some Terminal operations if no System.in
If there is no console attached, it doesn't make sense to enter or exit
raw mode. We also don't want to poll from System.in in CI in
SimpleTerminal because threads can get blocked trying to read from
System.in with no possibility of exiting.
2020-09-28 07:28:24 -07:00
Ethan Atkins 2f5d542965 Don't fork server tests
I was seeing some failures in travis ci where the build crashed because
it wasn't able to open a socket. This failure was happening in the
scalatest fork runner so I decided to avoid forking entirely. An
alternative approach would possibly be just to remove the scalatest
framework from the server test project but not forking is nicer anyway.
2020-09-28 07:28:24 -07:00
Ethan Atkins 2f66304a48 Remove SNAPSHOTS from sbt boot directory
If the sbt snapshot builds are cached, then we don't actually dogfood
sbt when we publish a local sbt version because sbt will load with the
version from the last build
2020-09-28 07:28:24 -07:00
Ethan Atkins 8a23f1e440 Add ability to timeout ClientTest cases
It is possible for the test cases in ClientTest to block indefinitely.
To avoid that, we can instead run them on a background thread and cancel
the thread if that happens.
2020-09-28 07:03:28 -07:00
Ethan Atkins e3731994de Timeout completion requests 2020-09-28 07:03:28 -07:00
Ethan Atkins 42393459a0 Log full exception 2020-09-28 07:03:28 -07:00
Ethan Atkins c2c2a26203 Don't throw on closed completion service
In 64c0f0acdd, I attempted to safely close
all of the completion services when the user inputs ctrl+c. I have
noticed though that sometimes sbt crashes in CI with the
RejectedExecutionException thrown by submit. To avoid throwing when
there was no cancellation, I slightly modified the shutdown logic to not
shutdown the completion service whil still shutting down the underlying
thread pool.
2020-09-28 07:03:27 -07:00
eugene yokota d96ecb2c21
Merge pull request #5904 from eatkins/sbt-terminal
Add `terminal` task
2020-09-27 20:45:30 -04:00
eugene yokota 691dc0a90d
Merge pull request #5903 from eatkins/virtual-terminal-fix
Fix getter and setter for virtual terminal attributes
2020-09-27 20:42:18 -04:00
Ethan Atkins b85209be78 Add sbt.Terminal trait
It can be useful for plugin and build authors to have access to some of
the virtual terminal properties. For instance, when writing a task that
needs a password, the author may wish to put the terminal in raw mode
with echo disabled. This commit introduces a new Terminal trait at the
sbt level and a corresponding task, terminal, that provides a basic
terminal api. The Terminal returned by the terminal task will correspond
to the terminal that initiated the task so that it should work with sbtn
as well as in console mode.
2020-09-27 13:33:47 -07:00
Ethan Atkins 411c1365ef Fix getter and setter for virtual terminal attributes
Neither NetworkTerminal.getAttributes nor NetworkTerminal.setAttributes
worked correctly because they were sending the wrong json method name.
This wasn't noticeable because neither of these methods had previously
been used by sbt.
2020-09-27 12:17:34 -07:00
eugene yokota 4ffddfe5ea
Merge pull request #5898 from eatkins/clear-prompt-fix
Clear prompt only if there are no bytes pending
2020-09-26 15:47:53 -04:00
eugene yokota 073b3047af
Merge pull request #5901 from eatkins/interaction-service-fix
Fix interaction service for thin client
2020-09-26 15:47:23 -04:00
Ethan Atkins 6103444d5d Fix interaction service for thin client
The global SimpleReader hardwires Terminal.console so it won't work with
the ThinClient.
2020-09-26 11:51:42 -07:00
eugene yokota 71677cedca
Merge pull request #5889 from eatkins/supershell-perf-regression-fix
Fix minor supershell performance regression
2020-09-25 14:13:12 -04:00
Ethan Atkins 9e0cd4cde6 Clear prompt only if there are no bytes pending
When sbt is running a background process that logs to stdout, the output
can be inadvertently deleted before it has been printed. When the user
is in the prompt state and a log message comes in, we want to delete the
prompt before we print the log. The problem is println is often
implemented with a write of the content followed by a second write of
the system line separator. When that happened, we would print the
content and then immediately delete it when the newline came in. The fix
is to not clear the prompt if there are any bytes that have been written
without a newline, which was tracked by the currentLineBytes variable.
2020-09-25 10:38:33 -07:00
eugene yokota a79ef52f74
Merge pull request #5896 from eatkins/bump-sbt-version
Bump sbt version to 1.4.0-RC2
2020-09-24 15:28:39 -04:00
Ethan Atkins 987853329a Bump sbt version to 1.4.0-RC2 2020-09-24 11:42:52 -07:00
eugene yokota c00196abf0
Merge pull request #5888 from adpi2/bsp-shutdown
reply to BSP shutdown request
2020-09-24 12:06:03 -04:00
eugene yokota 6cf1c92c5d
Merge pull request #5887 from adpi2/semanticdb
Fix Test / semanticdbOptions
2020-09-24 12:05:43 -04:00
Ethan Atkins d930cb1987 Don't do progress work on the main thread
I noticed that no-op compile was slower in
https://github.com/sbt/sbt/issues/5508 using 1.4.0-RC2 than 1.4.0-RC1.
It took around 400ms with 1.4.0-RC2 and 200-250ms on RC1. Git bisect
brought me to 41afe9fbdb which I
remembered I'd been slightly concerned about from a performance
perspective but didn't get around to testing. The problem is that we
were blocking the task from running while determing whether or not we
should force a progress report. We can do that work on the background
thread instead so the task can begin running immediately.
2020-09-24 09:02:05 -07:00
Ethan Atkins 4ec6339794 Fix logical bug in task report scheduling
The conditional for whether to make task progress events repeatable was
inverted. This wasn't actually noticeable because the function
doReport() was being schedule which had a guard to prevent it from
running more frequently than the report period.
2020-09-24 09:02:05 -07:00
Adrien Piquerez 591c2b13cd reply to BSP shutdown request 2020-09-23 18:06:56 +02:00
Adrien Piquerez 621e60ba13 Fix Test / semanticdbOptions 2020-09-23 17:38:07 +02:00