Commit Graph

1056 Commits

Author SHA1 Message Date
Guillaume Martres 7eab02fff3 Add scalaCompilerBridgeBinaryJar task
The end goal is to rewrite Dotty's compiler-bridge in Java (this is easy
since the zinc-specific phases are in the compiler itself) to simplify
the bootstrapping process.
2018-09-13 16:13:45 -04:00
Guillaume Martres 0dc3f39ab2 Fix second part of #4091: server responses should not be broadcasted
Change CommandExchange#publishEvent to not broadcast ExecStatusEvent and
instead check the channelName, this matches what was already done in
CommandExchange#publishEventMessage
2018-09-05 18:34:03 +02:00
Eugene Yokota 590dc5e96d Merge branch '1.2.x' into wip/merge-1.2.x 2018-08-16 16:15:15 -04:00
eugene yokota f8beb5fcce
Merge pull request #4323 from jastice/dont-warn-version-override
don't warn when current sbt version doesn't match version in build.properties
2018-08-16 16:05:17 -04:00
Justin Kaeser a50e351c58 don't warn when current sbt version doesn't match version in build.properties when version is set by system property.
mitigates https://github.com/sbt/sbt/issues/4303
2018-08-16 18:01:54 +03:00
eugene yokota bb8bd7b0ca
Merge pull request #4308 from seratch/fix-typos
Fix the several typos detected by github.com/client9/misspell
2018-08-15 10:51:03 -04:00
Kazuhiro Sera 59dbc0645e Fix the several typos detected by github.com/client9/misspell 2018-08-08 15:57:34 +09:00
eugene yokota 1ebc1a7bfc
Merge pull request #4302 from eed3si9n/wip/remove-configuration-warning
Remove warnings about configuration
2018-08-06 08:34:05 -04:00
Eugene Yokota 780ca366d8 Remove warnings about configuration
Fixes #4293
Ref #4231, #4065

This fixes the regression on sbt 1.2.0 that displays a lot of warnings about configurations.

The warning was added in #4231 in an attempt to fix #4065. This actually highlights somewhat loose usage of configurations among the builds in the wild, and the limitation on the current slash syntax implementation.

I think we can remove this warning for now, and try to fix #4065 by making slash syntax more robust. In particular, we need to memorize the mapping between the configuration name and Scala identifier across the entire build, and use that in the shell.
2018-08-06 00:22:57 -04:00
Eugene Yokota 26c180e768 Revert "Switch inThisBuild (+friends) to use varargs SettingsDefinition"
This reverts commit f459b218c4.
2018-08-05 16:00:33 -04:00
Eugene Yokota eac7eef947 Revert "Switch to varargs inThisBuild (+friends)"
This reverts commit ccf938c786.
2018-08-05 15:44:37 -04:00
Philippus 15e6cdfd68
Set default maven configurations in pom configuration, fixes #1380 2018-08-05 09:25:33 +02:00
Eugene Platonov cc2159d565 add human readable total time 2018-07-21 15:56:48 -04:00
Eugene Yokota 1bf6f0d2a0 Make ++ fail when it doesn't affect any subprojects
Fixes #4267
2018-07-15 20:47:59 -04:00
eugene yokota c02bc2f9d1
Merge pull request #4264 from eed3si9n/wip/javacrossfix
Fixes contains bug
2018-07-14 03:13:05 -04:00
Eugene Yokota 439e67c8c4 Fixes contains bug
Ref https://github.com/scala/bug/issues/10831
Ref https://github.com/sbt/sbt/pull/4139#commitcomment-29633458
2018-07-14 01:05:14 -04:00
Eugene Yokota 5c2c8b262a sbt-giter8-resolver 0.11.0 2018-07-13 17:53:37 -04:00
Eugene Yokota b3342118f8 Add dependencyOverrides for scripted-plugin
Fixes #4249

This introduces an override rule into the metabuild so scripted-plugin will align with the sbt version.
2018-07-10 03:13:47 -04:00
xuwei-k f22809d152 correspond file names and class names, packages and directories 2018-07-09 14:41:44 +09:00
xuwei-k ae1fdff968 use SAM type 2018-07-09 13:06:34 +09:00
xuwei-k aa14656753 fix typo 2018-07-08 22:18:57 +09:00
Jason Zaugg c10ff305de Defer deprecation warn of last-grep/load-failed until they are used 2018-07-04 08:49:26 +10:00
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