Commit Graph

372 Commits

Author SHA1 Message Date
Mark Harrah 9ab1b98d2a 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 76e0a941ba 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 c0b1bb51e6 -Xlint 2013-02-04 17:30:31 -05:00
Eugene Yokota 125727ba83 support binary version in launcher 2013-01-29 16:55:13 -05:00
Mark Harrah 13ea342b7a use standard Context.weakTypeOf 2013-01-28 17:14:53 -05:00
Mark Harrah 076480b50a Reduce InputTask to the ideal wrapper around 'State => Parser[Initialize[Task[T]]]'
Ref #407.
2013-01-28 17:14:53 -05:00
Mark Harrah 1f32688657 remove deprecated Initialize.scoped method 2013-01-28 17:14:53 -05:00
Paolo G. Giarrusso d64a0e078d 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 236143be8d 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 e6d1d02d1e Don't catch org.scalacheck.Prop.Exception 2013-01-22 09:05:14 -05:00
Mark Harrah ce439efab3 Convert references to harrah/xsbt to sbt/sbt 2013-01-04 17:22:40 -05:00
Mark Harrah 3035cbf2d1 update version for backported Parser deprecations 2013-01-03 17:40:07 -05:00
Mark Harrah 4434d84f65 require a failure message for parser 2013-01-03 11:37:40 -05:00
Mark Harrah 935267b96b minor cleanup of previous commit: var->val in sbt.JLine 2012-12-20 09:25:35 -05:00
Anthony f7031502e4 Multi-line prompt text offset issue (ticket #625) 2012-12-20 08:56:20 -05:00
Grzegorz Kossakowski ef39aeb9c1 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
Josh Suereth 0c08c1169e Bumped the Scalatest/Specs versions for 2.10.0-RC3
* Modified tests to use mutable Specs API
* Fixed a few minor specs issues.
2012-12-04 13:10:09 -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 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 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 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 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 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
Mark Harrah 1c1e5c4977 taking care of deprecations removed in Scala master 2012-11-14 11:48:06 -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 b451761478 fix broken commit 2012-11-05 10:09:39 -05:00
Mark Harrah b6ff789d44 Work around File constructor not accepting URIs for UNC paths. Fixes #564. 2012-11-05 10:02:33 -05:00
Mark Harrah 6354b174e8 Java classfile analysis: log the problematic URL when IO.urlAsFile throws an exception. Ref #564. 2012-10-15 12:42:28 -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
Jason Zaugg 2ef0fcae6a 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 607824cc22 better error message for null setting values 2012-09-18 13:22:40 -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
Mark Harrah 29dd76da85 defer opening logging output files until an actual write 2012-08-27 10:49:13 -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 8c06949957 clean up token completions and make providing a general completion function easier 2012-07-13 14:33:27 -04:00
Mark Harrah ce3ed37c8c basic code for cleaning up Manifest.toString 2012-07-13 14:33:27 -04:00
Mark Harrah 0972791b58 clean up Completions and allow arbitrary 'display' for Token 2012-07-13 14:33:27 -04:00
Mark Harrah 72e05309c5 JLine completion integration now considers a suggestion with a newline to be preformatted 2012-07-13 14:33:27 -04:00
Mark Harrah 51da95644c methods for working with Scala identifiers 2012-07-13 14:33:27 -04:00
Mark Harrah 5dd2bb8a24 print completions containing a newline first and on separate lines 2012-07-13 14:33:27 -04:00
Eugene Vigdorchik b5a29987e6 Changes required to use sbt as-is from Scala-IDE. 2012-07-13 14:33:26 -04:00
Eugene Vigdorchik a6c2054292 Break compiler dependency from 'collection' project. 2012-07-13 14:33:26 -04:00