Commit Graph

10228 Commits

Author SHA1 Message Date
Ethan Atkins 184c59d4c0 Restore .sbtopts file
I noticed that the sbt project has gotten much slower to compile on my
computer and that bumping the memory helped a lot. With 1GB, it seems to
take about 60-70 seconds for a clean compile and with 2GB it takes
between 35-40 seconds.

Note that this will break sbt loading on windows using the batch script.
This should be fixed in sbt 1.4.4:
https://github.com/sbt/sbt-launcher-package/pull/344.
2020-11-19 12:42:26 -08:00
eugene yokota 87d0972b03
Merge pull request #6121 from xuwei-k/dotty-update
Update dotty and scala versions in tests
2020-11-19 14:53:48 -05:00
eugene yokota 711a590bc4
Merge pull request #6125 from eatkins/sort-scripted-tests
Sort scripted tests
2020-11-19 14:52:53 -05:00
Ethan Atkins f6e7e3a867 Revert "Mark project/src-scala-binary-version as pending"
This reverts commit 3d02f8902e.
2020-11-19 11:15:13 -08:00
Ethan Atkins 3ff0c296b9 Sort scripted tests
We're seeing errors in github actions that may be related to scripted
test ordering.
2020-11-19 10:57:42 -08:00
xuwei-k 6344de924a Update dotty and scala versions in tests
add "-Ytasty-reader" option

3743cad6ce
2020-11-20 01:06:01 +09:00
eugene yokota f4921e3dd7
Merge pull request #6105 from eatkins/jline3-upgrade
JLine 3.17.1
2020-11-18 22:31:02 -05:00
eugene yokota e96ae5779b
Merge pull request #6118 from eed3si9n/wip/1.5.0-SNAPSHOT
1.5.0-SNAPSHOT
2020-11-18 22:26:28 -05:00
Eugene Yokota dfbce5586e 1.5.0-SNAPSHOT 2020-11-18 18:47:33 -05:00
eugene yokota 9985cb4b1c
Merge pull request #6115 from eatkins/thin-client-startup
Fix thin client sbt process startup output
2020-11-18 18:26:28 -05:00
eugene yokota 9abcbfa31b
Merge pull request #6113 from eatkins/thin-client-shutdown
Fix shutdown for thin client shell
2020-11-18 18:25:36 -05:00
eugene yokota 1d0e6928fe
Merge pull request #6116 from eatkins/supershell-interlace-v2
Fix supershell blowing away lines on windows
2020-11-18 18:18:25 -05:00
Ethan Atkins f3120f8f15 Fix supershell blowing away lines on windows
In 85d17889b6, I attempted to fix
supershell messages getting interlaced with log lines. It turned out
that that approach didn't work with windows and was causing all of the
output to bet blown away. A better approach is to check if the bytes
we're writing contain one or more line separators. If so, we can wrap
the bytes in a string and split the string into lines. Then we can
append a ClearScreenAfterCursor before every newline.

I think the problem with windows was that the ClearScreenAfterCursor was
coming between the carraige return and the newline.
2020-11-18 13:42:52 -08:00
Ethan Atkins 8137c80782 Fix thin client sbt process startup output
The boot server socket was not working correctly when the sbt server was
started by the thin client. This was because it is necessary for us to
create a ConsoleTerminal in order for System.out and System.err to be
properly forwarded to the clients connected over the boot server socket.
As a result, if you started a server instance of sbt with the thin
client, you wouldn't see any output util you connected to the server.
The fix is to just make sure that we create a console terminal if sbt is
run as a subprocess.
2020-11-18 12:38:44 -08:00
Ethan Atkins 39af464dfd Fix shutdown for thin client shell
When a user enters shutdown in the thin client console, it only exits
the thin client, it does not actually shutdown sbt. Running `sbtn
shutdown` did work to shutdown the server, however. It turned out that
this was because there was special handling for shutdown when processed
through jline. We would enqueue the shutdown command and also close the
client connection. Closing the client connection though removed all of
the enqueued commands for the client, which included the shutdown
command. To fix this, we just make sure that we don't remove the
shutdown command when clearing the client commands.
2020-11-18 12:20:48 -08:00
Ethan Atkins c34678e9db Upgrade jline 3
We no longer need to use the forked version of jline because they have
merged in our required changes. The latest version of jline does upgrade
jansi, however, and some of the apis we were relying on for windows were
removed so they had to be manually implemented. I verified that console
input still worked on my windows vm after this change.
2020-11-18 12:18:08 -08:00
Ethan Atkins 927151485d Exclude jansi classes from metabuild top loader
The launcher embeds a fixed version of jansi above the rest of the
classpath on windows. This causes problems for the scala 2.12 console
because it tries to load methods that don't exist from the old jansi
jar. This can be fixed by excluding all jansi classes from the top
loader.

