Commit Graph

148 Commits

Author SHA1 Message Date
Eugene Yokota 4be4017f06 Refactor ExecuteProgress type parameters 2018-10-02 08:24:17 -04:00
Eugene Yokota ea0fac1302 Refactor type parameter names 2018-09-25 12:02:42 -04:00
Eugene Yokota ef49a95b7d address more warnings 2018-09-18 17:45:24 -04:00
Eugene Yokota 4ff4f6e45e Update header 2018-09-14 04:53:36 -04:00
Eugene Yokota 28e90ea09b Merge branch '1.1.x' into wip/merge-1.1.x 2018-04-29 14:31:30 -04:00
Dale Wijnand 8f4b8abb7b
Run scalafmt & test:scalafmt 2018-04-24 16:12:10 +01:00
Dale Wijnand 120ab65134
Remove unused type param in Scaladoc 2018-04-03 17:15:27 +01:00
Dale Wijnand b78a0f667b
Catch RejectedExecutionException in CompletionService.submit 2018-04-03 16:05:56 +01:00
Dale Wijnand d48aa310e6
Catch RejectedExecutionException in Execute#runKeep 2018-04-03 16:02:52 +01:00
Jason Zaugg 70d3484896 Avoid printing RejectedExectionExeption stack trace after cancellation
Before:

```
[warn] /Users/jz/code/zinc/internal/zinc-apiinfo/src/main/scala/xsbt/api/Visit.scala:187:19: parameter value s in method visitString is never used
[warn]   def visitString(s: String): Unit = ()
[warn]                   ^
^C
[warn] Canceling execution...
[warn] 10 warnings found
[info] Compilation has been cancelled
[error] java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ExecutorCompletionService$QueueingFuture@33ec70dd rejected from java.util.concurrent.ThreadPoolExecutor@4b832de6[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1410]
[error]     at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2063)
[error]     at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:830)
[error]     at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1379)
[error]     at java.util.concurrent.ExecutorCompletionService.submit(ExecutorCompletionService.java:181)
[error]     at sbt.CompletionService$.submit(CompletionService.scala:36)
[error]     at sbt.ConcurrentRestrictions$$anon$4.submitValid(ConcurrentRestrictions.scala:176)
[error]     at sbt.ConcurrentRestrictions$$anon$4.submit(ConcurrentRestrictions.scala:165)
[error]     at sbt.Execute.submit(Execute.scala:262)
[error]     at sbt.Execute.ready(Execute.scala:242)
[error]     at sbt.Execute.notifyDone(Execute.scala:181)
[error]     at sbt.Execute.$anonfun$retire$2(Execute.scala:152)
[error]     at sbt.Execute.$anonfun$retire$2$adapted(Execute.scala:151)
[error]     at scala.collection.immutable.List.foreach(List.scala:389)
[error]     at sbt.Execute.retire(Execute.scala:151)
[error]     at sbt.Execute.$anonfun$work$2(Execute.scala:279)
[error]     at sbt.Execute$$anon$1.process(Execute.scala:24)
[error]     at sbt.Execute.next$1(Execute.scala:104)
[error]     at sbt.Execute.processAll(Execute.scala:107)
[error]     at sbt.Execute.runKeep(Execute.scala:84)
[error]     at sbt.EvaluateTask$.liftedTree1$1(EvaluateTask.scala:387)
[error]     at sbt.EvaluateTask$.run$1(EvaluateTask.scala:386)
[error]     at sbt.EvaluateTask$.runTask(EvaluateTask.scala:405)
[error]     at sbt.internal.Aggregation$.$anonfun$timedRun$4(Aggregation.scala:100)
[error]     at sbt.EvaluateTask$.withStreams(EvaluateTask.scala:331)
[error]     at sbt.internal.Aggregation$.timedRun(Aggregation.scala:98)
[error]     at sbt.internal.Aggregation$.runTasks(Aggregation.scala:111)
[error]     at sbt.internal.Aggregation$.$anonfun$applyTasks$1(Aggregation.scala:68)
[error]     at sbt.Command$.$anonfun$applyEffect$2(Command.scala:130)
[error]     at sbt.internal.Aggregation$.$anonfun$evaluatingParser$11(Aggregation.scala:220)
[error]     at sbt.internal.Act$.$anonfun$actParser0$3(Act.scala:387)
[error]     at sbt.MainLoop$.processCommand(MainLoop.scala:154)
[error]     at sbt.MainLoop$.$anonfun$next$2(MainLoop.scala:137)
[error]     at sbt.State$$anon$1.runCmd$1(State.scala:242)
[error]     at sbt.State$$anon$1.process(State.scala:248)
[error]     at sbt.MainLoop$.$anonfun$next$1(MainLoop.scala:137)
[error]     at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]     at sbt.MainLoop$.next(MainLoop.scala:137)
[error]     at sbt.MainLoop$.run(MainLoop.scala:130)
[error]     at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:108)
[error]     at sbt.io.Using.apply(Using.scala:22)
[error]     at sbt.MainLoop$.runWithNewLog(MainLoop.scala:102)
[error]     at sbt.MainLoop$.runAndClearLast(MainLoop.scala:58)
[error]     at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:43)
[error]     at sbt.MainLoop$.runLogged(MainLoop.scala:35)
[error]     at sbt.StandardMain$.runManaged(Main.scala:113)
[error]     at sbt.xMain.run(Main.scala:76)
[error]     at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error]     at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error]     at xsbt.boot.Launch$.run(Launch.scala:109)
[error]     at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error]     at xsbt.boot.Launch$.launch(Launch.scala:117)
[error]     at xsbt.boot.Launch$.apply(Launch.scala:18)
[error]     at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error]     at xsbt.boot.Boot$.main(Boot.scala:17)
[error]     at xsbt.boot.Boot.main(Boot.scala)
[error] java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ExecutorCompletionService$QueueingFuture@33ec70dd rejected from java.util.concurrent.ThreadPoolExecutor@4b832de6[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1410]
[error] Use 'last' for the full log.
```

