Commit Graph

7569 Commits

Author SHA1 Message Date
Eugene Yokota 155cd057c0 Unidoc 2019-11-23 15:11:28 -05:00
eugene yokota 413994d3b4
Merge pull request #5241 from eed3si9n/bport/coursierbump
[1.3.x] lm-coursier-shaded 2.0.0-RC5-2
2019-11-22 15:46:18 -05:00
Eugene Yokota 1dd4c70c10 mima 2019-11-22 14:56:33 -05:00
Eugene Yokota 1e845746a0 lm-coursier-shaded 2.0.0-RC5-2
Fixes #5132
Fixes #4706
Fixes #4688
2019-11-22 14:56:24 -05:00
eugene yokota e03c62ff16
Merge pull request #5239 from eed3si9n/bport/load
[1.3.x] backport some fixes
2019-11-22 14:31:37 -05:00
Samvel Abrahamyan fa1aad602e Sleep the current thread when we need to retry background job shutdown 2019-11-22 13:28:16 -05:00
Frank S. Thomas 8860cf4cfd Include description and homepage in ivy.xml files
This PR includes the values of the `description` and `homepage`
settings into the `ivy.xml` files generated by the `makeIvyXml`
task. It restores the behaviour of sbt 1.2.8 and if `useCoursier`
is set to `false`.

Two things are changed in this PR:
 * `IvyXml.content` now adds the `homepage` attribute to the
   `description` element if `project.info.homePage` is not empty.
 * `CoursierInputsTasks.coursierProject0` now fills the previous
   empty `CProject.info` field with the description and homepage.

Closes: #5234
2019-11-22 13:03:30 -05:00
Eugene Yokota fc3a0ff036 addPluginSbtFile command fixes
Ref #4211
Fixes #4395
Fixes #4600

This is a reimplementation of `--addPluginSbtFile`. #4211 implemented the command to load extra `*.sbt` files as part of the global plugin subproject. That had the unwanted side effects of not working when `.sbt/1.0/plugins` directory does not exist. This changes the strategy to load the `*.sbt` files as part of the meta build.

```
$ sbt -Dsbt.global.base=/tmp/hello/global --addPluginSbtFile=/tmp/plugins/plugin.sbt
[info] Loading settings for project hello-build from plugin.sbt ...
[info] Loading project definition from /private/tmp/hello/project
sbt:hello> plugins
In file:/private/tmp/hello/
	sbt.plugins.IvyPlugin: enabled in root
	sbt.plugins.JvmPlugin: enabled in root
	sbt.plugins.CorePlugin: enabled in root
	sbt.ScriptedPlugin
	sbt.plugins.SbtPlugin
	sbt.plugins.SemanticdbPlugin: enabled in root
	sbt.plugins.JUnitXmlReportPlugin: enabled in root
	sbt.plugins.Giter8TemplatePlugin: enabled in root
	sbtvimquit.VimquitPlugin: enabled in root
```
2019-11-22 12:26:33 -05:00
Dale Wijnand 0aa6b12e0f Cleanup Load.loadTransitive
The largest win is creating the helper, inner, "load" method.
2019-11-22 12:26:18 -05:00
eugene yokota 8ca7ef6901
Merge pull request #5205 from eed3si9n/bport/nohouse
[1.3.x] in-source sbt-houserules
2019-10-20 10:21:41 -04:00
Eugene Yokota 67c3a96538 sbt 1.3.3 2019-10-20 01:34:05 -04:00
Eugene Yokota 56fa678f3f in-source sbt-houserules 2019-10-20 01:31:45 -04:00
Filipe Regadas 71ae19a8c7 Fix MiMa 2019-10-20 01:31:26 -04:00
Filipe Regadas efd8dece58 Fix #5110: allow semanticdbVersion override 2019-10-20 01:30:52 -04:00
Filipe Regadas 68bb4344a1 Fix MiMa 2019-10-20 01:28:26 -04:00
Filipe Regadas 2e2dee90eb Fix librarymanagement project Id 2019-10-20 01:28:07 -04:00
Filipe Regadas 2bce551450 Add sbt-mima-plugin 2019-10-20 01:27:50 -04:00
eugene yokota 50f3acd4c8
Merge pull request #5183 from eed3si9n/wip/bump
[1.3.x] util 1.3.2, zinc 1.3.1
2019-10-14 01:15:01 -04:00
Eugene Yokota 738bd64630 util 1.3.2, zinc 1.3.1 2019-10-14 00:26:34 -04:00
eugene yokota 4d1a83a801
Merge pull request #5163 from eatkins/1.3.x-supershell-backports
[1.3.x] supershell backports
2019-10-12 12:03:12 -04:00
eugene yokota fa84bd2bbc
Merge pull request #5159 from eatkins/1.3.x-scripted-parser-backport
[1.3.x] scripted parser backport
2019-10-07 21:01:39 +02:00
Ethan Atkins e5cfa9ec7e Shutdown progress thread when there are no tasks
It is still possible for progress threads to leak so shut them down if
there are no active tasks. The report0 method will start up a new thread
if a task is added.
2019-10-07 11:58:10 -07:00
Ethan Atkins d5a4a35314 Use only one progress thread during task evaluation
In some circumstances, sbt would generate a number of task progress
threads that could run concurrently. The issue was that the TaskProgress
could be shared by multiple EvaluateTaskConfigs if a dynamic task was
used. This was problematic because when a dynamic task completed, it
might call afterAllCompleted which would stop the progress thread. There
also was a race condition because multiple threads calling initial could
theoretically have created a new progress thread which would cause a
resource leak.