We also need to exclude jansi classes in the scala instance top class
loader to make the 2.10 console work because scala 2.10 uses a shaded
jline that requires a very old jansi version. Due to the shading, the
thin client doesn't work with the 2.10 console.
2020-11-18 12:18:08 -08:00
eugene yokota 1ea0fb7d23
Merge pull request #6112 from eatkins/supershell-interlace
Fix supershell line interlacing with logs
2020-11-18 15:15:19 -05:00
eugene yokota 94dc172ab6
Merge pull request #6111 from sbt/dependabot/github_actions/actions/cache-v2.1.3
Bump actions/cache from v1 to v2.1.3
2020-11-18 15:14:41 -05:00
Ethan Atkins 85d17889b6 Fix supershell line interlacing with logs
In 3b09ff6af7, we stopped adding a clear
screen after curser after each log line. This inadvertently caused
supershell lines to get interlaced with log lines. This can be fixed by
writing a ClearScreenAfterCursor after every newline character that we
write to stdout.

As a bonus, I had also long noticed that supershell log lines would get
interlaced with the serverTestProj/test output and this change fixes
that as well.
2020-11-18 11:19:59 -08:00
dependabot[bot] 917e662e3b
Bump actions/cache from v1 to v2.1.3
Bumps [actions/cache](https://github.com/actions/cache) from v1 to v2.1.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v1...0781355a23dac32fd3bac414512f4b903437991a)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-18 17:47:47 +00:00
xuwei-k 22885e4cba add dependabot setting for GitHub Actions update
https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot
2020-11-19 02:47:23 +09:00
eugene yokota 684b7833dc
Merge pull request #6108 from eatkins/tcp-thin-client
Don't print socket exception on exit
2020-11-18 10:31:13 -05:00
eugene yokota e5ea54d7f5
Merge pull request #6107 from eatkins/watch-poll
Fix watch for dumb terminals
2020-11-18 10:22:44 -05:00
eugene yokota d7de3ac2f4
Merge pull request #6106 from eatkins/jline3-utf8
Decode utf-8 bytes in jline 3 reader
2020-11-18 10:20:17 -05:00
Ethan Atkins d52d413867 Fix watch for dumb terminals
On terminals with virtual io disabled, we'd spin up a thread for each
watch iteration that performed a blocking read from the terminal input
stream. This thread could not be joined which would cause the triggered
execution to be delayed by 1 second while sbt blocked trying to join
that thread. It also meant that input probably didn't work correctly
since the user would end up with many threads polling from system in.
The fix to this problem is to poll the terminal input stream if it is
unsafe to do a blocking read, which is the case for dumb terminals or if
virtual io is disabled.
2020-11-17 16:47:53 -08:00
Ethan Atkins 29ce18edec Don't print socket exception on exit
When exiting the thin client when using tcp rather than a domain socket,
an error message is printed about a socket exception.
2020-11-17 16:46:28 -08:00
Ethan Atkins e00240a73b Decode utf-8 bytes in jline 3 reader
With sbt 1.4.x, non-ascii utf-8 characters are not handled correctly in
the console. It was not clear from the jline 3 documentation but the
NonBlockingReader.read method is supposed to return unicode points
rather than utf8 bytes. To fix this, we can decode the input and return
the code point rather than the directy byte from the input stream.
2020-11-17 16:45:16 -08:00
eugene yokota c52e9916e2
Merge pull request #6099 from xirc/system-property-for-on-changed-build-source
Support a system property for onChangedBuildSource
2020-11-17 08:53:38 -05:00
Taichi Yamakawa c0b6b97990 Move sys props related things to SysProp 2020-11-17 21:11:33 +09:00
Taichi Yamakawa 0557171930
Merge branch 'develop' into system-property-for-on-changed-build-source 2020-11-17 01:42:41 +09:00
Taichi Yamakawa 5bdba54a3c Support a system property for onChangedBuildSource
Resolve the issue https://github.com/sbt/sbt/issues/5679
2020-11-17 00:58:25 +09:00
eugene yokota 871eb5b4dd
Merge pull request #6097 from adpi2/bsp-server
Detach stdio in BSP server
2020-11-16 10:55:16 -05:00
eugene yokota 99c6408e37
Merge pull request #6091 from xuwei-k/scriptedBatchExecution-0-13
set "scriptedBatchExecution := false" if sbt 0.13
2020-11-16 10:52:34 -05:00
Adrien Piquerez c71c9c9227 Detach stdio in BSP server 2020-11-16 15:01:42 +01:00
kenji yoshida eba3596e5d
Update main/src/main/scala/sbt/ScriptedPlugin.scala
Co-authored-by: eugene yokota <eed3si9n@gmail.com>
2020-11-16 15:39:57 +09:00
xuwei-k fd967d1215 set "scriptedBatchExecution := false" if sbt 0.13 2020-11-16 15:23:41 +09:00
eugene yokota b911bad4ee
Merge pull request #6089 from eed3si9n/wip/build
bundledLauncherProj needs to be published
2020-11-16 00:57:52 -05:00
Eugene Yokota d19efc2c1d bundledLauncherProj needs to be published 2020-11-15 23:38:48 -05:00
eugene yokota b20c2d14e5
Merge pull request #6086 from eed3si9n/wip/bumpzinc
Zinc 1.4.3
2020-11-15 20:58:59 -05:00
Eugene Yokota 0561517d46 Zinc 1.4.3 2020-11-15 18:30:03 -05:00
eugene yokota d34c34d177
Merge pull request #6085 from eed3si9n/wip/metabuild-classpath2
Use the classpath obtained by the launcher for metabuild, take 2
2020-11-15 14:40:28 -05:00
Eugene Yokota b1a8f11011 Use the classpath obtained by the launcher for metabuild, take 2
Ref https://github.com/sbt/sbt/pull/4443
Fixes https://github.com/sbt/sbt/issues/5750

In #4443 I implemented an optimization where the metabuild would no longer re-resolve numerous sbt artifacts for metabuilds each time, and instead use whatever the JARs provided by the launcher. At the time, this technique didn't work for Coursier so I've placed in some workarounds for it. Now that Coursier's resolution has improved, it seems like the workaround is actually causing more harm. This removes the bandaid, and local testing shows that it seems to be working.

For instance, we no longer need to put in `ThisBuild / useCoursier := false` in sbt/sbt's `project/plugins.sbt`.
2020-11-15 12:19:03 -05:00
eugene yokota fedee2ba06
Merge pull request #6082 from nafg/develop
GCMonitor improvements
2020-11-15 02:51:31 -05:00
Eugene Yokota f7656b17d6 Cron 2020-11-15 02:47:06 -05:00
Eugene Yokota 4499149887 Use Bintray for nightly 2020-11-15 02:43:31 -05:00
nafg 3c2565722a Tweak warning text 2020-11-15 00:05:06 -05:00
Naftoli Gugenheim 889b101cbd Update tests for fixed GCMonitor 2020-11-15 00:00:50 -05:00
Naftoli Gugenheim 6cca595420 Add file headers 2020-11-15 00:00:50 -05:00
Naftoli Gugenheim 1c258b8fc9 GCMonitor: Unit tests, refactor, and improve
* Refactor so as to be testable
 * Queue stores the _beginning_ timestamp of each GC time delta
 * Message states the correct time over which the GC time was recorded
 * Add heap stats from java.lang.Runtime to the message
2020-11-15 00:00:50 -05:00