After:

```
sbt:zinc Root> ;zincIvyIntegration/cleanClasses;zincIvyIntegration/compile
[success] Total time: 0 s, completed 03/04/2018 2:24:33 PM
[info] Compiling 5 Scala sources and 1 Java source to /Users/jz/code/zinc/internal/zinc-ivy-integration/target/scala-2.12/classes ...
[warn] /Users/jz/code/zinc/internal/zinc-ivy-integration/src/main/scala/sbt/internal/inc/ResourceLoader.scala:14:42: parameter value classLoader in method getPropertiesFor is never used
[warn]   def getPropertiesFor(resource: String, classLoader: ClassLoader): Properties = {
[warn]                                          ^
[warn] /Users/jz/code/zinc/internal/zinc-ivy-integration/src/main/scala/sbt/internal/inc/ZincComponentCompiler.scala:13:17: Unused import
[warn] import java.net.URLClassLoader
[warn]                 ^
[warn] /Users/jz/code/zinc/internal/zinc-ivy-integration/src/main/scala/sbt/internal/inc/ZincComponentCompiler.scala:137:26: Unused import
[warn]       import sbt.io.Path.toURLs
[warn]                          ^
[warn] /Users/jz/code/zinc/internal/zinc-ivy-integration/src/main/scala/sbt/internal/inc/ZincComponentCompiler.scala:94:30: The outer reference in this type test cannot be checked at run time.
[warn]     private final case class ScalaArtifacts(compiler: File, library: File, others: Vector[File])
[warn]                              ^
^C
[warn] Canceling execution...
[warn] four warnings found
[info] Compilation has been cancelled
[error] Total time: 1 s, completed 03/04/2018 2:24:35 PM
```

Best served with https://github.com/scala/scala/pull/6479

Fixes #3958
2018-04-03 14:27:21 +10:00
Dale Wijnand 113656aed1
Remove compile warnings 2018-01-16 11:17:01 +00:00
Dale Wijnand f274aaa811
Remove all warnings from taskProj 2017-12-12 13:02:19 +00:00
Dale Wijnand 9f1d60be60
Rewrite to polymorphic function syntax 2017-10-25 10:23:46 +01:00
Dale Wijnand fb17cc393f
Rewrite to inline syntax 2017-10-25 10:22:48 +01:00
Dale Wijnand a41727fb17
Add, configure & enforce file headers 2017-10-05 09:03:40 +01:00
Eugene Yokota da046791e0 Apply Scalafmt formatting 2017-04-21 04:48:31 -04:00
Dale Wijnand 43821667bf
Upgrade scalariform version 2016-12-11 12:13:11 +00:00
xuwei-k 857fc0f5da use JavaConverters instead of JavaConversions
- https://issues.scala-lang.org/browse/SI-9684
- 0c5b42d974
2016-08-30 01:31:04 +09:00
Dale Wijnand deea82542c Remove unused imports 2016-07-12 11:55:10 +01:00
Dale Wijnand 222a970080 Kill some vars 2016-07-07 01:39:52 +01:00
Eugene Yokota ee272d780e Reorganize directory structure 2016-05-06 16:01:49 -04:00
Eugene Yokota fd7c162ea8 Bumping up dependencies 2016-05-05 14:38:24 -04:00
Johannes Rudolph 643361f7b1 FPORT: Fixes #2302. Don't check pre and post conditions in sbt.Execute by default.
Forward-port of #2303.

The checking code has bad run time characteristics and would need to be fixed
for large projects with deep task dependency chains.

