Commit Graph

10242 Commits

Author SHA1 Message Date
Ethan Atkins b3165b5c8c Load SuccessEventTag lazily
It takes about a second to load scala.reflect.runtime.universe. If we
lazy load here, we can load scala.relect.runtime.universe in the
background to speed up the sbt start up time. See
0ebb7a5662.
2019-09-18 15:33:42 -07:00
eugene yokota 9d0bb68bd3
Merge pull request #5069 from eatkins/stream-locks
Add per file stream locks
2019-09-17 23:14:54 -04:00
Eugene Yokota 6664cbe2ae add includePluginResolvers
Fixes #5070

This adds a new setting called `includePluginResolvers` (default `false`).
When set to `true`, it the project will include resolvers from the metabuild.

This allows the build user to declare a resolver in one place (`project/plugins.sbt`) that gets applied to both the metabuild as well as all the subprojects. The scenario comes up when someone distributes a software on their own repo. Ref #4103
2019-09-17 23:04:10 -04:00
eugene yokota a164c0571d
Merge pull request #220 from eed3si9n/wip/merge
merge 1.3.x branch
2019-09-17 17:12:42 -04:00
eugene yokota d119818656
Merge pull request #5086 from eatkins/build-sources
Monitor project build sources
2019-09-17 00:23:29 -04:00
Ethan Atkins 48947b8283 Monitor meta build sources
We want to recursively monitor the project meta build, but we also want
to avoid listing directories that don't exist. To compromise, I rework
the buildSourceFileInputs to add the nested project directories if they
exist. Because the fileInputs are a setting, this means that adding a
new project directory and *.sbt or *.scala will not immediately trigger
a rebuild, but in most common cases, it will. I added a scripted test
for this.
2019-09-16 18:39:53 -07:00
Ethan Atkins 26e60e9b6a Monitor project build sources
In sbt 1.3.0, we only monitor build sources in the root project
directory and the root project meta build directory. This commit adds
these inputs for each project.

Fixes https://github.com/sbt/sbt/issues/5061.
2019-09-16 14:41:29 -07:00
Ethan Atkins ab2f3d6757
Merge pull request #5085 from eatkins/supershell-blacklist
Add consoleQuick and state to super shell blacklist
2019-09-16 13:39:11 -07:00
Ethan Atkins 5d2ee701e5 Improve formatting in Continuous 2019-09-16 11:22:41 -07:00
Ethan Atkins 711dfe34d0 Skip state in task progress
In the `watch` input task, which is an alternative to `~`, with super
shell, there would be a solitary progress line for `state` in between
builds.
2019-09-16 11:22:33 -07:00
Ethan Atkins aa09a48b71 Add consoleQuick to skipReportTasks
This was an oversight that caused consoleQuick to not work with
supershell. We should probably try to figure out a way to allow custom
tasks to black list themselves from super shell reporting.
2019-09-15 11:46:02 -07:00
eugene yokota 44cc19e66d
Merge pull request #5081 from eatkins/close-run
Close in-process classloader only once run has completed
2019-09-14 21:45:11 -04:00
Ethan Atkins af16d33700 Add per file stream locks
We have seen failures in scripted to create the output file for streams
and it has also been reported in https://github.com/sbt/sbt/issues/5067.
I believe this may caused by the same stream output being initialized by
multiple tasks. To fix this, I add locking on a per-file basis. There
was (and is) additional synchronization on the Streams _instance_, but
the per-file locks are stored in the Streams companion object so the
locking should be honored no matter which Streams instance calls make.

I also skip the call to IO.touch if the file already exists. I believe
that this is the common case and since IO.touch was being called with
setModified = false, it should be fine to skip the touch when the file
exists.

Prior to this change, I was able to induce the issue in #5067 in roughly
1/50 of calls to `scripted actions/cross-multiproject`. I wasn't able to
reproduce after this change.
2019-09-14 15:22:05 -07:00
Ethan Atkins d371faf90a Manage classloader in BackgroundJobService
In https://github.com/sbt/sbt/issues/5075 we realized that sbt 1.3.0
introduces a regression where it closes the classloader used to invoke
the main method for in process run before all of its non-daemon threads
have terminated. To fix this and still close the classloader, I add a
method, runInBackgroundWithLoader that provides the background job
services with an optional classloader that it can close after the job
completes.

