Commit Graph

11930 Commits

Author SHA1 Message Date
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
eugene yokota ca660f25da
Merge pull request #5747 from eatkins/watch-threads
Ensure watch threads are joined
2020-08-14 05:09:37 -04:00
Eugene Yokota 0b94b68fb5 Rename to sbtn 2020-08-13 22:56:02 -04:00
eugene yokota cd47b5c47b
Merge pull request #5746 from eatkins/virtual-file-cache
Make virtual file value cache global
2020-08-13 22:20:11 -04:00
Ethan Atkins 415341ec8b Add reload to watch commands
I have this in my global git config and think it's useful enough to
promote to the default.
2020-08-13 18:03:55 -07:00
Ethan Atkins 59c3d73f83 Ensure watch threads are joined
While dogfooding the latest sbt, I noticed that sometimes the watch
input threads leak. I suspect this happens when a build is immediately
triggered by a file that was modified during compilation. Though I
didn't fully verify this, it's likely that we interrupted the input
reading thread before it actually started reading. When it started
reading after the interrupt, it would block until the user entered
another input character. The result was that the zombie thread would
effectively steal the next character from the input stream which
manifested as the first character being ignored when the user tried to
enter a watch input option. If more than one thread leaked, then it may
take a number of keystrokes before the user regained control.

To fix this, we can ensure that all watch related threads are joined
before we exit watch. To avoid completely blocking the ui, we only try
to join the threads for a second and print an error if the join fails.
This shouldn't be the case so if users see this error, then we need to
fix the bug.
2020-08-13 18:03:26 -07:00
Ethan Atkins adf28877bc Make virtual file value cache global
In 0d2b00c7e9, I introduced a setting for
the virtual file defines class cache to avoid ooms coming from zinc
stamping the project jar files. I introduced that cache at the compile
level though rather than global level and crashes were still occurring
in the sbt build. It was very easy to induce a crash on my computer by
running compile a few times, reload and then compile again. After making
the cache global, the crashes went away.
2020-08-13 18:02:57 -07:00
eugene yokota ef34a33ac9
Merge pull request #5744 from eed3si9n/wip/converter
Use mapped VirtualFile for classpath
2020-08-13 10:00:15 -04:00
Eugene Yokota 9937230f0c Fixes semicolon showing up in parser errors
Fixes https://github.com/sbt/sbt/issues/5039
Fixes https://github.com/sbt/sbt/issues/4989

This is take 2 on the semicolon fix by emptying out the completion examples in the multi parser.

```
> set scalaV
```

would complete to

```
> set scalaVersion
```

and more importantly

```
coursierUseSbtCredentials := true
```

errors to

```
sbt:hello> coursierUseSbtCredentials := true
[error] Expected ID character
[error] Not a valid command: coursierUseSbtCredentials
[error] Expected project ID
[error] Expected configuration
[error] Expected ':'
[error] Expected key
[error] Not a valid key: coursierUseSbtCredentials (similar: csrExtraCredentials, credentials)
[error] coursierUseSbtCredentials := true
[error]                          ^
```
2020-08-13 01:41:19 -04:00
Eugene Yokota 8521be5ac8 Revert "Filter single semicolons from tab completions"
This reverts commit dcb8e18f0e.
2020-08-13 01:41:19 -04:00
Johannes Rudolph 4948c54486
Update README.md 2020-08-12 12:25:53 +02:00
Eugene Yokota c85e5b8bc0 Upgrade scala version to 2.12.12
This introduces `Def.unit(...)` to workaround the pure expression does nothing warning.
2020-08-11 23:33:12 -04:00
Eugene Yokota 541235e024 Use mapped VirtualFile for classpath 2020-08-11 22:24:05 -04:00
Eugene Yokota d2ff2edf87 SemanticDB 4.3.20 2020-08-11 21:59:33 -04:00
eugene yokota 5419c3a0db
Merge pull request #5740 from eed3si9n/wip/coursier_initialization
Delay the initialization of Coursier cache
2020-08-11 20:55:40 -04:00