Commit Graph

9524 Commits

Author SHA1 Message Date
eugene yokota 8fe7e33a31
Merge pull request #5792 from eatkins/windows-ctrl-c
Allow windows console users to exit with ctrl+c
2020-08-23 13:13:07 -04:00
eugene yokota 573bd8af04
Merge pull request #5788 from eatkins/intellij-import
Fix intellij import for 1.4.x
2020-08-23 13:12:11 -04:00
Ethan Atkins af761da811 Allow windows console users to exit with ctrl+c
On windows with jline3, inputting ctrl+c in the sbt console just causes
the input stream to return -3 unlike mac and linux where ctrl+c always
signals.

Fixes https://github.com/sbt/sbt/issues/5791
2020-08-23 09:12:52 -07:00
Ethan Atkins 41c33ba92f Fix intellij import with 1.4.x
The intellij import currentlly works by forking an sbt process and
writing command input through the process input stream. To make this
work, we need the SimpleTerminal (which is used when sbt is run with
-Dsbt.log.noformat=true) to be able to read input.

Attaching the input to the simple terminal caused watch tests to fail on
windows. This can be fixed by checking if the byte read from the input
stream is -1 and ignoring it if so.
2020-08-23 08:59:08 -07:00
Ethan Atkins 02366fdf49 Honor formatEnabledInEnv at the Terminal level
The sbt.log.noformat parameter should be treated very similarly to
sbt.io.virtual. When it is true, we should just use the raw io streams
for the process. This came up because of
https://github.com/sbt/sbt/issues/5784 which reported that intellij
imports were not working and that ansi control characters were being
written to the output.
2020-08-23 08:51:55 -07:00
eugene yokota 99e833d11a
Merge pull request #5789 from eatkins/join-threads
Use more aggressive strategy to join ui threads
2020-08-22 11:38:42 -04:00
Ethan Atkins 329baf4b0b Use more aggressive strategy to join ui threads
There can be race conditions where we try to interrupt and join a ui
thread before it becomes interruptible by blockign on a queue. To
workaround this, we can add the JoinThread class which adds an
extension method Thread.joinFor that takes a FiniteDuration parameter.
This variant of join will repeatedly interrupt and attempt to join the
thread for up to 10 milliseconds before retrying until the limit is
reached. If the limit is reached, we print a noisy error to the console.

I'm not 100% sure if we are leaking threads in the latest sbt version
but this gives me more piece of mind that either we are always
successfully joining the threads or we will be alerted if the joining
fails.
2020-08-21 12:57:37 -07:00
eugene yokota b8dac52338
Merge pull request #5774 from adpi2/feature/bsp-config-task
Add bspConfig task
2020-08-20 10:27:06 -04:00
eugene yokota 7f0d97acdf
Merge pull request #5776 from eatkins/sbt-upgrade
Bump sbt build to 1.4.0-M2
2020-08-19 23:06:12 -04:00
eugene yokota f7dad80258
Merge pull request #5777 from eatkins/ci-virtual-io
Don't use virtual io by default in CI
2020-08-19 22:57:07 -04:00
Ethan Atkins c641ebd55e Use latest sbt version in a travis build
Moving forward, it would be great for sbt to use the latest code to run
the scripted tests. This could help detect regressions that aren't
noticed by manual dogfooding. We can do this by first publishing
1.4.0-SNAPSHOT binaries before running tests. I didn't want to do this
for all of the builds because it does make each build that publishes
binaries take about a minute longer. The last build in the matrix is
much faster than the other builds though so I made just that build use
the snapshot version. Since that build almost always finishes first,
this should have little effect on the actual time to run ci even though
the cpu time will increase a bit.
2020-08-19 12:00:02 -07:00
Ethan Atkins f0055cd18a Don't use virtual io by default in CI
The CI output logs for the sbt build are truncated when using sbt
1.4.0-M2 because the virtual tty provided by the build agent doesn't
seem to work well with sbt's virtual io.
2020-08-19 11:32:06 -07:00
Ethan Atkins f4d72c8d0f Disable pipelining in CI
sbt 1.4.0-M2 failed to build util-tracking in 2.13.3 in CI with
pipelining enabled. It works fine with pipelining disabled.
2020-08-19 11:26:38 -07:00
Ethan Atkins b2d7ba3aec Disable virtual io in CI
The travis tty does not work with virtual io. We should disable virtual
io by default when sbt detects that it's being run in CI but until we
release 1.4.0-M3 or 1.4.0-RC1, we need this flag to fix the travis
output.
2020-08-19 11:26:38 -07:00
Ethan Atkins c01be0395d Bump sbt build to 1.4.0-M2 2020-08-19 09:26:27 -07:00
eugene yokota 85a0d08a4e
Merge pull request #5773 from adpi2/fix/dotty-semanticdb
Enable semanticdb with Dotty
2020-08-17 12:28:46 -04:00
Adrien Piquerez 4a02292b6f Enable semanticdb with Dotty 2020-08-17 17:39:43 +02:00
Adrien Piquerez 97b0347c15 Add bspConfig task 2020-08-17 17:33:48 +02:00
eugene yokota 31dc975ec7
Merge pull request #5769 from eed3si9n/wip/banner
Advertise versionScheme instead
2020-08-16 21:15:58 -04:00
eugene yokota da9cf449c7
Merge pull request #5767 from eed3si9n/wip/dotty-mixed
Implement Scala 2.13-3.0 sandwich
2020-08-16 21:15:21 -04:00
eugene yokota edc9386082
Merge pull request #5768 from eatkins/appender-bin-compat
Restore binary compatibility for LogManager.defaults
2020-08-16 19:28:59 -04:00
Eugene Yokota 1ae4f76e29 Advertise versionScheme instead
Ref https://github.com/sbt/sbt/pull/5724
2020-08-16 19:26:43 -04:00
Eugene Yokota f8139da192 Implement Scala 2.13-3.0 sandwich
Fixes https://github.com/sbt/sbt/issues/5369
Ref https://contributors.scala-lang.org/t/roadmap-for-the-tasty-reader-for-scala-2/4231

