Commit Graph

10131 Commits

Author SHA1 Message Date
eugene yokota be99299fed
Merge pull request #6047 from eatkins/scripted-whitespace
Remove unnecessary newline
2020-11-03 06:52:14 -05:00
Ethan Atkins 6b9ea562a5 Remove unnecessary newline 2020-11-02 13:51:14 -08:00
eugene yokota 8c3f2a50f7
Merge pull request #6026 from eed3si9n/wip/content
Make remoteCacheId content-based
2020-11-01 22:06:37 -05:00
eugene yokota ded2787f23
Merge pull request #6039 from eed3si9n/wip/bumpzinc
Zinc 1.4.2
2020-11-01 22:06:01 -05:00
Eugene Yokota c5fd92959f AdoptOpenJDK 8 on Windows 2020-11-01 21:37:25 -05:00
Eugene Yokota d2252cc89d Zinc 1.4.2 2020-11-01 21:24:35 -05:00
Eugene Yokota 6c344830df Bring back fixed-id for testing 2020-11-01 19:51:57 -05:00
Eugene Yokota 744cfefa6c Refactor remote cache to per-config
Refactor remote caching to be scoped to configuration.
In addition, this avoid the use of dependency resolver (since I'm not resolving anything) and directly invoke the Ivy resolver for the artifact, somewhat analogus to publishing process.
This should speed up the `pullRemoteCache` since it avoids the POM download as well.

For sbt-binrary-remote-cache this created a bit of complication since the (publishing) resolver doesn't act correctly as (downloading) resolver in terms of the credentials, so I had to create a new key `remoteCacheResolvers` to have asymmetric resolver.
2020-11-01 19:15:28 -05:00
Eugene Yokota 078280ac47 Make sure we test the caching effect 2020-10-31 07:26:33 -04:00
eugene yokota 4a2aaabb9b
Merge pull request #6035 from sbt/travis-ci-badge
Update travis-ci badge. s/.org/.com/
2020-10-29 11:14:18 -04:00
kenji yoshida 512494d11c
Update travis-ci badge. s/.org/.com/
https://github.com/sbt/sbt/issues/6031
2020-10-29 23:54:09 +09:00
Eugene Yokota 6a356c61e0 Refactor remoteCacheId 2020-10-29 09:47:27 -04:00
eugene yokota dc676af358
Merge pull request #6030 from eatkins/bsp-client
Support -bsp in sbtn
2020-10-29 06:12:23 -04:00
Ethan Atkins f0c6d72ec7
Merge branch 'develop' into bsp-client 2020-10-28 10:07:12 -07:00
Eugene Yokota 86e793cd74 Make remoteCacheId content-based
Fixes https://github.com/sbt/sbt/issues/5842
2020-10-27 10:36:53 -04:00
Eugene Yokota 98ec0fd8d7 1.4.2-SNAPSHOT 2020-10-27 10:36:53 -04:00
eugene yokota 1436960b34
Merge pull request #6023 from eatkins/sbtn-wizard
Add wizard for installing sbtn and completions
2020-10-26 18:59:42 -04:00
eugene yokota 8c3ea7d470
Merge pull request #6007 from adpi2/fix-bsp-reporter
Fix #6006: BuildServerReporter on Dotty
2020-10-26 18:59:06 -04:00
Ethan Atkins b107bdc09d
Merge branch 'develop' into sbtn-wizard 2020-10-26 15:09:57 -07:00
Ethan Atkins 65ab7c94d0 Support -bsp in thin client
This refactors the thin client so that it can run the BspClient if
invoked with -bsp.
2020-10-26 14:46:25 -07:00
Ethan Atkins 0d69705e73 Refactor BspClient
This is a refactoring so that the thin client can invoke the bsp client.
2020-10-26 14:46:25 -07:00
eugene yokota 1f770bc1c0
Merge pull request #6028 from adpi2/lint-exclude-idle-timeout
Add serverIdleTimeout to the list of excluded lint keys
2020-10-26 17:09:02 -04:00
Ethan Atkins 37e4dc5318 Disable InstallSbtnSpec
This test works fine locally on all platforms but there are issues in
CI. I think that it might work ok with 1.4.2 without a lot of extra
effort so I'm going to disable it for now.
2020-10-26 10:15:46 -07:00
Ethan Atkins beab10fc64 Add wizard for installing sbtn and completions
This commit adds a wizard for installing sbtn along with tab completions
for bash, fish, powershell and zsh. It introduces the `installSbtn`
command which installs sbtn into ~/.sbt/1.0/bin/sbtn(.exe) depending on
the platform. It also can optionally install completions. The
completions are installed into ~/.sbt/1.0/completions. The sbtn native
executable is installed by downloading the sbt universal zip for the
version (which can be provided as an input argument with a fallback to
the running sbt version) and extracting the platform specific binary
into ~/.sbt/1.0/bin. After installing the executable, it offers to setup
the path and completions for the four shells. With the user's consent,
it adds a line to the shell config that updates the path to include
~/.sbt/1.0/bin and another line to source the appropriate completion
file for the shell from ~/.sbt/1.0/completions.
2020-10-26 10:15:46 -07:00
eugene yokota cf78d18d63
Merge pull request #6008 from adpi2/fake-positions
Fix #5994: sourceMappers handles fake positions
2020-10-26 12:53:43 -04:00
Adrien Piquerez 3ca7951d13 Add serverIdleTimeout to the list of excluded lint keys 2020-10-26 16:12:47 +01:00
Adrien Piquerez 66f4032699 Fix BuildServerReporter and add tests 2020-10-26 09:04:14 +01:00
Adrien Piquerez e4b93182ba Test Source Mapper on Windows 2020-10-26 08:40:00 +01:00
Adrien Piquerez d51057db4f Add tests on sourcePositionMappers 2020-10-26 08:40:00 +01:00
Adrien Piquerez 2425ca4950 handle fake positions in absoluteSourceMapper 2020-10-26 08:40:00 +01:00
eugene yokota 7a7bc5d0f9
Merge pull request #6025 from eatkins/thin-client-spaces
Replace %20 with space in sbt script name
2020-10-26 00:54:27 -04:00
Ethan Atkins d255481ade Replace %20 with space in sbt script name
We replace spaces in the sbt script with %20 and we need to replace the
%20s with spaces.
2020-10-25 19:17:13 -07:00
eugene yokota a757f3e6e8
Merge pull request #6024 from eatkins/join-thread
Avoid throwing interrupted exception in JoinThread
2020-10-25 21:33:45 -04:00
Ethan Atkins c66f31d8a1 Avoid throwing interrupted exception in JoinThread
I saw a stacktrace when exiting sbtn on windows due to an interrupted
exception being thrown during thread joining. We only want to throw this
exception if we didn't successfully join the thread. I also noticed that
we would try to join the thread forever. There was supposed to be a
timelimit so that we would eventually stop blocking even if we were
unable to join the thread. The limit was set but not respected.
2020-10-25 15:14:04 -07:00
Ethan Atkins b5fc17cc7a
Merge pull request #6022 from eatkins/network-flush
Flush terminal output stream after readline
2020-10-24 19:58:26 -07:00
Ethan Atkins fd0fb12e06
Merge branch 'develop' into network-flush 2020-10-24 16:47:56 -07:00
Ethan Atkins 28a788a17e
Merge pull request #6021 from eatkins/strip-colors
Strip ansi and color codes from terminal output
2020-10-24 16:47:13 -07:00
Ethan Atkins 3aeede3774 Flush terminal output stream after readline
With the thin client, when running the command `exit`, it is often the
case that the log message `[info] disconnected` is printed on the same
line as the prompt. This is because there is a small flush delay on the
network client's output stream channel that causes the disconnected info
message to be logged before the the newline that jline 3 echoes to the
client has been printed. To fix this we can manually flush the terminal
output stream before exiting.
2020-10-24 15:49:02 -07:00
Ethan Atkins 7eafcaf544 Strip ansi and color codes from terminal output
It is possible for downstream dependencies to print or log messages
containing ansi escape sequences and/or color codes. In older versions
of sbt, these would be printed even if the user had disabled ansi codes
or color via the sbt.log.noformat or sbt.color parameters. This commit
adds a general api to EscHelpers that strips general ansi codes and
color codes independently via flags. We can then use that api to ensure
that all bytes written to System.out are stripped of ansi escape and
color codes if the terminal properties demand this.

The motivation was that JLine 3 will prepend the prompt string with
\E[?2004h, which turns on bracketed paste mode
(https://en.wikipedia.org/wiki/ANSI_escape_code). If the sbt shell is
started with a terminal that doesn't support general ansi escape codes,
such as the jEdit shell, ?2004h gets printed to the shell. To fix this,
we can strip ansi codes from all output if the terminal doesn't support
general ansic codes. This has the additional side effect of any ansi
codes that appear in log messages or printlns that are added by non-sbt
code will be stripped. It's unlikely that this is all that common.

In addition to the JLine use case, I've noticed that utest prints
colored output during test runs. Prior to this change, the colored
output was present even when sbt was run with `-Dsbt.color=false` and
after this change, the colors are correctly stripped.
2020-10-24 15:31:00 -07:00
eugene yokota 1692b93ec3
Merge pull request #6019 from eatkins/client-properties
Parse network client arguments early
2020-10-24 17:30:18 -04:00
eugene yokota 078b9c69c5
Merge pull request #6017 from eatkins/log-format-color
Set color by default only if log format enabled
2020-10-24 17:20:04 -04:00
Ethan Atkins 69510b126b Parse network client arguments early
With sbtn, the system properties are passed in as regular command
arguments. We need to parse them before we call Terminal.withStreams or
else system properties like -Dsbt.color=false are ignored.
2020-10-24 12:54:14 -07:00
Ethan Atkins 0d332101f9
Merge branch 'develop' into log-format-color 2020-10-24 12:48:47 -07:00
Ethan Atkins fad905020c
Merge pull request #6018 from eatkins/watch-before
Reinstate watchBeforeCommand callback
2020-10-24 12:48:32 -07:00
Ethan Atkins 69be879684 Reinstate watchBeforeCommand callback
A user reported that the watchBeforeCommand callback was not being
invoked in sbt 1.4.{0, 1}. This was an oversight that occurred when
refactoring watch for the thin client and there previously had been no
regression test for that callback.
2020-10-24 10:59:33 -07:00
Ethan Atkins 4937ce563d
Merge branch 'develop' into log-format-color 2020-10-24 10:58:08 -07:00
eugene yokota a09e6e2a25
Merge pull request #6016 from eatkins/windows-echo
Fix console echo for windows batch commands
2020-10-24 13:55:49 -04:00
Ethan Atkins 46c5f8b0d8 Fix console echo for windows batch commands
For reasons I don't fully understand, it is necessary to go in and out
of raw mode to get console input to echo on windows. This was reported
as sbt new not echoing input in #5952.
2020-10-24 09:49:12 -07:00
Ethan Atkins 0e63873032 Set color by default only if log format enabled
I noticed that if you run `sbt -Dsbt.log.noformat=true` there are colors
printed when using the latest sbt code. When running with that property
set, the expectation is there are no colors.
2020-10-23 08:25:06 -07:00
eugene yokota 7a3ca0d9c2
Merge pull request #6011 from adpi2/fix-bsp-semanticdb-warning
Fix #5977: Fix semanticdb warning
2020-10-22 12:14:45 -04:00