Using a recursive Source meant that ~ looked into target. If you have
any source generators and use ~ with anything the invokes them, like
~compile, that means that the act of generating sources triggers ~ to
re-execute compile (perhaps only on macOS where the NIO WatchService
just polls, after an initial delay).
Requires sbt/io#78
Fixes#3501
Ref https://github.com/sbt/ivy/pull/26
Ref sbt/launcher#38
JDK 9 complains when java.lang.reflect.Field#setAccessible is called. So on
JDK 9 to get the default Authenticator on JDK you can just call
Authenticator.getDefault(). However ivy targets JDK 6..
So on JDK < 9 we do what we've always done, and on JDK 9+ we use java
reflection to call Authenticator.getDefault(), which is public and doesn't
require setAccessible(true).
1. ascii-graphs
We need a 2.12 version of ascii-graphs. The last commit to the project is in June 2013 (https://github.com/mdr/ascii-graphs/graphs/contributors). We are now in October 2017. I opened a PR (https://github.com/mdr/ascii-graphs/pull/11) but I don't expect any progress on this front. We can maintain a fork or drop ascii-graphs.
2. ignoreMissingUpdate
ignoreMissingUpdate is a tricky one. Here is some explanation:
we need to duplicate the updateTask
in sbt it's define as:
```scala
def updateTask: Initialize[Task[UpdateReport]] = Def.task {
// ...
val uc0 = updateConfiguration.value
// ...
}
```
since it's not scoped to our task (ex: `updateConfiguration in ignoreMissingUpdate`) we cannot just do
```scala
updateConfiguration in ignoreMissingUpdate := {
updateConfiguration.value.withMissingOk(true)
}
```
For example, the following example yield `"u2: false"
```
val update2 = TaskKey[Unit]("update2", "...")
val update2Configuration = SettingKey[Boolean]("...")
update2 := Def.task {
val u2 = (update2Configuration in update2).value
println(s"u2: $u2")
}.value
update2Configuration := false
update2Configuration in update2 := true
```
3. cross publishing
We can use the ^ operator to publish. For example: `sbt "^ publish"` to publish for both sbt 0.13 and 1.0.
* Update homebrew installation command
The command to install via homebrew didn't work for me. Presumably this changed in a recent version of homebrew.
This is the error I received:
```
$ brew install coursier/formulas/coursier
Error: coursier/formulas/coursier is a head-only formula
Install with `brew install --HEAD coursier/formulas/coursier`
```
So this change just incorporates the fix it suggests, which works for me.
* Fix other brew command, and report things to doc/README.md
JDK 9 complains when java.lang.reflect.Field#setAccessible is called.
So on JDK 9 to get the default Authenticator on JDK you can just call
Authenticator.getDefault(). However lm targets JDK 8..
So on JDK 8 we do what we've always done, and on JDK 9 we use java
reflection to call Authenticator.getDefault(), which is public and
doesn't require setAccessible(true).
Fixes#169
This adds a sbt.watch.mode system property that if set to 'polling' will
use PollingWatchService instead of WatchServiceAdapter (nio).
On macOS this will default to 'polling' and on all others 'nio'.
This is a temporary workaround for users affected by #3527