Commit Graph

849 Commits

Author SHA1 Message Date
Mark Harrah c23226d4ae comment EvaluateTask.apply methods 2012-12-02 03:17:19 -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 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 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 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
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 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 313bb1f8f2 deprecate Project-level delegation 2012-10-29 12:34:47 -04:00
Mark Harrah e1c3240eae split ForkTests react() out to workaround SI-6526 2012-10-29 12:22:07 -04:00
Mark Harrah e532d20732 cleanup of #585: compatible with earlier launchers 2012-10-29 09:52:10 -04:00
Eric Bowman 835ee0d1b3 XSBT-5: maven-style ivy repo support in the launcher config
Change-Id: I22c1ff126961d61d92e2e45a5b7eff329d3def90
Reviewed-on: https://gerrit.gilt.com/10950
Reviewed-by: Eric Bowman <ebowman@gilt.com>
Tested-by: Eric Bowman <ebowman@gilt.com>
2012-10-29 09:04:42 -04:00
Mark Harrah 1612af8dbb Parser.failOnException method, don't let rhs of alias fail the parse. Fixes #572.
alias only parses the right hand side for tab completion help.
The assignment should happen whether or not the parse is successful because the
context may change by the time the alias is actually evaluated.
In particular, the 'set' command uses the loaded project for tab completion in 0.12.1.
When a .sbtrc file is processed, the project has not been loaded yet, so aliases
involving set fail.  Wrapping the rhs in failOnException addresses this.
2012-10-15 12:42:27 -04:00
Mark Harrah a2c2af8b08 add [every] to syntax summary of 'set' command 2012-09-22 16:45:24 -04:00
Kevin Scaldeferri 933d5fb0fe Include all JAR packaging types in the default classpathTypes. Fixes #550
These special types need to be recognized in both the POM parser and added to the classpath.
The previous code was not DRY, and eclipse-plugin was in one but not the other.  This ensures
new types can be added in the future without risking this type of oversight.
2012-09-21 16:56:56 -04:00
Mark Harrah b353d0b94c better internal interfaces to javadoc/scaladoc/raw scalac 2012-09-18 16:30:33 -04:00
Mark Harrah 37661c9576 Strip explicitArtifacts from projectDependencies. Fixes #546.
The module definition (ModuleID) got copied as to be the dependency definition,
but as a dependency definition, it should not include explicit artifacts.
2012-09-12 14:31:57 -04:00
Mark Harrah 2010ae7b3c back all ConsoleLoggers by a common ConsoleOut
The common ConsoleOut merges (overwrites) consecutive Resolving xxxx ... lines
when ansi codes are enabled.
2012-09-01 09:56:09 -04:00
James Roper a3e9b53fe5 Pulled mapper folding into a function for reuse 2012-08-31 06:24:16 -04:00
James Roper 702ee44e0e Source position mapper support 2012-08-31 06:24:16 -04:00
Mark Harrah ed902ea565 Proper isolation of build definition classes. Fixes #536, #511. 2012-08-30 16:37:56 -04:00
Mark Harrah 9d39b5d9e1 Add valid project IDs to 'No project <x> in <uri>' error message 2012-08-30 16:37:56 -04:00
Mark Harrah 3dd3a18996 Force update on change to last modified time of artifacts or cached descriptor.
This is part 2 of the fix for #532.  It may also fix issues when working with
multiple local projects via 'publish-local' and binary dependencies.
2012-08-29 11:13:48 -04:00
Mark Harrah c7f6ce4aec per-project resolution cache that deletes cached files before each update
These are the ivy files, properties, and resolve reports for the project,
not dependencies and their artifacts.
2012-08-28 11:55:24 -04:00
Mark Harrah cbaa805511 clean up temporary directory on exit. ref #502
Directory was already empty, this just removes the empty directory.
2012-08-27 09:14:00 -04:00
Mark Harrah feffe4feb0 toStrings for some concurrent restrictions 2012-08-27 08:33:33 -04:00
Eugene Vigdorchik b4e64d37db Various fork in Test fixes. Closes #512 #515. 2012-08-25 07:15:23 -04:00
Eugene Vigdorchik adb7d42f73 Fix compilation error for 2.10.0-M5 for all but main project. 2012-07-17 15:20:37 -04:00
Mark Harrah 59c025a767 run either javadoc (Java sources only) or scaladoc (Scala only or mixed), but not both 2012-07-17 13:51:17 -04:00
Mark Harrah cbc94f9cb6 experimental tab completion for 'set' 2012-07-13 14:33:28 -04:00
Mark Harrah 2a6ad35502 correct CommandUtil.aligned to use provided prefix 2012-07-13 14:33:27 -04:00
Mark Harrah 2cf9b4bf6e combined cutoff for settings and tasks 2012-07-13 14:33:27 -04:00
Mark Harrah d6d922a858 display message after 'set' with defined and affected scopes+keys 2012-07-13 14:33:27 -04:00
Mark Harrah ad621ecbee update help for `inspect` to include latest options 2012-07-13 14:33:26 -04:00
Eugene Vigdorchik 76943e82ed Add xsbti.Reporter to required inputs instead of maxErrors. 2012-07-13 14:33:26 -04:00