Commit Graph

173 Commits

Author SHA1 Message Date
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
Jean-Rémi Desjardins ca736e55d3 Minor code cleanup 2014-12-03 09:56:34 -08:00
Eugene Yokota c1fc84662f scalariform 2014-11-04 17:48:46 -05: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 ced5230289 Remove some compiler warnings 2014-09-10 22:55:43 -07: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
Dan Sanduleac 4eafda7891 Don't allow generated strings (key names) to be empty 2014-05-20 09:02:10 +01: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
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
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
Mark Harrah 9264099594 API docs, better terminology for negative cycle checking in logic system. 2014-01-24 14:36:46 -05:00
Mark Harrah 1afd1931c4 Translate errors from logic system to Natures system. 2014-01-24 14:36:46 -05:00
Mark Harrah 5add7306c2 Acyclic negation checking in logic system that backs auto-plugins. 2014-01-24 14:36:36 -05:00
Mark Harrah 322f6de655 Logic system supporting auto plugins and initial outline of AutoPlugin and Natures types.
* Not integrated into project loading
 * Doesn't yet check that negation is acyclic before execution
2014-01-24 14:30:12 -05:00
Mark Harrah c669606999 TaskKey[T].previous: Option[T], which returns the value of the task the last time it executed.
This requires a Format[T] to be implicitly available at the call site and requires the task
to be referenced statically (not in a settingDyn call).  References to previous task values
in the form of a ScopedKey[Task[T]] + Format[T] are collected at setting load time in the
'references' setting.  These are used to know which tasks should be persisted (the ScopedKey)
and how to persist them (the Format).

When checking/delegating previous references, rules are slightly different.

A normal reference from a task t in scope s cannot refer to t in s unless
there is an earlier definition of t in s.  However, a previous reference
does not have this restriction.  This commit modifies validateReferenced
to allow this.

TODO: user documentation
TODO: stable selection of the Format when there are multiple .previous calls on the same task
TODO: make it usable in InputTasks, specifically Parsers
2013-12-06 20:45:01 -05:00
Dan Sanduleac 6a31b6acc4 Removed unnecessary catch for exception 2013-11-28 11:04:46 -05:00
Dan Sanduleac 9cfc7a4d91 Added test case for derived settings 2013-11-28 11:04:46 -05:00
Dan Sanduleac d740965ea1 Fix deriveAndLocal bug 2013-11-28 11:04:46 -05:00
Mark Harrah 5f7a327e5e Add -Dsbt.cli.nodelegation option to experiment with no delegation for running/showing tasks/settings from the command line.
With this set to true, the following is no longer allowed for example:

> compile:update
2013-11-25 21:03:40 -05:00
Mark Harrah a92b883e23 update to ScalaCheck 1.11.0 2013-11-04 11:28:40 -05:00
Mark Harrah 7de1b4bf3d shortcut heterogeneous AList to KList.toList 2013-10-23 09:46:43 -04:00
Mark Harrah 27bd93f601 cleanups in Settings 2013-10-23 09:46:43 -04:00
Mark Harrah 2c441d21f6 drop view for iterator in IMap 2013-10-23 09:46:43 -04:00
James Roper 743ce99315 String upper/lower case no longer locale dependent
Fixed many instances of the Turkish i bug.

Spare a thought for the poor Turks!
2013-09-24 08:14:15 -04:00
Mark Harrah 11a7151af3 Show source position of undefined setting. 2013-08-30 18:34:54 -04:00
Mark Harrah 983d87106b API docs for Attributes.scala 2013-08-16 14:22:14 -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 2f9d68e869 Require projects to have unique target directories.
Configuring projects so that target directories overlap is usually
unintentional and the error message that results is usually unrelated
to the cause.
2013-06-18 18:43:50 -04:00
Mark Harrah 52f1ed1819 Support dynamic evaluations of optional settings (Initialize.evaluate). 2013-06-18 18:29:01 -04:00
Mark Harrah a6f75a75ad Fully implement StaticScopes subclass of Initialize in order to support use in Task flatMap. Fixes #784. 2013-06-15 23:55:05 -04:00
Mark Harrah 871aeb1502 Derived settings: handle scopeLocal in derive and allow triggering dependencies to be filtered 2013-05-09 17:28:50 -04:00
Mark Harrah 7ed56d3fcd Show defining locations when there are cycles between derived settings 2013-05-09 17:28:50 -04:00
Mark Harrah 4bb9633d6c only derive settings when all dependencies are defined 2013-05-09 17:28:49 -04:00
Mark Harrah 6c0f47ef48 Default settings, which give internal sbt settings something like Plugin.globalSettings. 2013-05-09 17:28:40 -04:00
Mark Harrah c863a03d89 support filtering the Scopes that a derived setting is applied in 2013-05-09 17:28:39 -04:00
Mark Harrah ea6eb01e6e more specific error when dependencies of a derived setting are undefined 2013-05-09 17:28:39 -04:00
Mark Harrah 60b714e8de require dynamic initialization to be explicitly enabled for derived settings 2013-05-09 17:28:39 -04:00
Mark Harrah 1b784082a3 ensure a derived setting is only injected into a scope once 2013-05-09 17:28:39 -04:00