Commit Graph

541 Commits

Author SHA1 Message Date
henry 6545deacc8 Fix #1368 - getResources should never return null 2015-02-11 13:33:40 +00:00
Eugene Yokota 69171f40b3 Auto style fix 2015-02-02 14:56:13 -05:00
Indrajit Raychaudhuri 1f90ef6b43 Fix params order in `@deprecated` 2015-01-17 08:25:57 +05:30
eugene yokota be78b7fc4c Merge pull request #1759 from jedesah/topic/minor_cleanup
Minor code cleanup
2015-01-14 16:13:06 -05:00
Derek Wickern b3cab0f2a0 Fix logger not overwriting the previous line in alternate shells
When running the 'update' task in bash, the output is all collapsed onto one line.
On Windows, even using an ANSI capable shell, running 'update' spams the console.

Tested with dash in Ubuntu; ANSICON, Console2 and ConsoleZ in Windows.
2014-12-11 11:21:23 -08:00
Jean-Rémi Desjardins ca736e55d3 Minor code cleanup 2014-12-03 09:56:34 -08:00
Grzegorz Kossakowski 015c61ad69 Merge pull request #1736 from Duhemm/dependency-kind-compile
Abstract over dependency kind in Compile
2014-12-02 16:00:22 +01:00
Eugene Yokota 416ffa76d1 merge 0.13.7 manually 2014-11-19 14:34:08 -05:00
Martin Duhem 98c789b826 Abstract over dependency context in Compile
This commit completes the abstraction over dependency kinds in the
incremental compiler, started with #1340.
2014-11-19 10:35:07 +01:00
Eugene Yokota c1fc84662f scalariform 2014-11-04 17:48:46 -05:00
eugene yokota b9964d5153 Merge pull request #1702 from jsuereth/wip/incremental-compiler-javac-cleanup
Create a new API for calling Java toolchains.
2014-10-31 15:31:14 -04:00
Josh Suereth 70cdce0830 Create a new API for calling Java toolchains.
* Create a new sbt.compiler.javac package
* Create new interfaces to control running `javac` and `javadoc` whether forked or local.
* Ensure new interfaces make use of `xsbti.Reporter`.
* Create new method on `xsbti.compiler.JavaCompiler` which takes a `xsbti.Reporter`
* Create a new mechanism to parse (more accurately) Warnings + Errors, to distinguish the two.
* Ensure older xsbti.Compiler implementations still succeed via catcing NoSuchMethodError.
* Feed new toolchain through sbt.actions.Compiler API via dirty hackery until we can break things in sbt 1.0
* Added a set of unit tests for parsing errors from Javac/Javadoc
* Added a new integration test for hidden compilerReporter key, including testing threading of javac reports.

Fixes #875, Fixes #1542,  Related #1178 could be looked into/cleaned up.
2014-10-29 20:06:08 -04:00
Josh Suereth fe712173f3 Fix BC issue discovered in #1696.
Def.derive has a new parameter, so we add an override which delegates down to the new method.
2014-10-28 10:21:41 -04: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
Jean-Rémi Desjardins ff9baf5987 Merge branch 'refs/heads/0.13' into topic/remove-warnings 2014-09-10 23:24:53 -07:00
Jean-Rémi Desjardins ced5230289 Remove some compiler warnings 2014-09-10 22:55:43 -07:00
Josh Suereth da1fc33b52 Removing printlns and adding the test, DOH. 2014-09-09 09:16:10 -04:00
Josh Suereth d2950da9dd Fix issue where ScalaInstance broke the thread-context-classloader for all scala classes.
The issue is that when you manually set a ScalaInstance, i.e. not one from Ivy, the
classpath which is returned for any given configuration ONLY uses Ivy.   This means that
the legitimate Scala JAR files that need to be on the classpath are missing from the list.
For some reason, the way we instantiate tests uses an unfiltered classloader against the
ScalaInstance, *BUT* the thread-context-classloader DOES use a filtered instance by
classpath.   This add the hook into the TestFramework runner creation so that
the classpath accurately reflects the jars needed.

cc @rkuhn
2014-09-09 08:56:51 -04:00
Josh Suereth 50460fad28 Add toString methods to classloaders, for debugging.
* Add toString methods to all classloader classes.
2014-09-09 08:56:20 -04:00
Antonio Cunei a6d85ae2cb Allow the "-bin" Scala version suffix to specify a bincompat version
There is sometimes the need to use a test version of Scala that is
intended to be binary compatible with a standard release version.

At this time, due to the particular logic implemented within sbt,
a non-numeric suffix will never have the same binaryScalaVersion
of a release version ending in ".0", like for instance "2.11.0".

This commit allows developers to use as suffix any string that
begins with "-bin", for instance "2.11.0-bin-compat-test-1".
Such a suffix will have a binaryScalaVersion of "2.11", being
therefore considered binary compatible with release versions.
2014-09-04 01:15:58 +02:00
Eugene Yokota 65e4b773d4 Fixes #1530. Fixes NPE by using IO.listFiles 2014-08-15 03:52:54 -04:00
Josh Suereth a151ac9c94 Ok, this is actually the flaky issue with the test.
We use the ch key for testing, so it can't be part of the autogenerated set.
2014-08-11 16:13:26 -04:00
Josh Suereth 0817800065 Fixes flaky no-such-element exception from bad generation of random tests. 2014-08-11 14:54:33 -04:00
Eugene Yokota c8af32950d Implements eviction warning stories. #1200
This implements all stories from https://github.com/sbt/sbt/wiki/User-Stories%3A-Conflict-Warning.
When scalaVersion is no longer effective an eviction warning will display.

    Scala version was updated by one of library dependencies:
        * org.scala-lang:scala-library:2.10.2 -> 2.10.3

