Commit Graph

9384 Commits

Author SHA1 Message Date
Ethan Atkins 8cba83aebb Improve TestFramework error reporting
It is possible for the test task to fail because of issues with the
layered ClassLoaders. When this occurs and is detectable, I try to
provide a useful error message that will help the user fix the issue.
2019-01-30 08:55:22 -08:00
Ethan Atkins f118a5e410 Add LayeringStrategy
This introduces a new trait LayeringStrategy that is used to configure
how sbt constructs the ClassLoaders used by the run and test tasks. In
addition to defining the various options, I try to give a good high
level overview of the problem that the LayeringStrategy is intended to
address in its scaladoc.
2019-01-30 08:55:22 -08:00
Ethan Atkins 2e40b52e7c Cleanup scripted tests
The sleeps in source-dependencies/export-jars are no longer necessary
and just slow the test down. I also fixed minor syntax issues in
scala-instance-classloader and fixed a thread leak in the test.
2019-01-30 08:55:22 -08:00
Ethan Atkins ef08290ecc Add ClassLoaderCache
In order to speed up the start up time of the test and run tasks, I'm
introducing a ClassLoaderCache that can be used to avoid reloading the
classes in the project dependencies (which includes the scala library).
I made the api as minimal as possible so that we can iterate on the
implementation without breaking binary compatibility. This feature will
be gated on a feature flag, so I'm not concerned with the cache class
loaders being useable in every user configuration. Over time, I hope
that the CachedClassLoaders will be a drop in replacement for the
existing one-off class loaders*.

The LayeredClassLoader was adapted from the NativeCopyLoader. The main
difference is that the NativeCopyLoader extracts named shared libraries
into the task temp directory to ensure that the ephemeral libraries are
deleted after each task run. This is a problem if we are caching the
ClassLoader so for LayeredClassLoader I track the native libraries that
are extracted by the loader and I delete them either when the loader is
explicitly closed or in a shutdown hook.

* This of course means that we both must layer the class loaders
appropriately so that the project code is in a layer above the cached
loaders and we must correctly invalidate the cache when the project, or
its dependencies are updated.
2019-01-30 08:55:22 -08:00
Ethan Atkins 5bbda9cf69 Add Repository interface
I am going to be introducing multiple caches throughout sbt and I am
going to build these features out using this simple Repository
interface. The idea is that we access data by some key through the
Repository. This allows us to use the strategy pattern to easily switch
the runtime implementation of how to get the data.
2019-01-30 08:55:22 -08:00
Ethan Atkins ec22d6c0da Add LRUCache to sbt.internal
I am going to add a classloader cache to improve the startup performance
of the run and test tasks. To prevent the classloader cache from having
unbounded size, I'm adding a simple LRUCache implementation to sbt. An
important characteristic of the implementation of the cache is that when
entries are evicted, we run a callback to cleanup the entry. This allows
us to automatically cleanup any resources created by the entry.

This is a pretty naive implementation that uses an array of entries that
it manipulates as elements are removed/accessed. In general, I expect
these caches to be quite small <= 4 elements, so the storage overhead /
performance of the simple implementation should be quite good. If
performance ever becomes an issue, we can specialzed LRUCache.apply to
use a different implementation for caches with large limits.
2019-01-30 08:55:22 -08:00
eugene yokota e36360977b
Merge pull request #4524 from eed3si9n/wip/bumpmodule
Zinc 1.3.0-M2, Util 1.3.0-M4
2019-01-30 11:01:18 -05:00
Eugene Yokota 67a0962b18 Diable these tests
Ref #4514

There's a problem with calling scripted from scripted tests.
It's likely the bug is in the metabuild of sbt/sbt, not sbt itself.
2019-01-30 01:43:28 -05:00
Eugene Yokota e91b651a03 Zinc 1.3.0-M2, Util 1.3.0-M4 2019-01-29 18:15:40 -05:00
Dale Wijnand 08d5eed549
Merge pull request #4521 from dwijnand/implement-Append-for-Function1
Implement Append for Function1
2019-01-29 18:17:38 +00:00
Dale Wijnand 32b342e9a8
Mention SAM conversions 2019-01-29 15:47:50 +00:00
Dale Wijnand 53c6299c94
Implement Append for Function1 2019-01-29 09:12:11 +00:00
Dale Wijnand 14bffefef9
Cleanup Append 2019-01-27 16:20:59 +00:00
eugene yokota 9e37391937
Merge pull request #4516 from cunei/bumpScala12x
Bump the 2.12 version to 2.12.8 in 1.2.x
2019-01-17 10:35:48 -05:00
Antonio Cunei 6b3ec4e1d0 More bumping up the 2.12 version to 2.12.8 in 1.2.x 2019-01-17 11:21:52 +01:00
eugene yokota 88624cb779
Merge pull request #4515 from eatkins/typed-path-api
Update TypedPath apis
2019-01-17 01:25:31 -05:00
Eugene Yokota d58cc75e39 IO 1.3.0-M5 2019-01-16 22:35:12 -05:00
Antonio Cunei 0b103c5701 Bump the 2.12 version to 2.12.8 in 1.2.x 2019-01-16 22:26:22 +01:00
Ethan Atkins 161dfd77f2 Update TypedPath apis
I renamed getPath to toPath in io so we need to update sbt to using the
correct api.
2019-01-16 13:22:56 -08:00
Ethan Atkins 48394c81d5
Merge pull request #4509 from eatkins/2.12.8
Bump scala version 2.12.8
2019-01-08 13:29:15 -08:00
Ethan Atkins 541d4047e6 Bump scala version 2.12.8
I ran a zsh one liner to generate this:
git grep "2.12.7" | cut -d ':' -f1 | sort | uniq | xargs perl -p -i -e "s/2.12.7/2.12.8/"
2019-01-08 11:11:23 -08:00
Ethan Atkins 78efa032f8
Merge pull request #4508 from eatkins/labeled-functions
Add LabeledFunctions to repo
2019-01-08 10:42:53 -08:00
Ethan Atkins 2b831e5988 Add LabeledFunctions to repo
I noticed that debugging settings that return functions is annoying
because often the setting is initialized as an anonymous function with a
useless toString method. To improve the debugging for users, I'm adding
a number of wrapper classes for functions that override the default
toString with a provided label.

