Commit Graph

2037 Commits

Author SHA1 Message Date
eugene yokota 8692952e91
Merge pull request #4245 from raboof/selectLatestJavaVersion
Select most recent JDK
2018-07-03 12:29:47 -04:00
Arnout Engelen 46693548d7 Add missing copyright header 2018-07-03 15:50:57 +02:00
Arnout Engelen 57e3183b8d Discover jvm installed via Oracle Linux RPM's 2018-07-03 15:29:31 +02:00
Arnout Engelen 7630ed8201 Select most recent jdk
When multiple jdk minor/patch versions are available, select the most
recent one.
2018-07-03 11:06:04 +02:00
eugene yokota 773d35dadd
Merge pull request #4231 from steinybot/fix/3432
Add warning for unknown configurations
2018-06-27 20:59:43 -04:00
eugene yokota b0e025915a
Merge pull request #4227 from eed3si9n/wip/thin
Implement thin client
2018-06-27 15:27:42 -04:00
Eugene Yokota 3b7e6974c3 Fixes stacktrace of backgroun run
Ref https://github.com/sbt/sbt/issues/4121

sbt already has the facility to trim stack traces. This sets the trace level of the background run, which fixes the upper half of the `run` stacktrace.

```
[error] (run-main-0) java.lang.Exception
[error] java.lang.Exception
[error] 	at Hello$.delayedEndpoint$Hello$1(Hello.scala:5)
[error] 	at Hello$delayedInit$body.apply(Hello.scala:1)
[error] 	at scala.Function0.apply$mcV$sp(Function0.scala:34)
[error] 	at scala.Function0.apply$mcV$sp$(Function0.scala:34)
[error] 	at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
[error] 	at scala.App.$anonfun$main$1$adapted(App.scala:76)
[error] 	at scala.collection.immutable.List.foreach(List.scala:389)
[error] 	at scala.App.main(App.scala:76)
[error] 	at scala.App.main$(App.scala:74)
[error] 	at Hello$.main(Hello.scala:1)
[error] 	at Hello.main(Hello.scala)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] 	at java.lang.reflect.Method.invoke(Method.java:498)
[error] java.lang.RuntimeException: Nonzero exit code: 1
[error] 	at sbt.Run$.executeTrapExit(Run.scala:127)
[error] 	at sbt.Run.run(Run.scala:77)
[error] 	at sbt.Defaults$.$anonfun$bgRunTask$5(Defaults.scala:1254)
[error] 	at sbt.Defaults$.$anonfun$bgRunTask$5$adapted(Defaults.scala:1249)
[error] 	at sbt.internal.BackgroundThreadPool.$anonfun$run$1(DefaultBackgroundJobService.scala:377)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
[error] 	at scala.util.Try$.apply(Try.scala:209)
[error] 	at sbt.internal.BackgroundThreadPool$BackgroundRunnable.run(DefaultBackgroundJobService.scala:299)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:748)
[error] (Compile / run) Nonzero exit code: 1
```

The bottom half requires a similar fix to the foreground log.
2018-06-27 06:26:38 -04:00
Jason Pickens c9aa0c5285 Add warning for unknown project configurations. 2018-06-27 18:25:10 +12:00
Eugene Yokota f3038167a5 Fork server if it's not running
Fixes https://github.com/sbt/sbt/issues/3508

This forks an instance of sbt in the background when it's not running already.

```
$ time sbt -client compile
Getting org.scala-sbt sbt 1.2.0-SNAPSHOT  (this may take some time)...
:: retrieving :: org.scala-sbt#boot-app
	confs: [default]
	79 artifacts copied, 0 already retrieved (28214kB/130ms)
[info] entering *experimental* thin client - BEEP WHIRR
[info] server was not detected. starting an instance
[info] waiting for the server...
[info] waiting for the server...
[info] server found
> compile
[success] completed
sbt -client compile  9.25s user 2.39s system 33% cpu 34.893 total
$ time sbt -client compile
[info] entering *experimental* thin client - BEEP WHIRR
> compile
[success] completed
sbt -client compile  3.55s user 1.68s system 107% cpu 4.889 total
```
2018-06-25 22:37:22 -04:00
Eugene Yokota 1a1f530985 implement -client option 2018-06-25 22:26:13 -04:00
Guillaume Poirier 59465d9e1f Adding minimal support for commands in inspect
There's also a special case for aliases that will try to resolve
the target of the alias to a task key if possible and display the
output of that key if found.

