Mark Harrah
3dd714b1fa
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
6b0bc78fd9
local SyncVar implementation to deal with std lib deprecations
2013-05-27 19:12:39 -04:00
Mark Harrah
61decef972
Derived settings: handle scopeLocal in derive and allow triggering dependencies to be filtered
2013-05-09 17:28:50 -04:00
Mark Harrah
19c78ac413
Show defining locations when there are cycles between derived settings
2013-05-09 17:28:50 -04:00
Mark Harrah
ed11008126
only derive settings when all dependencies are defined
2013-05-09 17:28:49 -04:00
Mark Harrah
7a10aeca37
Default settings, which give internal sbt settings something like Plugin.globalSettings.
2013-05-09 17:28:40 -04:00
Mark Harrah
6ffff6fb35
support filtering the Scopes that a derived setting is applied in
2013-05-09 17:28:39 -04:00
Mark Harrah
08e4e3786f
more specific error when dependencies of a derived setting are undefined
2013-05-09 17:28:39 -04:00
Mark Harrah
68ca419a7c
require dynamic initialization to be explicitly enabled for derived settings
2013-05-09 17:28:39 -04:00
Mark Harrah
962a163f33
ensure a derived setting is only injected into a scope once
2013-05-09 17:28:39 -04:00
Mark Harrah
94f4d4e8c0
display derived settings information in 'inspect'
2013-05-09 17:28:39 -04:00
Mark Harrah
1c741a2e06
Derived settings, which allows injecting settings wherever their dependencies are defined.
...
This is an advanced feature initially intended for internal sbt use.
2013-05-09 17:27:43 -04:00
cheeseng
b0bd2e838e
Normalize line endings.
2013-04-25 00:06:52 +08:00
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
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
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
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
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
b65a7078f1
Fix compilation error for 2.10.0-M5 for all but main project.
2012-07-17 15:20:37 -04:00
Mark Harrah
e5ffceaef8
clean up token completions and make providing a general completion function easier
2012-07-13 14:33:27 -04:00
Mark Harrah
fa97cc0d22
basic code for cleaning up Manifest.toString
2012-07-13 14:33:27 -04:00
Mark Harrah
73166e2e57
clean up Completions and allow arbitrary 'display' for Token
2012-07-13 14:33:27 -04:00
Mark Harrah
af85595da0
JLine completion integration now considers a suggestion with a newline to be preformatted
2012-07-13 14:33:27 -04:00
Mark Harrah
9fea4d1703
methods for working with Scala identifiers
2012-07-13 14:33:27 -04:00
Mark Harrah
a509c47207
print completions containing a newline first and on separate lines
2012-07-13 14:33:27 -04:00
Eugene Vigdorchik
35cfba21c0
Break compiler dependency from 'collection' project.
2012-07-13 14:33:26 -04:00
Mark Harrah
e9ed0feb87
repeatDep parser combinator
2012-07-06 10:28:51 -04:00
Mark Harrah
2196cbedaf
remove most occurrences of ScalaObject
2012-07-01 15:16:41 -04:00
Mark Harrah
fbb09b1433
fix task tests
2012-07-01 15:16:41 -04:00
Mark Harrah
4e574d0df3
better handling of multi-loggers with mixed escape sequence support
...
* multi-logger supports ansi escapes if at least one logger support them
* escape sequences removed from strings for loggers without escape support
2012-07-01 15:16:41 -04:00
Mark Harrah
935eed087f
another fix related to #460
2012-05-23 20:13:52 -04:00
Mark Harrah
fbee96939d
print message and stack trace when exception occurs in completion
2012-05-21 22:23:44 -04:00
Mark Harrah
1f9433f175
Second try at printing message when stack trace suppressed.
...
Problems:
1. Without a message, users don't find 'last'
2. Showing a message for every error clutters output.
This tries to address these issues by:
1. Only showing the message when other feedback has not been provided and
'last' would not usually be helpful. This will require ongoing tweaking.
For now, all commands except 'compile' display the message. 'update' could
omit the message as well, but perhaps knowing about 'last' might be
useful there.
2. Including the exact command to show the output:
last test:compile
and not just
last <task>
3. Highlighting the command in blue for visibility as an experiment.
Review by @ijuma and @retronym, please.
2012-05-19 18:20:19 -04:00
Mark Harrah
eec347e2dd
ensure enableEcho called after jline.Terminal.getTerminal. fixes #460
2012-05-19 18:20:19 -04:00
Eugene Vigdorchik
e5bedb3e14
Refactor according to the comments.
2012-05-17 07:24:24 -04:00
Eugene Vigdorchik
29e5143ded
Additional method in ProcessIO to process inheriting input.
2012-05-17 07:24:24 -04:00
Eugene Vigdorchik
f3253e496d
Use java 7 Redirect.INHERIT to inherit subprocess' input stream.
2012-05-17 07:24:24 -04:00
Mark Harrah
05fb991488
move to revised warning interface in the compiler
2012-05-06 14:15:03 -04:00
Mark Harrah
740094c4d2
enhance 'projects' to allow temporarily adding/removing builds to the session
2012-04-06 20:28:31 -04:00
Mark Harrah
ec8f9884e0
fix sample method interpretation of completions argument
2012-03-25 20:36:05 -04:00
Mark Harrah
94b4a3784a
rank settings, tasks and use this to restrict help/settings/tasks output. fixes #315
2012-03-25 20:35:09 -04:00
Mark Harrah
c7c4969eb7
Revert "work around for 2.10. pattern matching on KNil now requires KNil()"
...
This reverts commit 2f726b34c3 .
This commit caused "java.lang.Error: typeConstructor inapplicable for <none>" when running 'sxr'
2012-03-17 22:58:13 -04:00
Mark Harrah
474cd75d06
print-warnings task for Scala 2.10+ to avoid needing to rerun 'compile' to see deprecation/unchecked warnings
2012-03-17 19:31:55 -04:00
Mark Harrah
8fc5db4a8a
work around for 2.10. pattern matching on KNil now requires KNil()
2012-03-17 19:31:03 -04:00
Mark Harrah
0e130d29e9
fix argument parsing, which unintentionally required two characters. ref #396
2012-03-13 08:01:58 -04:00
Indrajit Raychaudhuri
51db55d847
Replace `Pair.apply` with `Util.pairID`, avoids extra class generation
2012-03-12 05:25:12 +05:30
e.e d3si9n
9239e2fd46
fixes NotQuoted
2012-03-11 15:02:50 -04:00
e.e d3si9n
feb315b878
StringVerbatim is now stateless
2012-03-11 13:19:13 -04:00
e.e d3si9n
e6e778a1a3
removed Octal
2012-03-11 13:12:23 -04:00
e.e d3si9n
8a7a3228e8
implemented parser for escaped string and verbatim string
2012-03-11 07:31:39 -04:00
Mark Harrah
48170f649a
convenience functions for testing parsers
2012-03-10 14:16:40 -05:00
Mark Harrah
d6bc087271
handle absence of CONT signal
2012-03-09 13:38:45 -05:00
Mark Harrah
1848d14815
handle CONT signal to reset JLine after resuming from stop. fixes #394
2012-03-09 07:08:38 -05:00
Mark Harrah
26be0c0be4
move error processing to complete/
2012-03-09 07:08:38 -05:00
Mark Harrah
5893aa0e55
cleanup SourcePosition hierarchy
2012-02-25 12:01:07 -05:00
Mark Harrah
4b43a154cb
cleanup, fix compilation
2012-02-19 22:41:26 -05:00
Daniel C. Sobral
be6cd00b81
Fix file descriptor leak.
...
Close an InputStream when finished reading it. When given an
OutputStream to connect to a process input, close it when the
transfer is completed. Protect System.in in this latter case.
2012-02-19 16:30:30 -05:00
Daniel C. Sobral
0f3c75a2ea
Revert "explicitly close streams"
...
Revert "explicitly close streams on java.lang.Process to avoid descriptor leaks"
This reverts commit 3191eedf9e .
2012-02-19 16:30:30 -05:00
Eugene Vigdorchik
786fe5f4ce
Remember the range for settings read from .sbt files
2012-02-16 16:58:51 +04:00
Mark Harrah
6e90399a30
Merge pull request #342 from vigdorchik/wip_sourcepos_eugenevigdorchik
...
Wip sourcepos eugenevigdorchik
2012-01-30 14:34:03 -08:00
Eugene Vigdorchik
e2c1ef32fa
More cleanup.
2012-01-30 19:06:26 +04:00
Eugene Vigdorchik
5f0774fe9a
Change SourcePosition definition + minor cleanup.
2012-01-30 19:06:24 +04:00
Eugene Vigdorchik
c6cba20682
Add SourcePosition to setting.
2012-01-30 19:06:18 +04:00
Mark Harrah
4945534614
split command core to main/command/
2012-01-29 14:36:27 -05:00
Mark Harrah
f11a053cc9
Merge branch 'parsing_changes' into 0.12
2012-01-15 13:09:41 -05:00
Mark Harrah
c3c7c92053
work around unclosed jline history-related streams
2012-01-14 21:09:11 -05:00
Mark Harrah
e23abdfce3
explicitly close streams on java.lang.Process to avoid descriptor leaks
2012-01-14 21:09:11 -05:00
Mark Harrah
74eaee5a5e
new aggregation approach, still need exclusion mechanism
2012-01-09 08:01:24 -05:00
Mark Harrah
392ec5150a
moved task axis before the key
2012-01-09 08:00:29 -05:00
Mark Harrah
a9ccd74eb8
fix 'not' parser combinator, add EOF
2011-12-13 17:29:08 -05:00
Mark Harrah
0ff6b65376
treat case differences differently
2011-12-13 17:15:05 -05:00
Mark Harrah
9e708b17e2
fixes #280 . sort aggregate and classpath dependencies separately to keep cycle detection for them separate
2011-11-27 17:48:01 -05:00
Mark Harrah
b94c6e8949
in cyclic error message, put each node string on different line
2011-11-05 08:53:42 -04:00
Mark Harrah
1578dcc46f
missing import
2011-11-04 13:44:09 -04:00
Mark Harrah
30bdcf68d4
preserve IOException type when translating exceptions. fixes #253
2011-11-04 13:40:59 -04:00
Mark Harrah
8beb823a9b
cleanup, add regex for escape sequences to be used later
2011-10-30 18:39:18 -04:00
Mark Harrah
64bf50cd08
task execution interruptible using ctrl+c. fixes #228,#229
...
- interrupts task execution only
- no further tasks scheduled
- existing tasks interrupted
- a task must terminate any other started threads when interrupted
- set cancelable to true to enable
- currently, 'run' properly terminates if the application properly
terminates when interrupted
- 'console' does not, 'test' depends on the test framework
- also bundled: set connectInput to true to connect standard input to forked run
2011-10-18 22:43:25 -04:00
Mark Harrah
5898cba4a8
brief API documentation on some core settings types
2011-10-16 20:20:45 -04:00
softprops
591f90ce71
add support for a masked readline
2011-10-13 20:42:39 -04:00
Mark Harrah
f18c44d00d
fix stackoverflow caused by using List.separate, as tracked down by pvlugter
2011-10-09 21:48:15 -04:00
Mark Harrah
ba4c6de918
generalize addArtifact arguments to Initialize[...]. fixes #207
2011-10-01 14:40:14 -04:00
Mark Harrah
5874d45525
local settings, sbt-package-private for now
2011-10-01 14:40:14 -04:00
Mark Harrah
f8e3084e8f
fix parser test
2011-10-01 14:40:14 -04:00
Mark Harrah
3d4ad0b076
fix laziness of parser failure messages
2011-09-26 08:20:07 -04:00
Mark Harrah
7d85f3c047
fix order of returned lists in Util.separate
2011-09-26 08:20:07 -04:00
Mark Harrah
9756e99e16
provide consecutive tab press count for completion combinators
2011-09-20 20:51:47 -04:00
Mark Harrah
fdb47eca8d
fix dependsOn breakage from Initialize rework
2011-08-26 23:27:03 -04:00
Mark Harrah
8e4906f410
fix undefined key suggestion for updating settings
2011-08-14 10:53:38 -04:00
Mark Harrah
8ce9950327
allow setting initialization to be partially dynamic and run in parallel
2011-08-14 10:53:37 -04:00
Mark Harrah
0b5e6484ba
drop unused KApply from settings
2011-08-14 10:53:37 -04:00
Mark Harrah
93b64e0fd3
clean up undefined reference checking to be a proper function
2011-08-14 10:53:37 -04:00
Mark Harrah
4a5a64a8f0
fix ++ command to not require a space after it
2011-08-14 10:53:37 -04:00
Mark Harrah
01b27f5875
Settings overhaul, intended to be source compatible where it matters.
...
Moves many methods previously provided by implicit conversions directly onto the classes
for better discoverability, especially with scaladoc.
1. Initialize now allowed in more places. Minor renamings in Initialize to avoid conflicts
a. map -> apply
b. get -> evaluate
2. Identity on Scoped* is deprecated- it is now redundant
3. Can now use += and <+= for String, Int, Long, Double settings.
There may be some problematic corner cases in inference, especially with +=, ++, <+=, <++=
4. Some classes with a scoped: ScopedKey[T] method now have scopedKey: ScopedKey[T] instead.
5. The implicit conversion to ScopedKey[T] is now deprecated. Use the scopedKey method.
6. :== and ::= are now private[sbt] to better reflect that they were internal use only.
2011-08-14 10:53:37 -04:00
Mark Harrah
ebddc4009f
fix ScalaProviderTest
2011-08-14 10:53:37 -04:00
Mark Harrah
b35d9bfcfb
preserve key+configuration ambiguity through task+extra parsing. fixes #135
2011-08-05 21:59:49 -04:00
Mark Harrah
baea865ecf
try out simplified display of scoped keys
2011-08-04 07:20:25 -04:00
Mark Harrah
96d46b2c7a
Seq[Setting[_]] <=> SettingsDefinition
2011-07-30 18:11:20 -04:00
Mark Harrah
65c1320c60
for undefined references, suggest the nearest defined scope that is more specific if it exists. fixes #135
2011-07-27 22:35:20 -04:00
Mark Harrah
9c70e479d8
display all undefined settings at once
2011-07-25 21:59:22 -04:00
Mark Harrah
f2328e164e
add ability to hide a token until it is explicitly started
2011-07-24 22:35:27 -04:00
Mark Harrah
a6dd6b07b5
proper resolvedScoped implementation
2011-07-19 21:29:05 -04:00
Mark Harrah
b272920ef3
clean up whitespace handling in commands. fixes #97
2011-07-12 07:47:31 -04:00
Mark Harrah
a6f7e9840c
global settings preparation: separate compilation/loading stages of Eval
2011-07-09 16:54:41 -04:00
Mark Harrah
8d778b72ed
part II of fix for #90
2011-07-09 16:54:41 -04:00
Mark Harrah
a612cc0ba1
settings example and simple test
2011-06-29 21:44:55 -04:00
Mark Harrah
c25c92da40
add missing Attributed.get method
2011-06-29 21:44:37 -04:00
Mark Harrah
9578ed3db0
move locks test to scripted tests
2011-06-26 12:27:06 -04:00
Mark Harrah
5c8d619880
apply javac log level approach to directJavac
2011-06-26 12:27:06 -04:00
Mark Harrah
2b6d5c1316
add extraLoggers to make it easier to add loggers
2011-06-22 19:17:10 -04:00
Mark Harrah
eec68ee8da
minor changes to parsers
2011-06-17 18:03:59 -04:00
Mark Harrah
8c89a8b137
honor formatEnabled setting, fixes #48
2011-06-10 08:08:51 -04:00
Mark Harrah
cb2c37afa0
rearrange products settings
...
1. enables exporting jar to classpath instead of class directory
2. starts to make post-processing class files easier
2011-05-31 18:37:07 -04:00