Commit Graph

2213 Commits

Author SHA1 Message Date
Mark Harrah a8d0af9464 split out KeyMacro.enclosingTrees 2012-12-02 03:17:20 -05:00
Mark Harrah 8400b992af source positions for settings/tasks in .scala files 2012-12-02 03:17:20 -05:00
Mark Harrah 3bff14d77a taskKey,settingKey,inputKey macros to get name from the defining val 2012-12-02 03:17:20 -05:00
Mark Harrah 538f687208 Use and methods instead of mapR,mapFailure,flatFailure,flatMapR 2012-12-02 03:17:19 -05:00
Mark Harrah 5a45faf41b ConflictWarning cleanup, added strict convenience method for failing on any conflicts 2012-12-02 03:17:19 -05:00
Mark Harrah c23226d4ae comment EvaluateTask.apply methods 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
Taro L. Saito b8d111dcae Fix typo 2012-11-20 08:32:00 -05:00
Taro L. Saito 1c4d91329e Add a link to sbt-pack plugin 2012-11-20 08:32:00 -05:00
Mark Harrah 132e29415b Docs: initial pass for updated task syntax, vals in .sbt, camelCase 2012-11-19 22:14:12 -05:00
Mark Harrah bb1725f580 Allow root project to be explicitly specified in Build.rootProject 2012-11-18 10:55:26 -05:00
Mark Harrah a9289ad0ce Explicitly specify type parameters in calls to KCons in KList builder.
scalac couldn't infer the type constructor otherwise.
2012-11-18 09:20:26 -05:00
Mark Harrah 46b739aa5a bump to Scala 2.10.0-RC2 2012-11-18 09:18:22 -05:00
Mark Harrah 44c73199ca workaround for https://issues.scala-lang.org/browse/SI-6662 2012-11-17 20:23:07 -05:00
Mark Harrah a38bce8d41 Transition to all camelCase key labels.
1. Hyphenated labels are still accepted when parsing scoped keys (so 'sbt test-only' still works)
   There is currently no timeline for removing this support for hyphenated keys.
2. Only camelCase is shown for tab completion.
3. AttributeKey.rawLabel provides the unnormalized label.
   This should only be used to implement support for accepting hyphenated keys as input for compatibility.
4. AttributeKey.normLabel provides the normalized label (hyphenated converted to camelCase)
2012-11-17 20:23:07 -05:00
Mark Harrah 49e7214fe3 InputTask macro
Similar to task macros, the parsed value is accessed by calling `parsed`
on a Parser[T], Initialize[Parser[T]], or Initialize[State => Parser[T]].
Values of tasks and settings may be accessed as usual via `value`.
2012-11-17 20:23:07 -05:00
Mark Harrah 79aeb7b00e fix testListeners definition, which mixed old and new styles of definitions, resulting in runtime error
This is an example of the need for an annotation to indicate a method shouldn't survive type checking.
2012-11-17 20:23:07 -05:00
Mark Harrah 44e9c26162 bump to 2.10.0-RC1 2012-11-17 20:23:07 -05:00
Mark Harrah 522414cd99 AbsTypeTag -> WeakTypeTag and converted more settings 2012-11-17 20:23:06 -05:00
Mark Harrah e47a357ab7 Resolve Scala version for projects in the normal `update` task.
1. Scala jars won't be copied to the boot directory, except for those needed to run sbt.
2. Scala SNAPSHOTs behave like normal SNAPSHOTs.  In particular, running `update` will properly re-resolve the dynamic revision.
3. Scala jars are resolved using the same repositories and configuration as other dependencies.
4. Classloaders (currently, Scala classloaders) are cached by the timestamps of entries instead of Scala class loaders being cached by version.

