Commit Graph

11744 Commits

Author SHA1 Message Date
eugene yokota 7a51eda367
Merge pull request #286 from er1c/man
Update sbt.1 man page options
2019-09-23 12:37:02 -04:00
Eric Peters 7e17407cba Update sbt.1 man page options 2019-09-23 08:30:51 -07:00
eugene yokota ccecf1e412
Merge pull request #5096 from eatkins/background-classloading
Preload a number of classes in the background
2019-09-22 23:58:28 -04:00
eugene yokota e0f7a421b7
Merge pull request #284 from eed3si9n/wip/ci
Remove Travis CI customization
2019-09-22 19:20:03 -04:00
Eugene Yokota 4dc6bb788e check that Linux output doesn't contain any junk 2019-09-22 19:04:03 -04:00
Eugene Yokota 0a09fa62ed SBT_ETC_FILE
Travis CI adds `/etc/sbt/sbtopts` that prevents us from testing the out-of-box behavior. This allows us to override the location.
2019-09-22 18:07:28 -04:00
Eugene Yokota 7636a47c94 Ignore upload cookies 2019-09-22 15:50:31 -04:00
Eugene Yokota 261ddc3c38 Remove appveyor setting 2019-09-22 15:50:18 -04:00
Ethan Atkins d53eabf9a6
Merge pull request #5109 from eatkins/meta-build-sources
Fix checkbuild sources for projects with meta-meta-build
2019-09-21 12:25:59 -07:00
Ethan Atkins bb0fd5c84c Fix checkbuild sources for projects with meta-meta-build
If a project had a meta-meta build (project/project), the build sources
in the project directory were ignored. This was because the projectGlobs
method did not correctly handle recursion. It inadvertently
discarded the accumulator globs and only returned the most recently
generated globs. This commit fixes that and adds a regression test to
the nio/reload scripted test.
2019-09-21 10:44:00 -07:00
eugene yokota 95813bd819
Merge pull request #283 from eed3si9n/wip/vfix
Fix -v getting on all the time
2019-09-20 12:49:00 -04:00
Eugene Yokota 989136debf Fix -v getting on all the time
Fixes https://github.com/sbt/sbt/issues/5108

I messed up in 91b71b39d3 by initializing the variable to 0.
2019-09-20 10:36:16 -04:00
eugene yokota 577cdb856d
Merge pull request #282 from eed3si9n/wip/gc
Drop -XX:+UseParallelGC
2019-09-19 16:15:11 -04:00
Ethan Atkins b03580fd81
Merge branch 'develop' into background-classloading 2019-09-19 12:00:39 -07:00
eugene yokota d07c2b4520
Merge pull request #5102 from eed3si9n/wip/appveyor
Drop Visual Studio 2015 testing
2019-09-19 13:39:39 -04:00
Eugene Yokota ee0310f7d3 Drop Visual Studio 2015 testing 2019-09-19 13:37:11 -04:00
Ethan Atkins d966c40917 Preload a number of classes in the background
I was looking into sbt start up time and in profiling was able to
identify a number of classloading bottlenecks. To speed up
initialization, we can preload those classes in the background. I saw
average speedups of roughly .75 seconds after this change. Also, the `time`
command would consistently report cpu system time very close to 400% and
I have 4 cores on my laptop. With 1.3.0 it would be more like 350%.
2019-09-19 09:41:50 -07:00
eugene yokota 29ea7ee6fc
Merge pull request #5094 from eed3si9n/wip/meta_resolvers
add includePluginResolvers
2019-09-19 12:41:20 -04:00
Ethan Atkins 39c1349164
Merge pull request #5083 from eatkins/zombie-classloaders
Allow classloaders to be used after close
2019-09-19 08:38:03 -07:00
Ethan Atkins c2dc22f7dc Make allowZombieClassLoaders public
For forward binary compatibility in the 1.3.x series, this key needed to
be private[sbt], but we can make it public in 1.4.x.
2019-09-18 19:27:27 -07:00
Ethan Atkins 231d7966d0 Add the ability to resurrect closed classloaders
There have been a number of complaints about the new classloader closing
behavior. It is too aggressive about closing classloaders after test and
run. This commit softens the behavior by allowing a classloader to be
resurrected after close by creating a new zombie classloader that has
the same urls as the original classloader. After this commit, we always
close the classloaders when we are done, but they can still leak
file descriptors if a zombie is created.

To configure the behavior, I add the allowZombieClassLoaders key. If it
is false (which is default), we will warn but still allow them. If it
is true, then we silence the warning. In a later version of sbt, we can
change the semantics to be strict.

I verified after this change that I could add a shutdown hook in `run`
and it would be evaluated so long as I set `bgCopyClasspath := false`.
Otherwise the needed jars were deleted before the hooks could run.

Bonus: delete unused ResourceLoaderImpl class
2019-09-18 19:26:11 -07:00
eugene yokota 6fc614bb46
Merge pull request #222 from eatkins/sbt-bump
Bump sbt version to 1.3.0
2019-09-18 22:14:49 -04:00
eugene yokota 3f20cc1583
Merge pull request #221 from eatkins/lazy-success-event-tag
Load SuccessEventTag lazily
2019-09-18 22:14:28 -04:00
Ethan Atkins 46eaa564d5 Add 1.3.0 to mima 2019-09-18 19:12:48 -07:00
Ethan Atkins 9c445896cf Bump sbt version to 1.3.0 2019-09-18 15:34:30 -07:00
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 91a639ff77 Drop -XX:+UseParallelGC
Fixes https://github.com/sbt/sbt/issues/5045

Currently we set `-XX:+UseParallelGC` for JDK greater than 9. This isn't a great default because while the peak throughput is somewhat better than the default g1 collector, the worst case performance is really bad with UseParallelGC, especially when the heap size is large.

Given the sudden diversification of JDK implementations, we should stay clear from `-XX` flags, and let the build users add them if they must.
2019-09-17 23:32:06 -04: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 6db0ec1a12
Merge pull request #281 from anilkumarmyla/fix_double_dashes
Capture double dashes in process args
2019-09-14 14:45:42 -04:00
Anil Kumar Myla 8affb84ff7
Add integration tests 2019-09-13 23:11:48 -07:00
Anil Kumar Myla 2946025d75
Capture double dashes in process args 2019-09-13 19:56:39 -07:00
eugene yokota b24ec386ab
Merge pull request #280 from kingslef/fix/java-args-with-spaces
universal/bin/sbt: enclose arrays in quotes
2019-09-13 09:50:01 -04:00
Tuomas Lappeteläinen 5165b9fd51 universal/bin/sbt: enclose arrays in quotes
Fixes https://github.com/sbt/sbt/issues/5076. Arrays should be enclosed in
quotes, or otherwise elements with spaces will be broken, e.g. `-Dfoobar="foo
bar"` will become `-Dfoobar=foo` and `bar`.
2019-09-13 12:19:39 +03: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