see https://github.com/sbt/sbt/issues/2881
2018-06-22 09:04:56 -04:00
eugene yokota a34f76bab7
Merge pull request #4220 from regadas/issue/630
Add alternative scripted filenames
2018-06-19 22:03:18 -04:00
Filipe Regadas 0fb07a861b Add alternative scripted filenames 2018-06-19 14:59:04 -04:00
Anthony Garo d62a7465ae Addresses #4206 2018-06-19 11:55:57 -04:00
eugene yokota 6fbb7f055a
Merge pull request #4211 from eed3si9n/wip/loadplugin
addPluginSbtFile command
2018-06-18 22:35:08 -04:00
Eugene Yokota 932f911483 addPluginSbtFile command
Fixes https://github.com/sbt/sbt/issues/1502

This adds `--addPluginSbtFile=<file>` command, which adds the given .sbt file to the plugin build.
Using this mechanism editors or IDEs can start a build with required plugin.

```
$ cat /tmp/extra.sbt
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.7")

$ sbt --addPluginSbtFile=/tmp/extra.sbt
...
sbt:helloworld> plugins
In file:/xxxx/hellotest/
  ...
  sbtassembly.AssemblyPlugin: enabled in root
```
2018-06-18 01:50:36 -04:00
Eugene Yokota b3bcb3f47d Open up setPlugins to private[sbt]
This would make it easier for projectMatrix to be a plugin.
2018-06-18 00:36:43 -04:00
eugene yokota f3618c74b6
Merge pull request #4205 from sbt/1.1.x
Merge 1.1.x
2018-06-15 15:33:02 -04:00
Eugene Yokota e3c9eb0cd9 Remove the shutdown hook when it's done 2018-06-14 05:12:36 -04:00
eugene yokota 9b8648519f
Merge pull request #4198 from eed3si9n/wip/offline-props
-Dsbt.offline sets offline setting
2018-06-14 01:09:32 -04:00
Eugene Yokota 7b6ae46116 -Dsbt.offline sets offline setting
Fixes #771
2018-06-13 03:52:21 -04:00
eugene yokota 54ad0d865e
Merge branch '1.x' into sort-and-indent-plugins-output 2018-06-13 03:21:02 -04:00
Eugene Yokota 86427c7ce7 Merge branch '1.1.x' into wip/merge-1.1.x 2018-06-12 23:33:47 -04:00
veera venky e465aee36a Fix for #4191 (active.json should be removed on JVM shutdown)
Added a shutdown hook to clean up active.json file
2018-06-13 03:06:30 +05:30
Mark Canlas 5fd774693c sort and indent about plugins output 2018-06-09 01:31:45 -04:00
Ethan Atkins 27e93601b5 Add warning for slow hostname lookups on OS X
I spent a lot of time debugging why it took 5 seconds to run tests each
time. It turns out that if the hostname is not set explicitly on os x,
then getaddrinfo takes 5 seconds to try (and fail) to resolve the dns
entry for the localhostname. This is easily fixed by setting the
hostname, but it is not at all easy to figure out that a slow hostname
lookup is the reason why tests are slow to start.

