Commit Graph

918 Commits

Author SHA1 Message Date
Mark Harrah 9d21724129 API for evaluating a setting or task in multiple scopes 2013-03-27 09:17:53 -04:00
Mark Harrah 033fd23314 Logger.Null that discards logged messages 2013-03-13 12:40:03 -04:00
Mark Harrah b951c2c2cc Construct input tasks in multiple steps to allow input task reuse. Fixes #407. 2013-03-08 14:23:30 -05:00
Mark Harrah 4abc8f3d7b make classpaths exported 2013-02-28 17:59:38 -05:00
Mark Harrah 283ebc0dcb Export approximate command lines executed for 'doc', 'compile', and 'console' 2013-02-28 17:59:38 -05:00
Mark Harrah 829d6b7513 changes needed for tests for jline 2.10 2013-02-26 09:27:57 -05:00
Mark Harrah cb9266d05a add Jline.createReader() back for source compatibility 2013-02-26 09:27:56 -05:00
Alex Dupre ae3690676e Switch from JLine 1.0 to 2.10. 2013-02-26 07:39:33 -05:00
Mark Harrah 3b93691476 Move GlobalLogBacking.newLogger to GlobalLogging to make the role of GlobalLogBacking clearer. 2013-02-25 09:24:05 -05:00
Mark Harrah 1aacd4b86d make GlobalLogging.backed less specific: AbstractLogger is fine 2013-02-25 09:24:05 -05:00
Mark Harrah d69db30af7 deprecations 2013-02-25 09:24:04 -05:00
Mark Harrah 67010fa0b2 Split ConsoleOut into its own file, track the global ConsoleOut and use it instead of StandardMain.console 2013-02-25 09:24:04 -05:00
Mark Harrah 0280216e02 Replace Scala jars in UpdateReport with ScalaProvider jars in more situations. Fixes #661.
Specifically, when the Scala version for sbt is the same as that for the project being built,
the jars in UpdateReport should be the same as those in ScalaProvider.  This is because the
loader will come from the ScalaProvider, which uses jars in the boot directory instead of the
cache.  The first part of the fix for #661 checks that loaded classes come from the classpath
and so they need to line up.
2013-02-21 20:44:26 -05:00
Grzegorz Kossakowski 39428a996d Introduce incremental compiler options.
Introduce a way to configure incremental compiler itself instead
of underlying Java/Scala compiler.

Specific list of changes in this commit:
  * Add a method to `xsbti.compile.Setup` that returns incremental
    compiler options as a `java.util.Map<String, String>`. We considered
    statis interface instead of a `Map` but based on mailing
    list feedback we decided that it's not the best way to go because
    static interface is hard to evolve it by adding new options.
  * Since passing `java.util.Map<String, String>` not very convenient
    we convert it immediately to `sbt.inc.IncOptions`
  * Add options argument to various methods/classes that implement
    incremental compilation so in the end options reach
    `sbt.inc.IncOptions` object
  * Add `incOptions` task that allows users to configure incremental
    compiler options in their build files. Default implementation of
    that tasks returns just `IncOptions.DEFAULT`
  * Both system property `xsbt.inc.debug` and `IncOptions.relationsDebug`
    trigger debugging of relations now. In the near future, we should
    deprecate use of `xsbt.inc.debug`.
2013-02-19 12:23:07 -05:00
Grzegorz Kossakowski 7c5d4c1692 Strip down trailing whitespace.
I have Eclipse configured to do that automatically when saving file.
I decided to finally commit those changes to files I touch a lot.
2013-02-19 12:18:26 -05:00
Mark Harrah 4e4455d03a Use @compileTimeOnly for .value and .parsed methods.
Needed to set position on wrapper method for correct error message position.
2013-02-19 08:54:40 -05:00
Mark Harrah badee8bacd Update to 2.10.1-RC1
Needed an explicit type in PMap to workaround an error.
Need to drop tuple assignment of parser.parsed in input task macro as a workaround
  for macro/resetAllAttrs/pattern matching/annotation issue in RC1.
