Commit Graph

2021 Commits

Author SHA1 Message Date
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 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
Eugene Yokota 28e90ea09b Merge branch '1.1.x' into wip/merge-1.1.x 2018-04-29 14:31:30 -04:00
Seth Tisue 4477a42b5a upgrade Scala 2.12.4 -> 2.12.6
I have no specific user-visible benefit in mind other than fewer
JARs to download for people who are on current versions of things
2018-04-27 23:20:51 -04:00
Ethan Atkins 0de8345e33 Remove watch loops
When source generators write into the unmanaged source directory, bad
things can happen. Continuous builds will loop indefinitely and
compiling will fail because the generated sources get added to the
source list twice, causing the incremental compiler to complain about
compiling classes it has already seen. My two-pronged solution is to
de-duplicate the sources task and to filter out managed source files in
watch sources. The drawback to the latter is that it causes the source
generation task to be executed twice per compile.
2018-04-27 14:42:37 -07:00
Dale Wijnand a0e27c719c
Cleanup Resolve 2018-04-24 16:30:56 +01:00
Dale Wijnand 8f4b8abb7b
Run scalafmt & test:scalafmt 2018-04-24 16:12:10 +01:00
Ethan Atkins 754385125a Use new EventMonitor in executeContinuously
In https://github.com/sbt/io/pull/142, I add a new api for watching for
source file events. This commit updates sbt to use the new EventMonitor
based api. The EventMonitor has an anti-entropy parameter, so that
multiple events on the same file in a short window of time do not
trigger a build. I add a key to tune it.

The implementation of executeContinuously is pretty similar. The main
changes are that shouldTerminate now blocks (EventMonitor spins up a
thread to check the termination condition) and that the
EventMonitor.watch method only returns a Boolean. This is because
the event monitor contains mutable state. It does, however, have a
state() method that returns an immutable snapshot of the state.
2018-04-23 10:02:29 -07:00
Dale Wijnand a2af3bff15
Merge pull request #4098 from eatkins/filter
Exclude directories instead of including files
2018-04-23 08:15:11 +01:00
Dale Wijnand ccf938c786
Switch to varargs inThisBuild (+friends) 2018-04-19 22:34:52 +01:00
Dale Wijnand f459b218c4
Switch inThisBuild (+friends) to use varargs SettingsDefinition 2018-04-19 22:34:32 +01:00
Ethan Atkins 2bb717dbf9 Exclude directories instead of including files
The existing filter caused SourceModificationWatch.watch to ignore
deleted files because !file.exists implies !file.isFile. The intention
of the filter was to exclude directories that had a name ending in
".scala".
2018-04-13 11:36:40 -07:00
Alexey Alekhin a1e3146c08
Don't use initialize request id for the internal collectAnalyses call 2018-04-12 19:47:32 +02:00
Dale Wijnand 4fc45e0155
Merge pull request #4056 from BennyHill/fix/3042
Introduce CompositeProject
2018-04-09 11:30:17 +01:00
Nafer Sanabria 3e201cee4d Add lastGrep command 2018-04-08 10:56:25 -05:00
Alistair Johnson b0ad1a44c0 Remove projects parameter from CompositeProject.expand 2018-04-07 15:56:31 +02:00
Alistair Johnson 6cce4f6fd9 Remove duplicate Projects 2018-04-07 01:26:40 +02:00
Alistair Johnson 68c005e4b5 Ensure precedence of top level Projects over ComponentProjects 2018-04-07 01:04:45 +02:00