Commit Graph

7474 Commits

Author SHA1 Message Date
eugene yokota 37d5a3ee4e
Merge pull request #5006 from eed3si9n/wip/bump
util 1.3.0-M12
2019-08-29 16:11:03 -04:00
eugene yokota 785717c18a
Merge pull request #5005 from eatkins/classloader-performance-regression
Fix performance regression in test classloader
2019-08-29 16:10:46 -04:00
Eugene Yokota 4bb5979502 util 1.3.0-M12 2019-08-29 15:08:10 -04:00
Ethan Atkins ebf6d5aee6 Fix performance regression in test classloader
In 5eab9df0df, I updated the
outputFileStamps task to compute all of the stamps for a directory
recursively if an output file is a directory. Prior to that, it had only
computed the stamp for the directory itself. This caused a significant
performance regression in creating the test classloader because it was
computing the last modified time for all of the classfiles in the class path.
The test for 5000 source files in
https://github.com/eatkins/scala-build-watch-performance was running roughly
400ms slower due to this regression.
2019-08-29 11:52:29 -07:00
Ethan Atkins 3f6fa7ee87
Merge pull request #5002 from xuwei-k/use-Vector-instead-of-List
use Vector instead of List. avoid O(n) append
2019-08-29 09:24:09 -07:00
xuwei-k 1f3ce5f9ee use Vector instead of List. avoid O(n) append 2019-08-29 21:44:31 +09:00
eugene yokota 1ee20ef11d
Merge pull request #4997 from eed3si9n/wip/http
Deprecate HTTP resolvers (take 2)
2019-08-29 08:40:00 -04:00
Eugene Yokota 377c6dd661 util 1.3.0-M11 2019-08-28 23:56:08 -04:00
Eugene Yokota caaa8f1fb5 io 1.3.0-M17, lm 1.3.0-M8 2019-08-28 23:21:56 -04:00
Eugene Yokota 75e609cba2 Deprecate HTTP resolvers (take 2)
Ref https://github.com/sbt/sbt/issues/4905

This is a companion PR to https://github.com/sbt/librarymanagement/pull/318.

This will print the following warnings:

```
sbt:hello> compile
[warn] insecure HTTP request is deprecated 'Artifact(jsoup, jar, jar, None, Vector(), Some(http://jsoup.org/packages/jsoup-1.9.1.jar), Map(), None, false)'; switch to HTTPS or opt-in using from(url(...), allowInsecureProtocol = true) on ModuleID or .withAllowInsecureProtocol(true) on Artifact
[warn] insecure HTTP request is deprecated 'http://repo.typesafe.com/typesafe/releases/'; switch to HTTPS or opt-in as ("Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/").withAllowInsecureProtocol(true)
[warn] insecure HTTP request is deprecated 'http://repo.typesafe.com/typesafe/releases/'; switch to HTTPS or opt-in as ("Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/").withAllowInsecureProtocol(true)
[warn] insecure HTTP request is deprecated 'http://repo.typesafe.com/typesafe/releases/'; switch to HTTPS or opt-in as ("Typesafe Releases" at "http://repo.typesafe.com/typesafe/releases/").withAllowInsecureProtocol(true)
[warn] insecure HTTP request is deprecated 'Patterns(ivyPatterns=Vector(), artifactPatterns=Vector(http://repo.typesafe.com/typesafe/releases/[organisation]/[module](_[scalaVersion])(_[sbtVersion])/[revision]/[artifact]-[revision](-[classifier]).[ext]), isMavenCompatible=true, descriptorOptional=false, skipConsistencyCheck=false)'; switch to HTTPS or opt-in as Resolver.url("Typesafe Ivy Releases", url(...)).withAllowInsecureProtocol(true)
[warn] insecure HTTP request is deprecated 'Patterns(ivyPatterns=Vector(), artifactPatterns=Vector(http://repo.typesafe.com/typesafe/releases/[organisation]/[module](_[scalaVersion])(_[sbtVersion])/[revision]/[artifact]-[revision](-[classifier]).[ext]), isMavenCompatible=true, descriptorOptional=false, skipConsistencyCheck=false)'; switch to HTTPS or opt-in as Resolver.url("Typesafe Ivy Releases", url(...)).withAllowInsecureProtocol(true)
[warn] insecure HTTP request is deprecated 'Patterns(ivyPatterns=Vector(), artifactPatterns=Vector(http://repo.typesafe.com/typesafe/releases/[organisation]/[module](_[scalaVersion])(_[sbtVersion])/[revision]/[artifact]-[revision](-[classifier]).[ext]), isMavenCompatible=true, descriptorOptional=false, skipConsistencyCheck=false)'; switch to HTTPS or opt-in as Resolver.url("Typesafe Ivy Releases", url(...)).withAllowInsecureProtocol(true)
```
2019-08-28 23:20:09 -04:00
eugene yokota c38ce111fe
Merge pull request #4999 from eatkins/clean-directories
Restore old cleanFiles behavior
2019-08-28 20:42:23 -04:00
eugene yokota 5d934d4ec1
Merge pull request #4998 from eed3si9n/wip/override
Take dependencyOverrides into account
2019-08-28 20:42:02 -04:00
Ethan Atkins b3320ce1ba Restore old cleanFiles behavior
I inadvertently changed the semantics of clean so that cleanFiles would
only delete the file if it was a regular file. In older versions of sbt,
if a file in cleanFiles was a directory, it would be recursively
deleted.
2019-08-28 16:41:25 -07:00
Eugene Yokota 4086fc1213 Take dependencyOverrides into account
This tracks https://github.com/coursier/sbt-coursier/pull/106
Fixes https://github.com/sbt/sbt/issues/4895
2019-08-28 17:43:42 -04:00
eugene yokota 2178abba01
Merge pull request #4994 from eed3si9n/wip/launcher
launcher 1.1.3
2019-08-28 13:09:26 -04:00
Eugene Yokota b8dd2a514a launcher 1.1.3 2019-08-27 23:24:11 -04:00
eugene yokota c06781aa61
Merge pull request #4990 from eatkins/exclude-semicolons
Filter single semicolons from tab completions
2019-08-27 14:24:50 -04:00
eugene yokota 46f5b35366
Merge pull request #4991 from eatkins/watch-multi-command-error
Abort early in watch multi commands
2019-08-27 14:24:24 -04:00
Ethan Atkins 6ec9edb733 Abort early in watch multi commands
During refactoring of Continuous, I inadvertently changed the semantics
of `~` so that all multi commands were run regardless of whether or not
an earlier command had failed. I fixed the issue and added a regression
test.
2019-08-27 10:38:55 -07:00
Ethan Atkins dcb8e18f0e Filter single semicolons from tab completions
Fixes https://github.com/sbt/sbt/issues/4989.
2019-08-27 09:01:53 -07:00
eugene yokota 110f54a044
Merge pull request #4987 from eatkins/fix-cross-overcompilation
Store compile file stamps for each scala version
2019-08-27 08:39:37 -04:00
eugene yokota c22e318712
Merge pull request #4988 from eatkins/fix-script-main-settings
Fix settings in ScriptMain
2019-08-27 08:36:38 -04:00
Ethan Atkins 6ba3afbef7 Fix settings in ScriptMain
It was reported in https://github.com/sbt/sbt/issues/4973 that the
scalaVersion setting was not being correctly set in a script running
with ScriptMain using 1.3.0-RC4. Using git bisect, I found that the
issue was introduced in
73cfd7c8bd.
That commit manipulates the classloaders passed in by the launcher, but
only for the xMain entry point. I found that the script ran correctly if
I updated the classloader for ScriptedMain as well.

After these changes, the example script in #4973 correctly prints 2.13.0
for the scala version with a locally published sbt.