To fix this, we modify the shared task progress so that the `stop()`
method is a no-op. This should prevent dynamic tasks from stopping the
progress thread. We also defer the creation of the task thread until
there is at least one active task. This prevents a thread from being
created in the shell.

The motivation for this change was that I found that sometimes there was
a leaked progress thread that would make the shell not really work for
me because the progress thread would overwrite the shell prompt. This
change fixes that behavior and I was able to validate with jstack that
there was consistently either one or zero task progress threads at a
time (zero in the shell, one when tasks were actually running).
2019-10-07 11:58:05 -07:00
Ethan Atkins 8ff0e133d3 Use logger rather than ConsoleOut for TaskTimings
When running sbt -Dtask.timings=true, the task timings get printed to
the console which can overwrite the shell prompt. When we use a logger,
the timing lines are correctly separated from the prompt lines.
2019-10-07 11:58:00 -07:00
Ethan Atkins 3ab5040bc7 Clear supershell lines before suppressed task
I noticed that when entering the console, I'd often be left with a
supershell line at the bottom of the screen that would eventually get
interlaced with my console commands. This can be eliminated by clearing
the supershell progress before evaluating the task if it is one of the
skip tasks.
2019-10-07 11:57:42 -07:00
eugene yokota 95e3c5c335
Merge pull request #5160 from eatkins/1.3.x-safe-clean-backport
[1.3.x] clean race condition backport
2019-10-07 20:55:43 +02:00
eugene yokota 32c2ca87d4
Merge pull request #5161 from eatkins/1.3.x-classes-bak-backport
1.3.x classes bak backport
2019-10-07 20:54:30 +02:00
Eugene Yokota 735a960cda Fixes "Could not create directory ...classes.bak"
Fixes https://github.com/sbt/sbt/issues/1673

There's been report of intermittent "Could not create directory" error related to "classes.bak." retronym identified that all configurations are using the same directory, and that might be the cause of race condition.
This addresses the issue by assigning a unique directory for each configuration.
2019-10-07 09:52:14 -07:00
Jason Zaugg 56bb6705d1 Reproducer for the symptoms described in #1673 2019-10-07 09:52:08 -07:00
Ethan Atkins 80e8897dc4 Clean ivy resolution cache before regular clean
The way clean was implemented, it was running `clean`, `ivyModule` and
`streams` concurrently. This was problematic because clean could blow
away files needed by `ivyModule` and `streams`. To fix this, move the
cleanCachedResolutionCache into a separate task and run that before the
normal clean.