TODO: Support external dependency configuration
2012-11-17 20:23:06 -05:00
Mark Harrah 4cc5bece70 address a valid unchecked warning
In order to correctly pattern match Tree subclasses in reflection/macros,
scalac needs the corresponding implicit for *Tag available because the types
are only abstract types.
2012-11-17 20:23:06 -05:00
Mark Harrah 2c7e9cd893 Scala 2.10.0-M7 2012-11-17 20:23:06 -05:00
Mark Harrah b453af7c45 Properly apply transformations to dynamic tasks.
That is, implement Initialize[Task[T]].flatten correctly.
This requires preserving the transformations applied in a scope so that
they can be applied to an Initialize value after static settings have been
evaluated.
2012-11-17 20:23:06 -05:00
Mark Harrah 0a642f2283 move explicit task/setting macros to Def, move to AbsTypeTag 2012-11-17 20:23:06 -05:00
Mark Harrah 3790d6656a failing use case 2012-11-17 20:23:06 -05:00
Mark Harrah 90faeff546 Task macro cleanup
* use normal TypeTree constructor
* remove unnecessary 'with Singleton' in macro utility
* integrate changes suggested by @xeno-by
* add refVar back and call asTypeConstructor instead of asType to refer to a type variable
2012-11-17 20:22:39 -05:00
Mark Harrah ce252cca0d need sbinary published against 2.10 (not in a repo yet) 2012-11-17 20:19:25 -05:00
Mark Harrah 1c22478edc task setting macros for :=, +=, ++=
also, bump to 2.10.0-M6
2012-11-17 20:19:24 -05:00
Mark Harrah 2e120ed86f split out InputTask 2012-11-17 20:19:24 -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 eecaeafbdf reorganization of main/
* split several source files
* move base settings sources (Scope, Structure, ...) into main/settings/
* breaks cycles.  In particular, setting system moved from Project to Def
2012-11-17 20:19:24 -05:00
Mark Harrah 87e406fcbd support vals/defs in build.sbt
* must start with val, lazy val, or def (no modifiers currently)
* visible only within the same .sbt file
* multiple definitions allowed without being separated by blank lines
* no blank lines allowed within a definition
2012-11-17 16:27:25 -05:00
Mark Harrah f99ba44703 Control over automatically added settings.
Project.autoSettings accepts a sequence of AddSettings, instances of which
are constructed from methods in AddSettings.  The configurable settings
are per-user settings (from ~/.sbt, for example), settings from .sbt files,
and plugin settings (project-level only).  The order in which these instances
are provided to autoSettings determines the order in which they are appended
to the settings explicitly provided in Project.settings.

For .sbt files, defaultSbtFiles adds the settings from all .sbt files in the
project's base directory as usual.  AddSettings.sbtFiles accepts a sequence
of Files that will be loaded according to the standard .sbt format.  Relative
Files are resolved against the project's base directory.

Plugin settings may be included on a per-Plugin basis by using the plugins
method and passing a Plugin => Boolean.  The settings controlled here are
only the automatic per-project settings.  Per-build and global settings will
always be included.
2012-11-16 09:56:49 -05:00
Mark Harrah 1bc26fa488 When preserving last modified, convert negative values to 0
File.lastModified can return a negative number, but File.setLastModified doesn't accept
negative numbers.  See Java bug #6791812.
2012-11-16 09:56:01 -05:00
Eugene Vigdorchik 960d17c358 Use java.lang.Throwable.setStackTrace. Proper fix for #543. 2012-11-15 10:14:59 -05:00
Mark Harrah 1c1e5c4977 taking care of deprecations removed in Scala master 2012-11-14 11:48:06 -05:00
Mark Harrah 7099ac31fd Docs: Working with macros. Closes #573. 2012-11-12 21:20:52 -05:00
Mark Harrah ce0284e187 Fixes #582. Don't merge dependencies with mismatched transitive/force/changing values.
This avoids the assertion, but note that Ivy is unlikely to work properly in this situation.
2012-11-12 14:45:36 -05:00
Eugene Vigdorchik 761a441805 Filter out null parent files when deleting empty directories. Closes #589. 2012-11-12 14:45:01 -05:00
Benjy 657d842238 Analysis.groupBy implementation. 2012-11-10 19:01:41 -05:00
Mark Harrah 9bf5405621 Fixes #594. Global plugin products weren't being included on Compile classpath of build definition project. 2012-11-10 18:18:15 -05:00
Mark Harrah 52b7dccff4 Handle removed files when skipping to recompiling all files. 2012-11-10 18:18:15 -05:00
Mark Harrah 2428b100fa fix location of sbt-git in project/source-plugins test 2012-11-10 18:18:15 -05:00
Mark Harrah 19c776e1f9 test for #594 2012-11-10 18:18:15 -05:00
Mark Harrah 89573b39b5 Docs: Generate a PDF containing only the Getting Started Guide 2012-11-10 18:18:15 -05:00
Mark Harrah 019dbb6566 Docs: concurrentRestrictions should be 'in Global' 2012-11-10 18:18:15 -05:00
Mark Harrah b2f155fab6 update to latest sbt-site plugin, generate pdf 2012-11-08 22:40:24 -05:00
Mark Harrah ca8bfe2281 precompile against 2.10.0-RC2 2012-11-08 22:40:23 -05:00
Mark Harrah dba160dd1d had to drop non-ascii unicode characters for latex for now 2012-11-08 22:40:23 -05:00
Mark Harrah b451761478 fix broken commit 2012-11-05 10:09:39 -05:00