2013-02-13 07:17:20 -05:00
Mark Harrah 3e2aa82fde -Xlint 2013-02-04 17:30:31 -05:00
Mark Harrah 4a08ec9c60 use standard Context.weakTypeOf 2013-01-28 17:14:53 -05:00
Mark Harrah 37063924ec Reduce InputTask to the ideal wrapper around 'State => Parser[Initialize[Task[T]]]'
Ref #407.
2013-01-28 17:14:53 -05:00
Mark Harrah 89c645db44 remove deprecated Initialize.scoped method 2013-01-28 17:14:53 -05:00
Paolo G. Giarrusso ef84332a51 Silence boring Eclipse warnings: catching all exceptions, part 2
These warning fixes are new since my last pull request, please verify.
2013-01-22 09:05:15 -05:00
Paolo G. Giarrusso e5673f7426 Silence boring Eclipse warnings: catching all exceptions
Here I make explicit where catching all exceptions is intended.
Mark Harrah corrected one decision during review.
2013-01-22 09:05:15 -05:00
Paolo G. Giarrusso dd007f9442 Silence boring Eclipse warnings: unused imports 2013-01-22 09:05:15 -05:00
Paolo G. Giarrusso cf08f2dd18 Don't catch org.scalacheck.Prop.Exception 2013-01-22 09:05:14 -05:00
Mark Harrah c826078002 Convert references to harrah/xsbt to sbt/sbt 2013-01-04 17:22:40 -05:00
Mark Harrah 169a08df55 update version for backported Parser deprecations 2013-01-03 17:40:07 -05:00
Mark Harrah 4fa45f957d require a failure message for parser 2013-01-03 11:37:40 -05:00
Mark Harrah 89ad7d720a minor cleanup of previous commit: var->val in sbt.JLine 2012-12-20 09:25:35 -05:00
Anthony 4ad81e9d04 Multi-line prompt text offset issue (ticket #625) 2012-12-20 08:56:20 -05:00
Grzegorz Kossakowski 6c5e4ae21c Follow source layout convention supported by Eclipse.
Moved source files so directory structure follow package
structure. That makes it possible to use Scala Eclipse plugin
with sbt's source code.
2012-12-07 10:27:08 -08:00
Mark Harrah 9890f71102 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 237b80eb22 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 ed41547a47 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 981ada6f4b AbsTypeTag -> WeakTypeTag and converted more settings 2012-11-17 20:23:06 -05:00
Mark Harrah 530e125a9e Scala 2.10.0-M7 2012-11-17 20:23:06 -05:00
Mark Harrah 64e000a37d 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 ec34ec580f move explicit task/setting macros to Def, move to AbsTypeTag 2012-11-17 20:23:06 -05:00
Mark Harrah 72a580d7e8 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 c95df4681b task setting macros for :=, +=, ++=
also, bump to 2.10.0-M6
2012-11-17 20:19:24 -05:00
Mark Harrah 15fec197c3 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 dbe4b74c10 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 19315265c1 taking care of deprecations removed in Scala master 2012-11-14 11:48:06 -05:00
Benjy 0e472a99f9 Analysis.groupBy implementation. 2012-11-10 19:01:41 -05:00
Mark Harrah 1f88fe9d7c 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 aee2742932 API extraction: handle any type that is annotated, not just the spec'd simple type. Fixes #559. 2012-10-05 09:06:35 -04:00
Jason Zaugg efa362c583 Fix #552 Compensate for JLine's absent EOF detection.
In the unsupported terminal mode, JLine treats a broken
stdin as an endless stream of empty lines. This is problematic
for idea-sbt-plugin: if the IntelliJ process is forcibly killed
and leaves the child SBT process running, it consumes considerable
CPU processing these.

Patching JLine itself would be the cleanest solution (the change
has already been applied to JLine 2), but I've shied away from that
and instead wrapped the InputStream that is read by JLine to
intercept the result of -1 from read(). When this happens, the
flat `inputEof` is set to true.
2012-09-23 15:58:15 -04:00
Mark Harrah c8ffd6a54d better error message for null setting values 2012-09-18 13:22:40 -04:00
Mark Harrah d17de8e83a 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
Eugene Vigdorchik 2e8fdbdf05 Extend reporter to be used by the IDE. 2012-07-24 15:35:06 -04:00