Bonus: rename xMainImpl object xMain. It was private[sbt] anyway.
2019-08-26 21:15:43 -07:00
Ethan Atkins bd4d04d131 Store compile file stamps for each scala version
https://github.com/sbt/sbt/issues/4986 reported that +compile would
always recompile everything in the project even when the sources hadn't
changed. This was because the dependency classpath was changing between
calls to compile, which caused the external hooks cache introduced in
32a6d0d5d7 to invalidate the scala
library. To fix this, I cache the file stamps on a per scala version
basis. I added a scripted test that checks that there is no
recompilation in two consecutive calls to `+compile` in a multi scala
version build. It failed prior to these changes.
2019-08-26 14:47:57 -07:00
eugene yokota 49afe01287
Merge pull request #4982 from eed3si9n/wip/gc
avoid force gc during load
2019-08-23 13:59:32 -04:00
Ethan Atkins 250a6ce29d
Merge pull request #4981 from eatkins/startup-perf
Startup perf
2019-08-22 23:40:24 -07:00
Eugene Yokota fcd9dbf3dd avoid force gc during load
This initializes the lastGcCheck to the current time so it won't force GC in the first 10 minutes, avoiding unnecessary GC during load.
2019-08-23 02:16:11 -04:00
Ethan Atkins 76ec00dc4b
Merge branch 'develop' into startup-perf 2019-08-22 21:50:21 -07:00
Ethan Atkins 944596122c
Merge pull request #4980 from eatkins/revert-io-file-management-apis
Stop injecting file management settings for io tasks
2019-08-22 21:49:30 -07:00
Ethan Atkins 1f9ea70518 Avoid intermediate collection creation during load
The allKeys method was making many intermediate collections. For akka,
this reduced startup time by about 400ms on average.
2019-08-22 20:35:12 -07:00
Ethan Atkins 4bb2f4e968 Used Seq instead of Stream
Streams generically perform poorly and weren't needed here.
2019-08-22 20:35:12 -07:00
Ethan Atkins 1700b89ea4 Parallelize Init.addLocal
During akka startup, addLocal was caused twice and prior to this change,
it took roughly 200ms per call on my computer. After this change, it
took about 100ms.
2019-08-22 20:35:11 -07:00
Ethan Atkins 3fc8817974 Add parallelism to KeyIndex.aggregate
I looked for serial bottlenecks in sbt project loading and discovered
that KeyIndex.aggregate was relatively easily parallelizable. Before
this time, it took about 1 second to run KeyIndex.aggregate in the akka
project on my computer. After this change, it took 250ms. Given that I
have 4 logical cores, the speedup is roughly linear.
2019-08-22 20:35:11 -07:00
Ethan Atkins b6f05b91f6 Stop injecting file management settings for io tasks
It turns out that injecting the keys necessary for incremental tasks
causes a significant startup penalty for many larger projects. For
example, akka starts up about 3 seconds faster if do not inject these
settings for the tasks returning `File` or `Seq[File]`. Given that all
of these apis use java.nio.file anyway, it makes sense to not backport
them to older tasks.
2019-08-22 20:34:37 -07:00
Ethan Atkins d6478c9def
Merge pull request #4978 from eatkins/clean-perf-fix
Fix clean performance
2019-08-22 20:33:44 -07:00
Ethan Atkins 5eab9df0df Fix clean performance
The clean task got a lot slower in 1.3.0
(https://github.com/sbt/sbt/issues/4972). The reason for this was that
sbt 1.3.0 generated many custom clean tasks for any tasks that returned
`File` or `Seq[File]`. Each of these tasks was tagged with
Tags.Clean which meant that only one of them could run at a time. As a
result, it took a long time to evaluate all of the custom tasks, even if
they were no-ops. In the akka project, a no-op clean was taking 35
seconds which is simply unacceptable. After this change, a no-op clean
takes less than a second in akka (a full clean only takes about 6
seconds after running test:compile)

To fix this, I stopped aggregating the clean task across configs and
projects. Because I removed the aggregation, I needed to manually
implement clean in the `Compile` and `Test` configurations to make
`Compile / clean` and `Test / compile` clean work correctly.
2019-08-22 13:01:56 -07:00
eugene yokota 477d76e1a9
Merge pull request #4967 from eatkins/bump-dogfood
Bump sbt to use 1.3.0-RC4
2019-08-21 12:09:17 -04:00
Ethan Atkins 58ff066b64 Bump sbt to use 1.3.0-RC4 2019-08-20 15:28:08 -07:00
eugene yokota cd00d0f801
Merge pull request #4965 from eed3si9n/wip/stacktrace3
reimplement stack trace suppression
2019-08-20 14:44:36 -04:00
Eugene Yokota ecb0375de2 reimplement stack trace suppression
Fixes #4964

Together with https://github.com/sbt/util/pull/211, this brings back stack trace supression for custom tasks by default.
Debug levels logs are available in `last`, and this prints a message informing the user of the fact. BLUE on dark background is difficult to read, so I am chaning the color hilight to MAGENTA.
2019-08-20 13:56:52 -04:00
eugene yokota 740936e156
Merge pull request #4956 from eatkins/custom-show
Allow custom show for a scope
2019-08-19 16:37:11 -04:00
Ethan Atkins 09f4fcf94b Add test case and scaladoc 2019-08-19 11:49:09 -07:00
Ethan Atkins 8fbf1907ce Allow custom show for a scope
I am writing a plugin that uses mangled task keys that are very hard to
read. It is helpful to be able to override the show config for these
scopes so that they look reasonable in supershell and in error
reporting.
2019-08-19 11:23:43 -07:00
eugene yokota 4030a6434d
Merge pull request #4961 from eed3si9n/wip/bump
bump modules
2019-08-19 12:55:06 -04:00
Eugene Yokota fcf7c5955e remove neo-sbt-scalafmt test
The test fails because the plugin is using reflection to access a private class, and we changed it - https://github.com/lucidsoftware/neo-sbt-scalafmt/issues/80
2019-08-19 03:37:33 -04:00
Eugene Yokota 01e7b5d191 ScalaTest 3.0.8 2019-08-19 02:34:07 -04:00
Eugene Yokota 6d54ad3745 launcher 1.1.2 2019-08-19 02:31:03 -04:00
Eugene Yokota 13b110faef io 1.3.0-M16, util 1.3.0-M9, lm 1.3.0-M6, zinc 1.3.0-M9 2019-08-19 02:27:52 -04:00
eugene yokota 6f74650712
Merge pull request #4950 from eed3si9n/wip/coursier
use Relaxed reconciliation strategy by default (take 2)
2019-08-15 23:37:08 -04:00
eugene yokota 94b651252d
Merge pull request #4951 from intracer/develop
add .idea to .gitignore
2019-08-15 22:11:11 -04:00