Should fix https://github.com/sbt/sbt/issues/5067.
2019-10-07 09:49:11 -07:00
Ethan Atkins 2dc6f2d2d5 Limit scripted page numbers
The completions were generating page numbers that didn't make sense if
there were a small number of scripted tests. For example, suppose that
there were only two tests defined, it would generate *1of3 *2of3 and
*3of3 completions even though there weren't even three tests.
2019-10-07 09:46:45 -07:00
Ethan Atkins 851aef1d00 Fix scripted parser crash
In a local progress, I was able to induce a crash in tab completions
because the group key did not exist in pairMap.
2019-10-07 09:46:41 -07:00
Ethan Atkins 40a8119b41
Merge pull request #5149 from eatkins/parallel-backport
[1.3.x] backport parallel classloaders
2019-10-03 12:53:44 -07:00
Ethan Atkins 114c092697 Revert "mark dependency-management/default-resolvers pending"
This reverts commit b47ed4e62a.
2019-10-03 12:09:49 -07:00
Ethan Atkins d03e043e91 Bump travis java 8 version 2019-10-03 11:23:04 -07:00
Ethan Atkins 0b3b8a366c Use java to implement XMain classloaders
These classloaders which are created if sbt is launched with a legacy
launcher (or one that doesn't follow the current classloading hierarchy
convention), were implemented in scala, but that meant that they were
not parallel capable. I fix that by moving the implementations to java.
I also move the static method that creates a MetaBuildLoader into the
java class.
2019-10-03 11:22:51 -07:00
Ethan Atkins 22982a7cfd Make all test and run classloaders parallel capable
A number of users were reporting issues with deadlocking when using
1.3.2: https://github.com/sbt/sbt/issues/5116. This seems to be because
most of the sbt created classloaders were not actually parallel capable.
In order for a classloader to be registered as a parallel capable, ALL
of the parent classes except for object in the class hierarchy must be
registered as a parallel capable:
https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html#registerAsParallelCapable--.
If a classloader is not registered as parallel capable, then a global
lock will be used internally for classloading and this can lead to deadlock.

It is impossible to register a scala 2 classloader as parallel capable
so I ported all of the classloaders to java.

This commit updates the java-serialization scripted test. Prior to the
port, the new version of the test would more or less always deadlock.
After this change, I haven't been able to reproduce a deadlock.

This had no significant performance impact when I reran
https://github.com/eatkins/scala-build-watch-performance
2019-10-03 11:19:39 -07:00
eugene yokota f6991357f1
Merge pull request #5130 from eatkins/1.3.x-scalarun-classloader-close-backport
[1.3.x] Close classloader in ScalaRun.run
2019-09-24 21:04:33 -04:00
eugene yokota b6e1178f9b
Merge pull request #5129 from eatkins/1.3.x-progress-improvements-backport
[1.3.x] progress improvements backport
2019-09-24 18:36:59 -04:00
Ethan Atkins c9ca0ac03e Close classloader in ScalaRun.run
It is necessary to close the run classloader in order to reuse the
dependency layer in the next run. If the loader needs to survive past
the main method, as is the case with `run` and `runMain`, then the
runWithLoader api should be used instead.

This mostly restores the behavior of classloader closing to 1.3.0 for
the tasks that use ScalaRun except for `run` and `runMain`. But unlike
1.3.0, if the classloader is closed it can still spawn a zombie
classloader.

Fixes #5124.
2019-09-24 15:31:45 -07:00
Ethan Atkins 05372760c2 Filter out dummy tasks from progress
I don't think that dummy tasks really make sense for task progress
because they are evaluated outside of the normal task evaluation. This
came up because I was seeing streams-manager in supershell which didn't
seem useful.
2019-09-24 13:35:15 -07:00
Ethan Atkins 09c63e0804 Limit TaskProgress threads
I noticed some flickering in super shell progress lines and realized
that it was because there were multiple progress threads running
concurrently. This is problematic because each thread has a completely
different state so if each thread has an active task, the display will
flicker between the two tasks. I think this is caused primarily by
dynamic tasks. At least the example where I was seeing it was caused by
a dynamic task.
2019-09-24 13:35:08 -07:00
eugene yokota 3ba6fecc15
Merge pull request #5111 from eatkins/1.3.x-meta-build-backport
[1.3.x] meta build backport
2019-09-21 17:36:25 -04:00
Ethan Atkins bff3b354f6 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 12:26:57 -07:00
eugene yokota 3ca185fe30
Merge pull request #5106 from eed3si9n/wip/1.3.1
[1.3.x] clear banner + bump IO
2019-09-19 21:19:48 -04:00
Eugene Yokota 634a11ab4d io 1.3.1 2019-09-19 18:10:47 -04:00
Eugene Yokota 13a047dafe clear banner 2019-09-19 18:09:57 -04:00
eugene yokota 613e5b61cf
Merge pull request #5101 from eed3si9n/bport/meta_resolvers
[1.3.x] add includePluginResolvers
2019-09-19 14:25:42 -04:00
eugene yokota 581dad2505
Merge pull request #5103 from eed3si9n/bport/appveyor
[1.3.x] Drop Visual Studio 2015 testing
2019-09-19 13:43:45 -04:00
Eugene Yokota be9ff19a91 Drop Visual Studio 2015 testing 2019-09-19 13:41:36 -04:00