Commit Graph

3463 Commits

Author SHA1 Message Date
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
eugene yokota 070f164a32 Merge pull request #1276 from sbt/wip/run-finalizer-after-tasks
Automatically run GC/finalization after each task execution.
2014-04-22 11:33:10 -04:00
Josh Suereth 373166be36 Adding docs for the test report hooks. 2014-04-22 11:29:13 -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
Grzegorz Kossakowski 3aa70b914a Merge pull request #1273 from gkossakowski/lastCompilationTime
Use dedicated api for lastCompilationTime in build definition
2014-04-18 18:54:53 +02:00
Grzegorz Kossakowski 37e57f7940 Use dedicated api for lastCompilationTime in build definition
Since sbt 0.13.0, we have dedicated API in Analysis that gives access to
information about all compilations performed since the last time clean
was ran.

By looking at at last compilation we can determine lastCompilationTime
value.

Fixes #1272
2014-04-18 18:50:17 +02:00
Matej Urbas 247252fac1 Reintroduced the `examples` method. Reintroduced and deprecated the `checkMatches` method. 2014-04-18 16:44:26 +01:00
Matej Urbas 186c4c0db4 Merge remote-tracking branch 'remotesbt/0.13' into 0.13 2014-04-18 13:48:19 +01:00
Oscar Vargas Torres bd7ec1da58 Initial Spanish translation of documentation 2014-04-17 20:09:11 -05: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
Josh Suereth dcefd80f35 Merge pull request #1266 from cunei/wip-013-buildPluginDefinition
Use the correct state in buildPluginDefinition()
2014-04-16 13:56:26 -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
eugene yokota 68056cf361 Merge pull request #1265 from sbt/fix/launch-windows-servers
Fixes issue with deadlocking server discovery on windows.
2014-04-16 10:35:35 -04:00
Josh Suereth f92206b785 Fixes issue with deadlocking server discovery on windows.
It turns out windows blocks until a process is finished when
you try to close the stderr handle, but not stdout.  Therefore,
we leave stderr open when we shut down, which lets the server
continue to run on windows.
2014-04-16 08:44:03 -04:00
Matej Urbas 134b0322f6 Added tests for FileExamples. Improved the file-searching in FileExamples. 2014-04-16 08:36:27 +01:00
Grzegorz Kossakowski d27a699715 Merge pull request #1250 from gkossakowski/namehashing-cleanup
Move NameHashing from incremental to api subproject.
2014-04-16 00:18:27 +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
Eugene Yokota 3632a998ca Fixing typos 2014-04-14 12:46:34 -04:00
Josh Suereth bc896a6d18 Merge pull request #1262 from sbt/topic/readme
Update CONTRIBUTING.md and README
2014-04-14 12:26:29 -04:00
Eugene Yokota fcdbfcf4f4 Update CONTRIBUTING.md 2014-04-14 12:16:06 -04:00
Matej Urbas 7aa58fd784 Improved the description of ParserWithExamples tests. 2014-04-14 08:24:02 +01: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
Matej Urbas 447ab8d334 Created unit tests for ParserWithExamples and FixedSetExampleSource. 2014-04-12 20:16:58 +01: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
Grzegorz Kossakowski 36db1207cf Move NameHashing from incremental to api subproject.
It should have been there from the beginning because NameHashing is tied
to internals of the API subproject.

It was added to incremental subproject by mistake.
2014-04-10 20:21:42 +02:00
Josh Suereth b802196f77 Add some of the latest 0.13.5 changes to the doc. 2014-04-10 13:34:58 -04:00
eugene yokota 5c513c909d Merge pull request #1253 from sbt/wip/fix-1247
FIx configuration ordering issues in sbt 0.13.5
2014-04-10 10:21:49 -07:00
Josh Suereth bc07810f7e Mark new method private[sbt] because no one else should use it. 2014-04-10 13:17:39 -04:00
eugene yokota 96558930c3 Merge pull request #1226 from sbt/wip/bump-to-latest-ivy
Bump to our own release of ivy 2.4.x
2014-04-10 10:15:26 -07:00
Josh Suereth 22b99a9a1c Autoplugin confgiurations must be injected first into project.
Fixes #1247
2014-04-10 10:12:00 -04:00
Josh Suereth 57adb5ff7a Create test for configuration ordering regression. 2014-04-10 10:05:15 -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
Josh Suereth 891ec90039 Merge pull request #1248 from indrajitr/0.13
Relativizing CONTRIBUTING.md
2014-04-10 08:54:40 -04:00
Josh Suereth 9366b4dd4f Merge pull request #1249 from indrajitr/fix-default-options
`DefaultOptions` for resolvers should not resets existing values.
2014-04-10 08:52:52 -04: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
Indrajit Raychaudhuri f1d61be125 `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:16:45 -05:00
Indrajit Raychaudhuri 2ffb85ee7c Relativizing CONTRIBUTING.md 2014-04-10 02:52:27 -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 852d6e2f80 Merge pull request #1245 from sbt/fix/infinite-loop
Fix infinite loop of death.
2014-04-09 12:54:29 -04: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
eugene yokota 78d2aabda2 Merge pull request #1242 from sbt/wip/cancel-task-hooks
Add task cancellation hooks into the build definition.
2014-04-08 23:32:46 -07:00