This implements support for inter-project dependencies between Scala 2.13 and Dotty, and vice versa. Scala 2.13 depending on Dotty would require 2.13.4 and above.
2020-08-16 19:19:05 -04:00
Ethan Atkins 74e407f4a1 Restore binary compatibility for LogManager.defaults
Although log manager is in the internal package, akka uses it and it
seems worth preserving binary compatibility in their build, at least for
sbt 1.4.0-M2. Once the community build is passing, we can consider
reverting this.
2020-08-16 15:45:26 -07:00
eugene yokota 8b5f212010
Merge pull request #5766 from eed3si9n/wip/use_pipelining
Add exportPipelining setting to implement subproject opt-out
2020-08-16 18:03:06 -04:00
eugene yokota 9d60267de2
Merge pull request #5765 from eed3si9n/wip/progress
Banner for 1.4.0 beta
2020-08-16 18:02:33 -04:00
Ethan Atkins 42c50ed6a8
Merge pull request #5763 from eatkins/more-lazy-terminal
Allow console terminal opt out
2020-08-16 14:37:59 -07:00
Eugene Yokota 1dc9a76a14 Banner for 1.4.0 beta
```
[info] welcome to sbt 1.4.0-SNAPSHOT (AdoptOpenJDK Java 1.8.0_232)
[info] loading settings for project global-plugins from ...
[info] loading global plugins from ...
[info] loading project definition from /private/tmp/hello/project
[info] loading settings for project root from build.sbt ...
[info] set current project to hello (in build file:/private/tmp/hello/)
[info]
[info] Here are some highlights of this release:
[info]   - Build server protocol (BSP) support
[info]   - sbtn: a native thin client for sbt
[info]   - VirtualFile + RemoteCache: caches build artifacts across different machines
[info]   - Incremental build pipelining. Try it using `ThisBuild / usePipelining := true`.
[info] See http://eed3si9n.com/sbt-1.4.0-beta for full release notes.
[info] Hide the banner for this release by running `skipBanner`.
[info] sbt server started at local:///Users/eed3si9n/.sbt/1.0/server/478e6db75688771ddcf1/soc
```
2020-08-16 16:21:27 -04:00
Eugene Yokota 755fbf4dcd Add exportPipelining setting to implement subproject opt-out
Fixes https://github.com/sbt/sbt/issues/5762
Fixes https://github.com/sbt/sbt/issues/5754