When there're suspected incompatibility in directly depended Java libraries,
eviction warnings will display.

   There may be incompatibilities among your library dependencies.
   Here are some of the libraries that were evicted:
      * commons-io:commons-io:1.4 -> 2.4

When there's suspected incompatiblity in directly depended Scala libraries,
eviction warnings will display.

  There may be incompatibilities among your library dependencies.
  Here are some of the libraries that were evicted:
      * com.typesafe.akka:akka-actor_2.10:2.1.4 -> 2.3.4

This also adds 'evicted' task, which displays more detailed eviction warnings.
2014-07-27 12:26:12 -04:00
Henrik Engstrom 92dd3dbd3f Regex now handles versions that contain multiple '-' characters in the version. 2014-07-03 18:57:48 -04:00
eugene yokota 57ca26fe77 Merge pull request #1401 from xuwei-k/watch
Triggered Execution should be aware of rename or move file
2014-06-27 12:05:59 -04:00
Vasya Novikov 33ee4a30c8 minor change: code style 2014-06-24 02:24:51 +04:00
Vasya Novikov 66c9314d20 make it possible to reference a branch of a local git repository
Reasoning on why this change is wanted can be found
on the "sbt-dev" mailing list,
topic "problem with referencing a local git repository"
2014-06-15 02:14:27 +04:00
xuwei-k dd628d2441 Triggered Execution should be aware of rename or move file 2014-06-09 00:49:45 +09:00
Josh Suereth 4311f87d64 Remove flaky test.
Fixes #1390
2014-06-05 12:39:44 -04:00
Josh Suereth 273024a238 Add special hook to diagnose travis failing test. 2014-06-04 11:33:02 -04:00
Josh Suereth 87306524a8 Improve error message further. 2014-06-03 13:57:27 -04:00
Josh Suereth 2c3f40eb02 Improve test failure message for #1390. 2014-06-02 15:10:17 -04:00
Dan Sanduleac 4eafda7891 Don't allow generated strings (key names) to be empty 2014-05-20 09:02:10 +01:00
Josh Suereth abffc3e1bd Bump expected 2.11 module versions so we can compile with 2.11
Add scala 2.11 test/build verification.

* Add 2.11 build configuratoin to travis ci
* Create command which runs `safe` unit tests
* Create command to test the scala 2.11 build
* Update scalacheck to 1.11.4
* Update specs2 to 2.3.11
* Fix various 2.11/deprecation removals
  and other changes.

Fix eval test failure in scala 2.11 with XML not existing.
2014-05-14 19:08:05 -04:00
Josh Suereth 244abd3b6f Scalariforming test code 2014-05-07 11:52:23 -04:00
Eugene Yokota 785b0274ee some more source getting formatted 2014-05-02 18:07:05 -04:00
Eugene Yokota adb41611cf added scalariform 2014-05-01 12:50:07 -04:00
Dan Sanduleac 96c7864088 Add 2 derived settings tests:
1) non-default derived settings, if they produce anything, the settings
   they produce must supersede previous assignents (in the settings seq)
   to the same key.

2) even if a derived setting is scoped at a higher scope (e.g.
   ThisBuild) the settings it produces are scoped at the intersection of
   that (the defining) scope and the scope of the triggering dependency.

2 is particularly nice as it enables this behaviour:
    derive(b in ThisBuild := a.value + 1)
    a in project1 := 0
    // a could be defined in all projects
    ==>
    Now (b in project1).value == (a in project1).value + 1 == 1
    and similarly in all other projects
    all with a single derived setting
2014-05-01 03:11:22 +01:00
Dan Sanduleac 0489fa817b Improve SettingsExample to allow orthogonal scopes (like projects/tasks) at a certain nestIndex 2014-05-01 03:09:50 +01:00
Dan Sanduleac 512494cd04 Couple of fixes 2014-05-01 01:35:48 +01:00
Dan Sanduleac 0377a40cf8 Optimise scope intersection for GlobalScope 2014-05-01 01:35:48 +01:00
Dan Sanduleac 3161d75a41 Decouple DefaultSetting from Setting/DerivedSetting; BuildCommon.derive() produces default settings by default 2014-05-01 01:35:48 +01:00
Dan Sanduleac 4f7b6e269b Derive settings only under the scope of the DerivedSetting 2014-05-01 01:35:48 +01:00
Dan Sanduleac ae5af2116f Derived settings to replace their DerivedSetting, not go at the beginning 2014-05-01 01:35:48 +01:00
Dan Sanduleac e06c4efe4f DerivedSetting not a DefaultSetting anymore 2014-05-01 01:35:48 +01: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
Matej Urbas 134b0322f6 Added tests for FileExamples. Improved the file-searching in FileExamples. 2014-04-16 08:36:27 +01:00
Matej Urbas 7aa58fd784 Improved the description of ParserWithExamples tests. 2014-04-14 08:24:02 +01:00