Commit Graph

1174 Commits

Author SHA1 Message Date
Josh Suereth e95feccfca Fix pattern match on buildLoaders.
Fixes #1341
2014-05-16 07:41:29 -04:00
Josh Suereth 664d83ed0f Back out autogc fix to be optionally enabled.
Workaround for #1329
2014-05-13 13:14:39 -04:00
Eugene Yokota 2b621869fc Check for object autoImport in auto plugins. Fixes #1314 2014-05-08 21:54:04 -04:00
Jacek Laskowski 95b976b6d4 Detailed help for the reload command (following project's) 2014-04-24 23:53:31 +02:00
eugene yokota 1819276bb8 Merge pull request #1278 from sbt/wip/junit-xml-reporter
Migrate JUnitXmlReporter into sbt as autoplugin
2014-04-22 16:53:02 -04:00
eugene yokota 9d86d56797 Merge pull request #1277 from sbt/fix/issue-1267
Separate location of analysis cache if we're cross compiling scala.
2014-04-22 13:45:49 -04:00
Josh Suereth fc3f6dd1d9 Remove enabling key for JunitXmlReportPlugin.
This migrates JunitXmlReportPlugin to work the way we desire
new sbt features/plugins to work:

* Enabling the feature is having the plugin available.
* Disabling the feature is disabling the plugin
* All code/settings for the feature are isolated to the plugin.
2014-04-22 11:23:15 -04:00
Josh Suereth f5dd022551 Separate location of analysis cache if we're cross compiling scala.
* Add task to determine file-name of analysis cache
* If crossPaths := true, then add scala binary version to the analysis cache name.

This makes it possible to leverage incremental compilation with the `+` command.

Fixes #1267
2014-04-22 11:12:59 -04:00
Josh Suereth 447ae8b1d8 Migrate JUnitXmlReport into an autoplugin. 2014-04-22 10:38:35 -04:00
Bruno Bieth b38b86add5 Added a test reporter for JUnit XML
Taken from https://github.com/chenkelmann/junit_xml_listener and slightly improved.
Activating is now just a matter of setting `testReportJUnitXml` to true.
This not only brings a very handy feature (hudson/jenkins support that syntax),
but gives more options for testing the SBT test infrastructure.
For instance checking that the test output is well segregated during a parallel
test run is just a matter of checking the report output.

Conflicts:
	main/src/main/scala/sbt/Keys.scala
2014-04-22 08:36:52 -04:00
Josh Suereth e076bfa970 Automatically run GC/finalization after each task execution.
Fixes #1223.

* Add a new key to disable forcing the garbage collector to run
  after each task-executioin
* Add a new flag to disable forcing the garbage collector to run
  after each task-exeuction
* Add a hook into EvalauteTask to run System.gc/System.runFinalization
  after each task execution

Review by @eed3si9n
2014-04-21 11:08:05 -04:00
eugene yokota 72d3c4e3eb Merge pull request #1255 from sbt/wip/remove-depreated-evaluate-task-call
Remove deprecated EvaluateTask usage for new, easier to update variant.
2014-04-16 14:33:10 -04:00
eugene yokota 583391a069 Merge pull request #1263 from sbt/wip/docs-and-cleanups
addPlugins => enablePlugins
2014-04-16 13:59:40 -04:00
Antonio Cunei 75f0438946 Use the correct state in buildPluginDefinition()
Within buildPluginDefinition(), the call to setProject() can
(and usually will) return a modified structure together with
the new state.

The subsequent call to evalPluginDef() should use the updated
structure, rather the old stucture that was present before
the setProject() ("pluginDef"); if that is not the case,
the code called by evalPluginDef() will find an inconsistent
structure/state combination, and behave in bizarre ways as
a result.

More in general, it is a bit dangerous to pass to routines
in parallel the two separate state and structure, as the
two may easily inadvertently fall out of alignment, as in this
case.

This patch should be applied to both the 0.13 branch as well
as to a future 0.12.5 release (the corresponding file there
is ./main/Load.scala).
2014-04-16 17:56:49 +02:00
Josh Suereth 51ee5048f0 Rename `addPlugins` to `enablePlugins` to better represent what it does.
This is to disambiguate between `addSbtPlugin` and `enablePlugins` for
autoplugins.
2014-04-15 14:38:11 -04:00
Josh Suereth 1c3231f017 Documentation for EvaluateConfigurations class. 2014-04-15 13:22:40 -04:00
Grzegorz Kossakowski b665b7ecee Merge pull request #1254 from gkossakowski/classFileManager-logging
Add debug logging in ClassfileManager
2014-04-13 16:05:18 +02:00
Grzegorz Kossakowski a7fb54e4df Add debug logging in ClassfileManager
Add logging of various operations the transactional class file manager is
doing. You can pass logger to be used by the transactional class file
manager by using overloaded definition of `ClassfileManager.transactional`
method. The old overload has been deprecated.

The factory methods for class file manager in IncOptions companion object
has been deprecated in favor of using ClassfileManager companion object
directly. The code in Defaults.scala has been updated to use non-deprecated
methods. The logging is turned off by default.

The canonical way of enabling transactional class file manager in sbt
project is:

```
incOptions := incOptions.value.withNewClassfileManager(
  sbt.inc.ClassfileManager.transactional(
    crossTarget.value / "classes.bak",
    (streams in (compile, Compile)).value.log
  )
)
```

It's a bit verbose which shows that the api for this is not the best.
However, I don't expect sbt users to need this code very often.

This patch should help debug the problem described in #1184
2014-04-11 13:42:21 +02:00
Josh Suereth 004d9c3f4a Remove deprecated EvaluateTask usage for new, easier to update variant. 2014-04-10 15:51:55 -04:00
Josh Suereth bc07810f7e Mark new method private[sbt] because no one else should use it. 2014-04-10 13:17:39 -04:00
Josh Suereth 22b99a9a1c Autoplugin confgiurations must be injected first into project.
Fixes #1247
2014-04-10 10:12:00 -04:00
Josh Suereth 10afd46785 Merge pull request #1252 from gkossakowski/hang-in-loading-global-plugins
Pick the right overload in EvaluateTask.runTask
2014-04-10 09:28:51 -04:00
Grzegorz Kossakowski 7fead66244 Pick the right overload in EvaluateTask.runTask
The deprecated method should forward to the other overloaded alternative
but it recursed instead.

This kind of mistake would be easily caught by linter warning about
unused `newConfig` local variable. I hope we'll get there some day.

Fixes #1251
2014-04-10 15:24:07 +02:00
Indrajit Raychaudhuri 7179912387 `DefaultOptions` for resolvers should not resets existing values.
`DefaultOptions.addResolvers` and `DefaultOptions.addPluginResolvers`
should not reset the existing value while adding the new ones. The
names are prefixed with _add_ afterall.
2014-04-10 03:25:54 -05:00
eugene yokota 59b834c679 Merge pull request #1225 from japgolly/shhh_tests
Added setting 'testResultLogger' which allows customisation of test reporting.
2014-04-09 10:37:44 -07:00
Josh Suereth 43c25beeed Fix infinite loop of death. 2014-04-09 10:11:21 -04:00
David Barri 195129a3e7 Added TestResultLogger for customising test feedback.
1) When `test` is run and there are no tests available, omit logging output.
   Especially useful for aggregate modules. `test-only` et al unaffected. (#1185)

2) Added a new setting `testResultLogger` to allow customisation of logging of test results.
2014-04-09 19:14:29 +10:00
Josh Suereth 3890c98115 Remove mutability from the task cancel api.
* Rename TaskCancel to RunningTaskEngine for clarity
* Explicitly pass a state value in TaskCancellationStrategy
* Update hooks to be immutable/safe.
2014-04-08 20:59:50 -04:00
Josh Suereth f42dee8090 Naming fixes to TaskCancellationStrategy to be clearer. 2014-04-08 12:08:30 -04:00
Josh Suereth 8f1ef5395d Improve scaladoc comments for the task cancellation api. 2014-04-08 11:09:23 -04:00
Josh Suereth 171eb19b96 Part #2 of task cancellation hooks.
* Expose new EvaluateTaskConfig throughout all the APIs
* Create a key for cancellation configuration
* Add default values for cancellation in GlobalPlugin
* Create a test to ensure that cancellation can cancel tasks.
* Deprecate all the existing mechanisms of evaluating tasks which
  use the EvaluateConfig API.