I don't know if this is a common issue on other platforms, so only issue
the warning on OS X.
2018-06-06 10:53:46 -07:00
Eugene Yokota 9b7c224f93 use stringly-typed key so we can define it machine-wide 2018-05-30 00:59:12 -04:00
Eugene Yokota a7d85c8724 Formatting 2018-05-30 00:16:27 -04:00
Eugene Yokota 35e98f51fd Adjust to upstream change 2018-05-30 00:16:27 -04:00
Eugene Yokota 2da1aa61eb implement cross JDK forking
```
sbt:helloworld> java++ 10
[info] Reapplying settings...
sbt:helloworld> run
[info] Running (fork) Hello
[info] 10.0.1

sbt:helloworld> java++ 8
[info] Reapplying settings...

sbt:helloworld> run
[info] Running (fork) Hello
[info] 1.8.0_171
```
2018-05-30 00:16:27 -04:00
Eugene Yokota aff9e0110c Accept both 1.x and x for 1.1 to 1.8 2018-05-30 00:16:27 -04:00
Martynas Mickevičius c31583e4f8 Discovery of java homes 2018-05-30 00:16:27 -04:00
Antonio Cunei f2a7e1f1c3 Fix for #4148 (SessionSettingsSpec intermittently fails)
It turns out that `syntaxAnalyzer.UnitParser()` in global now also
needs to be synchronized. The alternative is adding `synchronizeNames = true`
in the global constructor, but that already proved unreliable in the
case of #3743 (see comment https://github.com/sbt/sbt/issues/3170#issuecomment-355218833)
2018-05-28 14:09:13 +02:00
eugene yokota 7e8e18b9fa
Merge pull request #4099 from eatkins/redundant
Handle managedSources writing into unmanaged source directories
2018-05-27 23:57:46 -04:00
alodavi 67efea6248 [alodavi/improving_loading_settings_messaging] logging file and project name instead of only file name 2018-05-23 17:20:41 +02:00
Aloisia Davì 9b5f44f1ea
Merge branch '1.x' into alodavi/improving_loading_settings_messaging 2018-05-23 17:08:50 +02:00
Dale Wijnand ab35c21c98
Drop deprecated write-sbt-version & notify-users-about-shell
Introduced in https://github.com/sbt/sbt/pull/4169, these commands
aren't "user-facing" and are quite new. So no need to keep the old kebab
syntax.
2018-05-21 17:24:38 +01:00
tiqwab b7c9862f16 Fix kebab-case commands: notify-users-about-shell, write-sbt-version 2018-05-19 18:31:20 +09:00
Aloisia Davì 145da16c7f
Merge branch '1.x' into alodavi/improving_loading_settings_messaging 2018-05-15 14:53:00 +02:00
Øyvind Høisæther 667a6be99e Show all lines when running help <task>, but only first line when listing tasks 2018-05-15 14:33:24 +02:00
alodavi b30159aded [alodavi/improving_loading_settings_messaging] logging the path instead of just the name 2018-05-15 14:06:50 +02:00
Øyvind Høisæther 34cc8cd273 Only use first line for multiline descriptions 2018-05-15 13:42:41 +02:00
Alexander Samsig 7dfe6097fb Removed Load and LoadCommand since they are no longer in use.
Changed add-defaults-commands directly since it is only used internally.
Added deprecation warning for LoadFailed and LastGrep.
2018-05-15 12:44:17 +02:00
Eugene Yokota 90931857c3 Merge branch 'pr/4096' into wip/bumpzinc 2018-05-05 04:58:19 -04:00
Eugene Yokota 094c2c602d Formatting 2018-05-05 04:57:14 -04:00
Eugene Yokota 8409735077 Merge branch '1.1.x' into wip/merge-1.1.x 2018-05-04 12:40:43 -04:00
Liu Fengyun 1057dcd291 update deprecated message 2018-05-04 17:10:50 +02:00
Liu Fengyun 50f2ebce88 overload autoPlugins for binary compatibility 2018-05-04 17:00:25 +02:00
Liu Fengyun ecbfdfef25 fix compilation error 2018-05-03 22:36:17 +02:00
liu fengyun 5d63035a27 Fix #4073: support detect dotty plugins 2018-05-03 22:29:34 +02:00