I then used these functions to label all of the anonymous functions in
Watched.scala.
2019-01-08 09:45:06 -08:00
eugene yokota ed1200a763
Merge pull request #4497 from tdroxler/feature/preserve-error-order
Preserve errors order when publishing diagnostics
2019-01-04 10:48:01 -05:00
Eugene Yokota 68d0da379e add Mima exclusion 2019-01-04 09:55:28 -05:00
Thomas Droxler fff6b044bc Use `ListBuffer` instead of `List` in `LanguageServerReporter`
In order to have a better data structure for appending
2019-01-04 13:31:04 +01:00
Thomas Droxler a5388fed60 Preserve errors order when publishing diagnostics
The `sbt-server` was prepending a new probem and not appending.

The result was a `textDocument/publishDiagnostics` notification
containing a inverted list of problems compare to what was show in the
sbt console.
2019-01-04 13:31:04 +01:00
eugene yokota f514f4fb78
Merge pull request #4389 from eed3si9n/wip/openjdk11
test on openjdk11
2019-01-04 01:30:04 -05:00
Eugene Yokota 0bcb648448 test everything on JDK11 2019-01-03 22:32:32 -05:00
Eugene Yokota 2480fd838c fix project/flatten 2019-01-03 22:30:41 -05:00
Eugene Yokota c424b7440b fix project/internal-tracking 2019-01-03 22:30:41 -05:00
Eugene Yokota a643380da5 fix protect/aggregate 2019-01-03 22:30:41 -05:00
Eugene Yokota 690beddf02 fix dependency-management/snapshot-resolution 2019-01-03 22:30:41 -05:00
Eugene Yokota bb1d1edb67 Delete apiinfo/basic 2019-01-03 22:30:41 -05:00
Eugene Yokota 33b4db3daf mark dotty-compiler-plugin pending
Ref https://github.com/lampepfl/dotty/issues/5671
2019-01-03 17:24:05 -05:00
Eugene Yokota d1409e5041 fix compiler-project/error-in-invalidated 2019-01-03 17:06:10 -05:00
Eugene Yokota 62845b6266 fix compiler-project/separate-analysis-per-scala 2019-01-03 17:05:44 -05:00
Eugene Yokota ff12b395a0 fix dependency-management/cache-classifiers 2019-01-03 16:47:30 -05:00
Eugene Yokota 97181e7700 get actions/cross-multiproject to pass 2019-01-03 16:40:10 -05:00
Eugene Yokota 85db47420b fix actions/generator 2019-01-03 15:36:44 -05:00
Eugene Yokota 610495af53 fix actions/doc
Javadoc on JDK11 no longer generates package-list it seems.
2019-01-03 15:25:08 -05:00
Eugene Yokota 3f405daf6a fix actions/doc-file-options 2019-01-03 15:11:58 -05:00
Eugene Yokota d1b921535b fix actions/cross-strict-aggregation for openjdk11 2019-01-02 15:48:32 -05:00
eugene yokota 8a7dc9c8e1
Merge pull request #4504 from eed3si9n/bport/4486
[1.2.x] define whitesourceOnPush
2019-01-02 15:41:29 -05:00
Eugene Yokota 3962ee297c add some AdoptOpenJDK JDK11 tests 2019-01-02 14:37:29 -05:00
Eugene Yokota 6001c4e2e6 sbt-assembly 0.14.9 2019-01-02 14:37:29 -05:00
Eugene Yokota ffcf9cd085 define whitesourceOnPush
whitesourceOnPush calls whitesourceCheckPolicies and whitesourceUpdate on push.
Since Travis CI secrets are not available during PR from a fork, there's no point in calling these during the PR validation.
2019-01-02 14:14:18 -05:00
eugene yokota 9fa25de84c
Merge pull request #4502 from eed3si9n/wip/bumplm
lm 1.2.4
2018-12-29 00:09:37 -05:00
Eugene Yokota 4c720bffc3 lm 1.2.4 2018-12-28 23:10:27 -05:00
eugene yokota 5cde0abc09
Merge pull request #4501 from eatkins/multi-command
Allow trailing semicolon in multi commands
2018-12-27 17:24:57 -05:00