Ref https://github.com/sbt/zinc/pull/883
2020-08-16 15:47:44 -04:00
Ethan Atkins 4fcf253b0e Allow console terminal opt out
While running ~scripted that multiple instance of the console terminal
were instantiated which caused problems with reading input. It turned
out that RunFromSourceMain was running in the same jvm process as sbt
and creating a new console terminal in a different classloader. This
both messed up the io of scripted tests when scriptedBufferLog was set
to false but it also made it so that I couldn't exit ~ with <enter>. To
workaround this, I deferred initializaiton of the console terminal to
Terminal.withStreams which is guarded by the sbt.io.virtual system
property.
2020-08-16 12:03:25 -07:00
Eugene Yokota a81cbc791f Remove "done compiling" again 2020-08-16 14:12:59 -04:00
Eugene Yokota 4a77613250 CompileOrder must be Mixed 2020-08-16 04:43:29 -04:00
eugene yokota b09fd9d640
Merge pull request #5761 from eatkins/lazy-terminal-init
Only initialize console terminal streams when used
2020-08-15 20:29:11 -04:00
Ethan Atkins f1190682cc Only initialize console terminal streams when used
In dogfooding sbt, I found that the WriteableInputStream used by the
console terminal initialized before it was needed. This would lead to
multiple instances of the WriteableInputStream being created, which
could lead to zombie threads reading from stdin. I'm not 100% sure what
the classloading scenario was that caused this to be a problem but in a
few days of using sbt after these changes, I haven't seem zombie
threads.
2020-08-15 15:32:35 -07:00
Ethan Atkins 094f6078b2
Merge pull request #5760 from eatkins/thin-client-exit
Handle interrupted exceptions in thin client reader
2020-08-15 15:26:33 -07:00
Ethan Atkins 8c07493c1f Handle interrupted exceptions in thin client reader
When exiting the thin client, an interrupted exception stack trace ends
up being printed because NonFatal doesn't include interrupted
exceptions.

Fixes https://github.com/sbt/sbt/issues/5759
2020-08-15 13:50:15 -07:00
eugene yokota 5cf8e9f65e
Merge pull request #5753 from eed3si9n/wip/bump
Zinc 1.4.0-M9
2020-08-15 14:23:55 -04:00
Eugene Yokota d6fa4ccc93 Zinc 1.4.0-M9 2020-08-15 13:20:46 -04:00
Eugene Yokota 54aeba1607 Contraband 0.5.0 2020-08-15 13:20:46 -04:00
Eugene Yokota ff711f4719 Adjust to Zinc change 2020-08-15 13:20:46 -04:00
eugene yokota d3ffd33e17
Merge pull request #5757 from eatkins/thin-client-scala
Build thin client with scala 2.12.11
2020-08-15 13:16:26 -04:00
Ethan Atkins c480ffb3e4 Build the thin client with scala 2.12.11
With scala 2.12.12, building the thin client fails aggressively. See
https://github.com/sbt/sbt/issues/5756.
2020-08-15 09:39:07 -07:00
Ethan Atkins 6bc784a195 Change remaining sbtc to sbtn 2020-08-15 09:35:59 -07:00
eugene yokota 8ce423b088
Merge pull request #5752 from eatkins/cancel-all
Cancel all running tasks with ctrl+c
2020-08-14 21:57:13 -04:00
Ethan Atkins 64c0f0acdd Cancel all running tasks with ctrl+c
Frequently ctrl+c does not work to cancel the running tasks. This seems
to be because the signal handler is bound to a specific instance of
evaluate task but there may be multiple instances of evaluate task
running at any given time. Shutting down just one of the running engines
does not ensure that task evaluation stops. To work around this, we can
globally store all of the completion services in a weak hash map and
cancel all of them whenever a signal is received. Closing the service,
which happens at the end of task evaluation will remove the service from
the map so hopefully this shouldn't introduce a memory leak.
2020-08-14 14:52:57 -07:00
eugene yokota 91367bb34a
Merge pull request #5749 from eed3si9n/wip/sbtn
Rename to sbtn
2020-08-14 12:10:09 -04:00
eugene yokota 423d8fc33f
Merge pull request #5702 from eatkins/lint-ignore
Add lintUnusedKeysOnLoad to lint ignore keys
2020-08-14 12:08:27 -04:00
eugene yokota 7809bd4a38
Merge pull request #5748 from eatkins/watch-reload
Add reload to watch commands
2020-08-14 12:08:04 -04:00
eugene yokota 1769a55fed
Merge pull request #5743 from eed3si9n/wip/semanticdb
Upgrade scala version to 2.12.12, take 2
2020-08-14 11:18:47 -04:00
eugene yokota d7c9b01d81
Merge pull request #5745 from eed3si9n/wip/semi
Fixes semicolon showing up in parser errors
2020-08-14 05:10:44 -04:00