Commit Graph

10250 Commits

Author SHA1 Message Date
Matthias Kurz 07df9aa4c0
Use identity 2020-12-04 00:43:59 +01:00
Matthias Kurz 583ac69c15
onLoad now runs with correct FileTreeRepository and CacheStoreFactory 2020-12-04 00:43:59 +01:00
eugene yokota 75184cae67
Merge pull request #6184 from jtjeferreira/backport_coursier_2.0.7
[1.4.x] backport #6120 Updates to Coursier 2.0.7
2020-11-30 20:31:24 -05:00
João Ferreira 936a643c5b Updates to Coursier 2.0.7 (#6120)
* Updates to Coursier 2.0.7

https://github.com/coursier/sbt-coursier/releases/tag/v2.0.4 which includes https://github.com/coursier/coursier/releases/tag/v2.0.7

> Memo-ize classes that can be created at a high rate

coursier.core.{Dependency, Module, Publication} are now memo-ized (using weak references). This can lower the amount of duplicate instances of these objects, and lower GC pressure.
2020-11-30 21:08:52 +00:00
Ethan Atkins 1a1cca3cd3
Merge pull request #6170 from eatkins/1.4.x-6166-backport
[1.4.x] backport #6166 Fix watch shell option
2020-11-25 12:05:43 -08:00
Ethan Atkins 2bf6a8b0bf Merge pull request #6166 from eatkins/watch-prompt-fix
Fix watch shell option
2020-11-25 09:25:58 -08:00
eugene yokota 8a1f53d87b
Merge pull request #6169 from eatkins/1.4.x-arm64
[1.4.x] support apple silicon arm64 platform
2020-11-25 11:50:30 -05:00
Ethan Atkins bc8048ced4 Use jni if required when running client from xMain
See https://github.com/sbt/sbt/issues/6162#issuecomment-733207878.
2020-11-25 07:43:26 -08:00
Ethan Atkins 402067452d Evict io version of swoval file tree views
This version of swoval supports the apple arm64 platform.
2020-11-25 07:41:27 -08:00
eugene yokota 29f0989554 Merge pull request #6165 from eatkins/ipcsocket-jna
Use JNI implementation of ipcsocket APIs on Arm Macs
2020-11-25 07:37:22 -08:00
Ethan Atkins fef142e697 Update ipcsocket
The new version provides an apple silicon arm64 jni implementation of
the ipcsocket api. It also adds a jni implementation for getting the max
socket length which is necessary because jna isn't supported on the
apple arm64 platform yet.
2020-11-25 07:35:44 -08:00
eugene yokota 2cb0bc64a4
Merge pull request #6160 from eed3si9n/bport/pure-expression
[1.4.x] Work around "a pure expression does nothing" warning, take 2
2020-11-22 18:04:01 -05:00
Eugene Yokota 38c9698b99 Work around "a pure expression does nothing" warning, take 2
In https://github.com/sbt/sbt/pull/5981 I tried to work around the spruious post-macro "a pure expression does nothing" warning (https://github.com/scala/bug/issues/12112) by trying to remove some pure-looking expressions out of the tree.

This quickly backfired when it was reported that sbt 1.4.3 was not evaluating some code. This backs out the macro-level manipulation, and instead try to silence the warning at the reporter level. This feels safer, and it seems to work just as well.
2020-11-22 17:36:41 -05:00
Eugene Yokota 17c032dd77 Revert "Strip out raw Ident(_) in blocks if it's synthetic"
This reverts commit a44aee9ac1.
2020-11-22 17:36:34 -05:00
Eugene Yokota 67fe0e0755 Revert "setType to Block(...)"
This reverts commit b62ddaa4e9.
2020-11-22 17:36:24 -05:00
eugene yokota 0c34137e37
Merge pull request #6159 from eed3si9n/wip/bump
[1.4.x] lm 1.4.1
2020-11-22 17:09:58 -05:00
Eugene Yokota 2419b0f38e lm 1.4.1 2020-11-22 16:23:40 -05:00
eugene yokota f1d8b68a83
Merge pull request #6157 from eed3si9n/bport/6155
[1.4.x] Use `Global / localCacheDirectory` for remote caching
2020-11-22 16:19:49 -05:00
Eugene Yokota caeb19bfc7 Use `Global / localCacheDirectory` for remote caching
Fixes https://github.com/sbt/sbt/issues/6102

https://github.com/sbt/sbt/pull/6026 changed the implementation of remote cache to NOT use dependency resolution (Coursier), and directly use Ivy resolver for efficiency. This was good, but when I made the change, I've changed the cache directory to be `crossTarget.value / "remote-cache"`. This was ok for local testing purpose, but not great for real usage since we don't want the cache to be wiped out either in the CI machines or on a local laptop.

This adds a new Global key called `localCacheDirectory`. Similar to Coursier cache, this is meant to be shared across all builds running on a machine. Also similar to Coursier cache this will try to follow the operating system specifc caching directory.

### localCacheDirectory location

- Environment variable: `SBT_LOCAL_CACHE`
- System property: `sbt.global.localcache`
- Windows: %LOCALAPPDATA%\sbt\v1
- macOS: $HOME/Library/Caches/sbt/v1
- Linux: $HOME/.cache/sbt/v1
2020-11-22 15:16:25 -05:00
eugene yokota 3aa083c8c5
Merge pull request #6152 from eatkins/1.4.x-backport-6151
[1.4.x] backport #6151 Only set scriptedBatchExcution true for >= 1.4
2020-11-21 13:41:26 -05:00
Ethan Atkins 5572d5ca56 Only set scriptedBatchExcution true for >= 1.4
In #6091, we updated the ScriptedPlugin to set scriptedBatchExecution :=
true for all 1.x versions but not 0.13. This commit further restricts
the setting so that it is only set for sbt >= 1.4, which seems necessary
based on the comments in #6094.
2020-11-21 08:44:10 -08:00
eugene yokota df6d79b521
Merge pull request #6150 from eatkins/1.4.x-backport-6146
[1.4.x] backport #6146 Prepend scala instance jars to sbt classpath
2020-11-21 11:37:10 -05:00
Ethan Atkins 6a9965c263 Prepend scala instance jars to sbt classpath
When using the launcher's classpath for the metabuild, the
scala-compiler jar can be missing. This is because the managedJars only
method returns the scala-library jar and not the rest of the scala
instance. To fix this, we can always prepend the scala instance jars to
the classpath.

In order to simulate the issue in scripted, I had to manually remove the
scala-compiler.jar from the scripted classpath or else the scripted test
that I added doesn't actually do anything because the scala-compiler.jar
would end up on the app.provider.mainClasspath.

Fixes #4452
2020-11-21 08:10:16 -08:00
eugene yokota da30c65aec
Merge pull request #6148 from adpi2/1.4.x
Bump semanticdb version to 4.4.0
2020-11-21 09:52:52 -05:00
Adrien Piquerez fc232abb58 Bump semanticdb version 2020-11-21 09:52:54 +01:00
eugene yokota c020e0d4f6
Merge pull request #6147 from eatkins/1.4.x-backport-6145
[1.4.x] backport #6145 Print empty newlines with progress
2020-11-20 23:16:16 -05:00
Ethan Atkins 5fe89944bd Print empty newlines with progress
With the latest sbt code, the `last` command displayed all of the output
without line separators. This occurred because the logic for appending
bytes to System.out split the input bytes on the line separator but if
there was nothing but the line separator in the input bytes then the
result was empty.
2020-11-20 13:09:23 -08:00
eugene yokota e2799f0cc1
Merge pull request #6143 from eatkins/1.4.x-bulk-backport
[1.4.x] backport #6114, #6125, #6128, #6129, #6130
2020-11-20 13:53:35 -05:00
Ethan Atkins 8692718d85 Merge pull request #6129 from eatkins/bsp-watch-fix
Fix watch when metals sbt bsp is in use
2020-11-20 09:51:44 -08:00
Ethan Atkins c330357502 Merge pull request #6128 from eatkins/logger-thunk
Only evaluate log message thunk once
2020-11-20 09:51:42 -08:00
eugene yokota a88e23d0da Merge pull request #6125 from eatkins/sort-scripted-tests
Sort scripted tests
2020-11-20 09:51:39 -08:00
eugene yokota bf596f93d1 Merge pull request #6130 from eatkins/scripted-hangs
Stop CI hangs in background job service shutdown
2020-11-20 09:51:36 -08:00
Ethan Atkins 5a386cf625 Merge pull request #6114 from eatkins/bsp-consolidate
Use NetworkClient to implement `sbt -bsp`
2020-11-20 09:51:34 -08: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
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