2014-04-08 09:23:49 -04:00
Josh Suereth 6e480fc2b6 Fix deprecated 'since' clauses to reflect our actual release versions. 2014-04-07 16:54:32 -04:00
Josh Suereth 2686acd993 Part #1 of cancel-task-hooks - Hooks EvaluateTask.
* Create a new EvaluateTaskConfig which gives us a bit more freedom
  over changign config options to EvaluateTask in the future.
* Create adapted from old EvaluateTask to new EvaluateTask
* Add hooks into signals class to register/remote  a signal listener
  directly, rather than in an "arm" block.
* Create TaskEvaluationCancelHandler to control the strategy of
  who/whom can cancel (sbt-server vs. sbt-terminal).
* Create a null-object for the "can't cancel" scenario so the
  code path is exactly the same.

This commit does not wire settings into the build yet, nor does it
fix the config extractio methods.
2014-04-07 16:42:08 -04:00
Josh Suereth d8e2f594d1 Merge pull request #1065 from jaceklaskowski/string-interpolation-follow-deprecation
Use string interpolation and replace deprecated methods
2014-04-07 11:22:19 -04:00
Eugene Yokota 5f7e68c7dd Auto plugin names are imported with or without autoImport. Fixes #1217 2014-03-27 17:36:40 -04:00
eugene yokota 9dde1ac46e Merge pull request #1215 from eed3si9n/topic/renameaddsettings
Deprecate autoSettings, Rename ProjectSettings => BuildScalaFiles
2014-03-26 14:36:46 -04:00
Eugene Yokota 4f969491d0 Deprecate autoSettings, Rename ProjectSettings => BuildScalaFiles
* autoSettings is renamed to settingSets. Since this was part of 0.13.0
we need to deprecate it first.
2014-03-26 11:35:50 -04:00
Eugene Yokota 1debc48568 Rename GlobalModule -> CorePlugin 2014-03-25 15:49:07 -04:00
Eugene Yokota 3f2f12f5bb Fix PluginsTest 2014-03-25 01:49:08 -04:00
Eugene Yokota 575e657962 Default AutoPlugin to an empty root plugin 2014-03-25 00:20:11 -04:00
Eugene Yokota ff77d0b0f2 Remove def autoImport: Any from AutoPlugin. 2014-03-24 23:04:22 -04:00
Eugene Yokota cc80d216ab Adjusting to 0.13 changes 2014-03-24 20:03:01 -04:00
Eugene Yokota 2c654b2d90 Unifies AutoPlugin and AutoImport. Fixes #1188
* AutoImport trait is subsumed by def autoImport method under
AutoPlugin class.
* When def autoImport is overridden by a lazy val or a val, *.sbt
automatically imports autoImport._.
2014-03-24 19:10:35 -04:00
eugene yokota 4315049337 Merge pull request #1203 from eed3si9n/topic/requiredAutoPlugin
Unifies AutoPlugin and RootPlugin
2014-03-24 19:02:00 -04:00
Eugene Yokota d697c10950 Hide unary_! operator from API 2014-03-24 18:59:14 -04:00
Josh Suereth d03e2380b2 Merge pull request #1197 from sandreev/t_1196_empty_tests
fixes #1196
2014-03-24 16:19:11 -04:00
Eugene Yokota 5b1c33dd6e Added conflict report and unit tests 2014-03-22 02:47:11 -04:00
Eugene Yokota e95935a7db Adds conflict check at the end to enforce exclusion requirements. 2014-03-21 01:06:00 -04:00
Eugene Yokota c7dc499fe4 Updated comments. Typo fix per @jozic 2014-03-20 21:47:49 -04:00
Sergey Andreev 910d39f3a9 fixes #1196 2014-03-20 17:46:42 -07:00