This cleanly merges and works with 1.3.x as well.
2019-09-14 14:52:18 -07:00
Ethan Atkins c4045e7575 Add scripted test for closing classloaders
https://github.com/sbt/sbt/issues/5075 reports that sbt 1.3.0 has a
regression for in process run. In sbt 1.3.0, we close the classloader
that invokes the main method before all of the daemon threads complete.
This adds a scripted test that fails due to this regression.
2019-09-14 14:45:15 -07:00
eugene yokota 5e44479dfb
Merge pull request #5072 from eed3si9n/wip/2.12.10
Scala 2.12.10 + lm-coursier-shaded 2.0.0-RC3-4
2019-09-12 16:23:52 -04:00
Eugene Yokota 5d0793fece Scala 2.12.10 2019-09-11 23:02:50 -04:00
Eugene Yokota e59c447e00 lm-coursier-shaded 2.0.0-RC3-4 2019-09-11 22:53:36 -04:00
Yusuke Yamada ae9bba4b80 Set swoval.tmpdir with absolute path via globalBasePath (#5048)
Fixes https://github.com/sbt/sbt/issues/5047

When setting swoval.tmpdir via globalBase, changed to set globalBase as absolute path.

`com.swoval.runtime.NativeLoader.loadPackaged` uses `java.lang.System.load`.
It requires absolute path, so we should set `swoval.tmpdir` with absolute path.
2019-09-09 14:13:34 -04:00
Dmitrii Naumenko e28e451431 remove duplicates from allJars when creating ScalaInstance #5052 (#5053)
Fixes #5052
2019-09-07 16:26:13 -04:00
Brice Jaglin 17d25ccc44 Disable cached resolution for ignoreMissingUpdate (#184)
Before 7992dc9, a custom, non-cached-resolution-aware update task was
used to generate the report that the tree is based on, effectively
ignoring the cached resolution flag at the project level.

Starting 7992dc9, this plugin, when run with sbt 0.13.8 or sbt 1.2.5+,
relies on cached-resolution-backed reports for projects that have
the engine enabled via `updateOptions`. Other 1.x releases are not
directly impacted as sbt had a buggy implementation of the feature
anyway, see https://github.com/sbt/sbt/issues/3761.

Cached resolution has the side effect of generating an ivy report
with artificial module descriptors which makes it hard to reconstruct
the tree without inlining sbt internals (see below), so this
effectively ignores it *for the purpose of the tree generation*, even
if the project enabled it for the regular report.

ModuleId(
  org.scala-sbt.temp,
  temp-resolve-e2a956132f02c038285b41b374c02f5838076f37,
  1.0
)

https://github.com/sbt/librarymanagement/blob/984de6f/ivy/src/main/scala/sbt/internal/librarymanagement/ivyint/CachedResolutionResolveEngine.scala#L137
2019-09-07 14:03:56 +02:00
Ethan Atkins 946cbfe2b4
Merge pull request #5054 from eatkins/watch-deprecations
Update deprecation warnings for api changes
2019-09-06 12:55:12 -07:00
Ethan Atkins 955547e5bd Update deprecation warnings for api changes
During refactoring, these warnings got out of date. I also added
scaladoc to the watchTriggeredMessage key.

Ref: https://github.com/sbt/sbt/issues/5051.
2019-09-06 12:10:59 -07:00
Ethan Atkins 1e25bc917c
Merge pull request #5027 from eatkins/1.3.x-merge
1.3.x merge
2019-09-05 12:35:51 -07:00
Ethan Atkins a82e7892ab Bump sbt version 2019-09-05 11:46:23 -07:00
Ethan Atkins 58b3d970d0 Merge remote-tracking branch 'origin/1.3.x' into 1.3.x-merge 2019-09-05 11:44:24 -07:00
Josh Soref c9d5cbe808 https://www.scala-sbt.org 2019-09-05 14:11:13 -04:00
Josh Soref d4cad80bc3 https://www.scala-lang.org 2019-09-05 14:11:10 -04:00
Josh Soref 5579727148 https://www.jsonrpc.org 2019-09-05 14:11:09 -04:00
Josh Soref 746405c936 https://www.apple.com 2019-09-05 14:11:07 -04:00
Josh Soref 931a2f003b https://stackoverflow.com 2019-09-05 14:11:06 -04:00
Josh Soref a348a0f849 https://jsoup.org 2019-09-05 14:11:05 -04:00
Josh Soref 5408c1021e https://github.com 2019-09-05 14:11:04 -04:00
Josh Soref 52105ab62c https://docs.scala-lang.org 2019-09-05 14:11:02 -04:00
Josh Soref 5ab94fa2ac https://developer.lightbend.com 2019-09-05 14:11:01 -04:00
Josh Soref 747416173a https://apocalisp.wordpress.com 2019-09-05 14:10:59 -04:00
Ethan Atkins a0dc3fc06a Bump sbt dogfood version 2019-09-05 10:20:24 -07:00
Ethan Atkins 7c2a1c858b 1.3.0
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJdbz/aAAoJEDeJDimNmiv6Am8IAKv23f6BPIWZFeokzJLkUt8v
 DDLyzIwzE0hTFKInCNhGDCFtACFFgoD8/7t9D5gmLttQr4F9ke94DqWBEP3kbgan
 Qb4rR8uwglPUJmOhzBj2Qs3A8fAXdg3wm/6OlllQzBwCYNxFf3MhmJc3hF4vd+jO
 93JqwbY50entqha9z299+NpLPTKWtVC5R+1pAF+LwObjLOYqlxiGvAcl7jWx1qte
 VN+BabBYT4Hw43kJCutglHu8vttG68m+fqYGxjAmZXYBAbn0NPyE7GHmqkQ5baAz
 DUbc0vU2nY6tpUFNlNfu9PTPnRwHdSjSJTa9Ug7hw24z2oTg2tapNDXIpt6n6ZA=
 =onwH
 -----END PGP SIGNATURE-----

Merge tag 'v1.3.0' into 1.3.x-merge

1.3.0
2019-09-05 10:15:41 -07:00
eugene yokota 7cd29cda7b
Merge pull request #5029 from eed3si9n/wip/1.3.0
sbt 1.3.0
2019-09-04 13:28:48 -04:00
Eugene Yokota 665eb8f870 sbt 1.3.0 2019-09-04 01:24:08 -04:00
eugene yokota fbfceb5ded
Merge pull request #5028 from eed3si9n/wip/bump
bump io, lm, and zinc to 1.3.0
2019-09-04 00:36:21 -04:00
Eugene Yokota fa3a09368e bump io, lm, and zinc to 1.3.0 2019-09-03 23:51:13 -04:00
eugene yokota be1163b672
Merge pull request #5025 from eatkins/supershell-appender
Improve supershell appender management
2019-09-03 19:25:09 -04:00
Ethan Atkins 7c31e03d27 Improve supershell appender management
To avoid reliance on jvm global variables, we need to share the super
shell state with each of the console appenders that write to the console
out. We only set the progress state for the console appenders for the
screen. This prevents messages that are below the global logging level
from modifying the progress state without preventing them from being
written to other appenders.

The ability to set the ProgressState for each of the console appenders
is added in a companion util PR.

I verified that the test output of io/test was correctly written to the
streams after this change (there were no progress lines in the output).
2019-09-03 15:22:34 -07:00
eugene yokota 2086d3be5a
Merge pull request #218 from eatkins/rework-supershell-interlacing
Fix supershell position bug
2019-09-03 17:12:05 -04:00
eugene yokota aad5aa39e0
Merge pull request #219 from eed3si9n/wip/bumpio
IO 1.3.0
2019-09-03 16:44:28 -04:00
Ethan Atkins f20b275045 Fix supershell position bug
The previous implementation of supershell log line interlacing with
regular line interlacing relied on state in a global object. A somewhat
better approach is for each appender to hold a reference to a state
object. Every time tasks run, new appenders are created, so the state
should always reflect the current progress state.
2019-09-03 13:07:51 -07:00
Eugene Yokota 1aef82aedb IO 1.3.0 2019-09-03 16:00:50 -04:00
eugene yokota 4f2ffe9b36
Merge pull request #5018 from eatkins/output-file-stamp-cache
Use managedFileStampCache for dependency classpath
2019-09-02 23:17:27 -04:00
eugene yokota 26293640c6
Merge pull request #5022 from eatkins/supershell-no-color
Allow supershell in no color mode
2019-09-02 23:15:52 -04:00