The code in sbt.Execute has been in production for a long time so it seems safe
enough to drop the extra checks by default. To debug issues, you can set
`-Dsbt.execute.extrachecks=true` to revert to the old behavior.
2016-01-16 12:35:49 +00:00
Martin Duhem c981abd295 Fix all imports 2015-09-14 14:28:09 +02:00
Pierre DAL-PRA 8f1fb2d232 Fix additional warnings 2015-08-07 00:23:14 +02:00
Pierre DAL-PRA 54d54b9f4f Replace procedure syntax by explicit Unit annotation 2015-08-04 10:07:38 +02:00
Pierre DAL-PRA b9171e59ad Simplify operations on collections 2015-08-01 02:25:17 +02:00
Jean-Rémi Desjardins ca736e55d3 Minor code cleanup 2014-12-03 09:56:34 -08:00
Eugene Yokota 3f958a5bce enable -deprecation for Scala 2.10
Enable -deprecation flag to catch old code being use when we migrate
things.
In this commit I moved error to sys.error.
2014-10-10 15:42:26 -04:00
Josh Suereth aee7903338 Disable flaky test, as it's timeout based.
Fixes #1398
2014-08-08 14:28:33 -04:00
Josh Suereth 244abd3b6f Scalariforming test code 2014-05-07 11:52:23 -04:00
Eugene Yokota adb41611cf added scalariform 2014-05-01 12:50:07 -04:00
Mark Harrah 906f86e39f API documentation for TaskStreams. 2013-12-19 18:32:01 -05:00
Mark Harrah a677448a6c Fix closeable streams to recreate streams for a key if the delegate was closed. 2013-12-06 20:43:48 -05:00
Mark Harrah 9f75ab31cc fix task execution test compilation 2013-06-28 00:01:19 -04:00
Mark Harrah 1cc2f57e15 Experimental task progress interface. Fixes #592.
Set sbt.task.timings=true to print timings for tasks.
This sample progress handler shows how to get names for tasks and
deal with flatMapped tasks.  There are still some tasks that make
it through as anonymous, which needs to be investigated.

A setting to provide a custom handler should come in a subsequent commit.
2013-06-23 19:57:30 -04:00
Mark Harrah fb27f5558c Propagate taskDefinitionKey in Incompletes from flatMaps. Ref #784. 2013-06-15 23:55:05 -04:00
Mark Harrah f30953ea4d ManagedStreams cannot be sealed if Streams is to be externally implemented 2013-02-25 09:24:05 -05:00
Mark Harrah f6d73128fc deprecations 2013-02-25 09:24:04 -05:00
Mark Harrah 6a13d1e70a move pre-type-lambda code to use a type lambda 2013-01-28 17:14:54 -05:00
Mark Harrah 076480b50a Reduce InputTask to the ideal wrapper around 'State => Parser[Initialize[Task[T]]]'
Ref #407.
2013-01-28 17:14:53 -05:00
Mark Harrah aff95baf0e Provide cacheDirectory via Streams instead of a separate setting
This is cleaner and makes it harder for the task author to have overlapping caches.
2013-01-10 16:06:12 -05:00
Grzegorz Kossakowski ef39aeb9c1 Follow source layout convention supported by Eclipse.
Moved source files so directory structure follow package
structure. That makes it possible to use Scala Eclipse plugin
with sbt's source code.
2012-12-07 10:27:08 -08:00
Mark Harrah 538f687208 Use and methods instead of mapR,mapFailure,flatFailure,flatMapR 2012-12-02 03:17:19 -05:00
Mark Harrah ef86480c8f concurrent restrictions: Untagged should be set based on the task's tags, not the tags of all tasks. 2012-11-21 08:41:28 -05:00
Mark Harrah 8d6dd10798 2.10.0-M5, different arity generalization
1. KList[M[_]] now instead of KList[HL <: HList, M[_]]
  a. head, tail work properly in this variant
  b. disadvantage is that full type not easily transformed to new type constructor
2. AList abstracts on K[L[x]], a higher order type constructor.
 A. Instances written for:
  a. KList
  b. Seq[M[T]] for a fixed T
  c. TupleN
  d. single values
  e. operate on one type constructor when nested
 B. Main disadvantage is type inference.  It just doesn't happen for K[L[x]].
    This is mitigated by AList being used internally and rarely needing to construct a K.
2012-11-17 20:19:24 -05:00
Mark Harrah 1c1e5c4977 taking care of deprecations removed in Scala master 2012-11-14 11:48:06 -05:00
Mark Harrah 29dd76da85 defer opening logging output files until an actual write 2012-08-27 10:49:13 -04:00
Eugene Vigdorchik adb7d42f73 Fix compilation error for 2.10.0-M5 for all but main project. 2012-07-17 15:20:37 -04:00
Mark Harrah e2b5ce374c fix task tests 2012-07-01 15:16:41 -04:00