Commit Graph

406 Commits

Author SHA1 Message Date
Antonio Cunei ccf149e8bf Convert lastModified() calls to sbt.io.Milli.getModifiedTime() 2017-12-06 20:29:41 +01:00
Eugene Yokota 1388f4e52c Merge branch '1.0.x' into wip/bump_scala 2017-11-28 23:05:33 -05:00
xuwei-k b8086e0768 make strict some methods in Completions 2017-11-23 15:21:02 +09:00
Leonard Ehrenfried 3cc56ad0ba
Add performance test 2017-11-08 21:36:11 +01:00
Leonard Ehrenfried 48f9cf3be6
Disable calculation of log4j caller location information 2017-11-08 21:36:11 +01:00
Dale Wijnand 9f1d60be60
Rewrite to polymorphic function syntax 2017-10-25 10:23:46 +01:00
Dale Wijnand f662fdda8e
Rewrite to function syntax 2017-10-25 10:22:48 +01:00
Dale Wijnand fb17cc393f
Rewrite to inline syntax 2017-10-25 10:22:48 +01:00
Dale Wijnand 35c3542492
Get rid of Fn1 2017-10-25 10:21:00 +01:00
Dale Wijnand 34f9e56311
Introduce and use KList.Aux 2017-10-25 10:15:29 +01:00
Dale Wijnand 3cd8f4dadf
Simplify Initialize.joinAny 2017-10-25 10:15:29 +01:00
Dale Wijnand 81c5eaec33 Merge pull request #3633 from dwijnand/misc-2017-10-12
Misc 2017-10-12
2017-10-24 20:37:20 +01:00
Simon Schäfer dc5411836a Fix warnings in util-copmlete project
There were warnings because of
- unused pattern match values
- deprecations
- unused methods (`def unary_-` and `def -`)
2017-10-19 13:07:24 +02:00
Simon Schäfer 38f550deef Fix warnings in util-collection project
There were warnings because of
- unused pattern match values
- deprecations
- a Xlint bug in scalac
2017-10-19 13:07:24 +02:00
Dale Wijnand 86be5359e7
Initial scaladoc Initialize/Keyed/KeyedInitialize 2017-10-12 20:31:25 +01:00
Dale Wijnand a41727fb17
Add, configure & enforce file headers 2017-10-05 09:03:40 +01:00
Dale Wijnand f4eadfc259 Merge pull request #129 from sbt/1.0.x
Merge 1.0.x
2017-10-02 10:23:02 +01:00
Eugene Yokota 33a01f3ceb Unified slash syntax
Fixes sbt/sbt#1812

This adds unified slash syntax for both sbt shell and the build.sbt DSL.
Instead of the current `<project-id>/config:intask::key`,
this adds `<project-id>/<config-ident>/intask/key` where <config-ident> is the Scala identifier notation for the configurations like `Compile` and `Test`.

This also adds a series of implicits called `SlashSyntax` that adds `/` operators to project refererences, configuration, and keys such that the same syntax works in build.sbt.

These examples work for both from the shell and in build.sbt.

    Global / cancelable
    ThisBuild / scalaVersion
    Test / test
    root / Compile / compile / scalacOptions
    ProjectRef(uri("file:/xxx/helloworld/"),"root")/Compile/scalacOptions
    Zero / Zero / name

The inspect command now outputs something that can be copy-pasted:

    > inspect compile
    [info] Task: sbt.inc.Analysis
    [info] Description:
    [info] 	Compiles sources.
    [info] Provided by:
    [info] 	ProjectRef(uri("file:/xxx/helloworld/"),"root")/Compile/compile
    [info] Defined at:
    [info] 	(sbt.Defaults) Defaults.scala:326
    [info] Dependencies:
    [info] 	Compile/manipulateBytecode
    [info] 	Compile/incCompileSetup
    [info] Reverse dependencies:
    [info] 	Compile/printWarnings
    [info] 	Compile/products
    [info] 	Compile/discoveredSbtPlugins
    [info] 	Compile/discoveredMainClasses
    [info] Delegates:
    [info] 	Compile/compile
    [info] 	compile
    [info] 	ThisBuild/Compile/compile
    [info] 	ThisBuild/compile
    [info] 	Zero/Compile/compile
    [info] 	Global/compile
    [info] Related:
    [info] 	Test/compile
2017-09-28 01:01:43 -04:00
Eugene Yokota ddb6a13feb Provide JValue pass-through 2017-09-24 06:36:18 -04:00
Eugene Yokota 348a077797 implement tokenfile authentication 2017-09-21 23:05:48 -04:00
kczulko e9fa4201fb Fix review issue. Add 't.restore' before function call. 2017-09-14 09:34:06 +02:00
kczulko b6a3ca1937 Fix for text echo issue when running sbt. 2017-09-11 11:49:10 +02:00
eugene yokota cba6f83447 Merge pull request #122 from tom-walford/1.x
Cleaned up the deprecation messages to point to the correct classes.
2017-08-28 11:43:29 -04:00
tom.walford 83433d40e6 Cleaned up the deprecation messages to point to the correct classes. 2017-08-25 20:47:36 +01:00
Eugene Yokota b2be0f766a Attempt to solve the logger NPE issue
Fixes sbt/util#119

1. perform the string codec registration once.
2. add retries.
2017-08-25 12:01:34 -04:00
Eugene Yokota f74e3e66f1 Trying to reproduce sbt/util#119 2017-08-24 17:51:50 -04:00
Dale Wijnand 805b76f3d4
Add back, re-configure & re-enable Scalafmt 2017-08-10 16:35:23 +01:00
Dale Wijnand d31b9c5093
Add, configure & enable Scalafmt 2017-08-10 11:44:24 +01:00
Eugene Yokota 930489eba3 Fix ConsoleAppender to show full stack trace
This is modification of crash log event logging that was added in sbt/util#85.

Instead of using the hardcoded 0 as the default value, this introduces `setTrace(..)` to `ConsoleAppender` like `BasicLogger`. Also the default value is set to `Int.MaxValue` that will display the full stack trace.

Fixes sbt/sbt#3343
2017-07-26 00:03:07 -04:00
Eugene Yokota 5183f7ef81 Use event logging to send success
Fixes sbt/sbt#3213
2017-07-25 16:16:21 -04:00
Eugene Yokota 467617a4b9 Implement withRank 2017-07-25 01:50:53 -04:00
Eugene Yokota d796084ff4 Filter out color in CosoleAppender only
Fixes sbt/sbt#3348
Ref #101

The new logger, based on log4j separates the concern of the log producer (Logger) and the handlers that takes actions (Appender, e.g for displaying on Console). As such filtering of color should be performed only in the ConsoleAppender.
2017-07-24 23:54:25 -04:00
Eugene Yokota f6370063f4 Deprecate ansiCodesSupported from the logger 2017-07-24 23:20:05 -04:00
Eugene Yokota 7b2b7d696b Don't wrap InputStream for Windows
Ref #3282

We used to wrap InputStream so it will inject Thread.sleep, which then allows the thread to be cancelled, emulating a non-blocking readLine. This trick doesn't seem to work for Windows.
For non-Cygwin, actually just removing the wrapping does the job, but I couldn't get it to work for Cygwin.

To test, run some command via network, and then type `show name` into the terminal. On Cygwin, it will not respond.
2017-07-22 03:34:10 -04:00
Olli Helenius a38d3d6c69 Delegate ansiCodesSupported to ConsoleAppender
Fixes sbt/sbt#3336.
2017-07-18 19:57:57 +03:00
Martin Duhem ddcc909195 Re-fix ConsoleAppender
It turns out that calling `print` on `ConsoleOut` doesn't flush the
output. Remove `writeLine` and let `write` directly use `println`.
2017-07-17 14:36:03 +02:00
Dale Wijnand 81277cbf62 Merge pull request #99 from dwijnand/prereset
Add a RESET at the front of the appendLog line
2017-07-17 10:55:39 +01:00
Dale Wijnand e744985b6b
Add a RESET at the front of the appendLog line 2017-07-17 10:42:39 +01:00
Martin Duhem 28ab7ac79d
Fix logger printing too many newlines 2017-07-17 10:05:58 +02:00
Eugene Yokota 8d159b87a2 Fix test 2017-07-17 02:14:17 -04:00
eugene yokota 72f823c80b Merge pull request #91 from Duhemm/wip/cleanup-consoleappender
Cleanup `ConsoleAppender`
2017-07-15 13:17:02 -04:00
Eugene Yokota 8b5210f84d Bump to latest Contraband 2017-07-15 10:36:03 -04:00
eugene yokota 0e6e3a0a2c Merge branch '1.0' into wip/cleanup-consoleappender 2017-07-14 13:07:29 -04:00
jvican 18a73db57d
Remove unnecessary F0, F1 and Maybe
`F0`, `F1` and `Maybe` have become useless since Java 8 introduced
`Supplier`, `Function` and `Optional` in the default Java 8 standard
library.

Therefore, they are not necessary anymore. This change is required to
change some Zinc's and sbt APIs. They are not widely used, so the
changes will be small.
2017-07-14 15:56:34 +02:00
Eugene Yokota 19b3e47972 Fix casting error during initialization
While running scripted, you see

```
ERROR StatusLogger Unable to create custom ContextSelector. Falling back to default.
 java.lang.ClassCastException: Cannot cast org.apache.logging.log4j.core.async.AsyncLoggerContextSelector to org.apache.logging.log4j.core.selector.ContextSelector
	at java.lang.Class.cast(Class.java:3369)
	at org.apache.logging.log4j.util.LoaderUtil.newCheckedInstanceOf(LoaderUtil.java:201)
	at org.apache.logging.log4j.util.LoaderUtil.newCheckedInstanceOfProperty(LoaderUtil.java:226)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.createContextSelector(Log4jContextFactory.java:97)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.<init>(Log4jContextFactory.java:58)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)
	at org.apache.logging.log4j.LogManager.<clinit>(LogManager.java:94)
	at org.apache.logging.log4j.spi.ThreadContextMapFactory.createThreadContextMap(ThreadContextMapFactory.java:73)
	at org.apache.logging.log4j.ThreadContext.init(ThreadContext.java:223)
	at org.apache.logging.log4j.ThreadContext.<clinit>(ThreadContext.java:202)
	at org.apache.logging.log4j.core.impl.ContextDataInjectorFactory.createDefaultInjector(ContextDataInjectorFactory.java:83)
	at org.apache.logging.log4j.core.impl.ContextDataInjectorFactory.createInjector(ContextDataInjectorFactory.java:67)
	at org.apache.logging.log4j.core.lookup.ContextMapLookup.<init>(ContextMapLookup.java:34)
	at org.apache.logging.log4j.core.lookup.Interpolator.<init>(Interpolator.java:117)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.<init>(AbstractConfiguration.java:125)
	at org.apache.logging.log4j.core.config.DefaultConfiguration.<init>(DefaultConfiguration.java:46)
	at org.apache.logging.log4j.core.layout.PatternLayout$Builder.build(PatternLayout.java:650)
	at org.apache.logging.log4j.core.layout.PatternLayout.createDefaultLayout(PatternLayout.java:487)
	at sbt.internal.util.ConsoleAppender.<init>(ConsoleAppender.scala:245)
```

This aims to workaround the casting error during PatternLayout.createDefaultLayout()
that was originally used for ConsoleAppender.
The stacktrace shows it's having issue initializing default DefaultConfiguration.
Since we currently do not use Layout inside ConsoleAppender, the actual pattern is not relevant.
2017-07-14 07:39:05 -04:00
Martin Duhem f55a509fdd
Cleanup `ConsoleAppender` 2017-07-11 16:08:58 +02:00
Dale Wijnand 9d7f7bf0ec
Remove modules that have moved back to sbt/sbt 2017-07-07 14:41:32 +01:00
Dale Wijnand dc2d4d613f
Format in-sourced util modules 2017-07-07 12:12:59 +01:00
Dale Wijnand 9494967e05
Upgrade util/lm/zinc & config build for util modules
Welcome back home!
2017-07-07 12:11:59 +01:00
Dale Wijnand a77d3146ab
Breakout Position to drop lm->collection dep 2017-07-07 09:50:39 +01:00
Dale Wijnand 2cc93f2382
Move Showlines to logging to drop logging->collection dep 2017-07-07 09:50:38 +01:00
Dale Wijnand cc3f46f996
Move HListFormats to collection to drop cache->collection dep
Looks like the reason that util-cache depended on util-collection was to
define the sjson-new formats (HListFormats) for util-collection's HList.
Given that util-collection already depends on sjsonnew, HListFormats can
also be defined in util-collection.

All that was left then was (a) HListFormatSpec requires
sjsonnewScalaJson, so that was added in test scope, and (b) HListFormats
had to be dropped from sbt.util.CacheImplicits - HListFormats will have
to be imported and/or mixed-in where required downstream. For importing
convenience I defined a companion object.
2017-07-07 09:50:38 +01:00
Dale Wijnand 090eab0736
Get rid of Eval 2017-07-07 09:50:36 +01:00
Dale Wijnand f0057fcdec
Rename to StrictMode 2017-07-07 09:50:35 +01:00
Dale Wijnand 0713e31cea
Allow opting out of the fallback OptJsonWriter
Simply

    import OptJsonWriter.OptOut._

And you'll get the implicit lift, but not the implicit fallback.

You get an ambiguous compile error like this:

    [error] /d/sbt-util/internal/util-collection/src/main/scala/sbt/util/OptJsonWriter.scala:28: ambiguous implicit values:
    [error]  both method conflictingFallback1 in trait OptOut0 of type [A]=> sbt.util.NoJsonWriter[A]
    [error]  and method conflictingFallback2 in trait OptOut0 of type [A]=> sbt.util.NoJsonWriter[A]
    [error]  match expected type sbt.util.OptJsonWriter[Foo]
    [error]     val x = implicitly[OptJsonWriter[Foo]]
    [error]                       ^
2017-07-07 09:50:35 +01:00
Dale Wijnand 9cfa17d09e
Move OptJsonWriter to public API 2017-07-07 09:50:34 +01:00
Dale Wijnand ae4e53ceb0
Define OptJsonWriter & put it on AttributeKey 2017-07-07 09:50:34 +01:00
Dale Wijnand c81b8de966
Merge pull request #71 from eed3si9n/wip/eventlogging
event logging
2017-07-07 09:50:33 +01:00
Eugene Yokota 73b24681c5
Implements registerStringCodec
Uses TypeTag to recover the full name of type parameter, which is calculated by StringTypeTag. This is sent along in ObjectEvent.
On the other end, we can lookup typeclass instances using the tag key.
2017-07-07 09:50:32 +01:00
Eugene Yokota 1b19c504a4
Revert "Merge pull request #41 from eed3si9n/wip/2469"
This reverts commit 0da2f30ee8, reversing
changes made to 93418589b7.
2017-07-07 09:50:31 +01:00
Eugene Yokota cfc5efe798
Work around Scala 2.12 init deadlock (SI-9824) 2017-07-07 09:50:30 +01:00
Eugene Yokota 58be28e399
Update Eval
https://github.com/typelevel/cats/blob/e2335730a958ce605f0d75f1b0d838454
2336aaf/core/src/main/scala/cats/Eval.scala
2017-07-07 09:50:30 +01:00
Dale Wijnand 1526bf4f85
Remove deprecated methods 2017-07-07 09:50:28 +01:00
Dale Wijnand 95d52077db
Lazily concatenate failed errors for completion [forwardport] (#53)
* Fixes [sbt/sbt#2781]
* When using `<TAB>` completion the failed errors were always
  computed for mathcing projects even if there was no failure,
  leading to excessive computation of Levenshtein distances
  and a large lag (seconds) on builds with many matching
  projects.
2017-07-07 09:50:28 +01:00
Dale Wijnand 042d3de956
Really expose Eval. Fixes error in #50 2017-07-07 09:50:27 +01:00
Dale Wijnand f6e4c7c85e
Expose Eval. Fixes sbt/sbt#2616 2017-07-07 09:50:25 +01:00
Eugene Yokota d059b2f486
Handle sleep interruption 2017-07-07 09:50:24 +01:00
Eugene Yokota 43215db815
Trying to make readline timeout 2017-07-07 09:50:23 +01:00
Dale Wijnand 84af84c301
Un-deprecate now-private methods 2017-07-07 09:50:22 +01:00
Dale Wijnand c4e6caf0ed
Remove Attribute#rawLabel 2017-07-07 09:50:22 +01:00
Dale Wijnand 8cc4a54c40
Add -Ywarn-unused & -Ywarn-unused-import, & fix warnings 2017-07-07 09:50:21 +01:00
Dale Wijnand 5f2e56a5a8
Fix compilation warnings, migrate to blackbox.Context 2017-07-07 09:50:21 +01:00
Eugene Yokota b64e505746
Update dependencies 2017-07-07 09:50:20 +01:00
Martin Duhem 27dee66399
Address problems reported by Codacy 2017-07-07 09:50:19 +01:00
Martin Duhem dca7a109ac
Completion for build-level keys
sbt's shell provided completion only for keys that were relative to a
defined project, but didn't provide completion for keys that belong to
the build definition only.

This commit fixes this issue by defining a new kind of `Parser` (from
which completions are generated) which runs its input simultaneously on
distinct parsers. We now define a parser for project-level keys and
another parser for build-level keys. These two parsers are eventually
combined, and we get the completions of both parsers.

Fixes sbt/sbt#2460
2017-07-07 09:50:18 +01:00
eugene yokota d4116b03f4
Fixes #2480. Workaround for Jline regression (#2570)
Workaround jline/jline2#205
2017-07-07 09:50:17 +01:00
Eugene Yokota d9bd056a29
Remove some warnings 2017-07-07 09:50:16 +01:00
Eugene Yokota 1361e4f18d
Rename Eval#value to get 2017-07-07 09:50:15 +01:00
Eugene Yokota f76b2d05d5
Add Eval from Cats - a8ba943fff/core/src/main/scala/cats/Eval.scala 2017-07-07 09:50:14 +01:00
Eugene Yokota 5811e8a257
Fixes #32. Don't inject thread sleep by default.
Thread sleeping interferes with scripted test when the build cannot be
loaded. The scripted test gets stuck, and jstack shows

    java.lang.Thread.State: TIMED_WAITING (sleeping)
      at java.lang.Thread.sleep(Native Method)
      at sbt.internal.util.InputStreamWrapper.read(LineReader.scala:138)
      at
jline.internal.NonBlockingInputStream.read(NonBlockingInputStream.java:2
45)
      ....
      at sbt.internal.util.JLine$.withJLine(LineReader.scala:118)
      at sbt.internal.util.JLine.readLine(LineReader.scala:18)
      at
sbt.BuiltinCommands$.sbt$BuiltinCommands$$doLoadFailed(Main.scala:460)
2017-07-07 09:50:13 +01:00
eugene yokota 657c10f9d3
Merge pull request #31 from sbt/wip/thread
Inject thread.sleep, which allows thread interruption during readLine
2017-07-07 09:50:13 +01:00
Eugene Yokota 1dfd9db2c7
Inject Thread.sleep periodically during read() to allow thread interruption 2017-07-07 09:50:12 +01:00
Eugene Yokota 972450db5d
Refactor nulls to Option 2017-07-07 09:50:12 +01:00
Dale Wijnand db08c77660
Unexecute Positions 2017-07-07 09:50:10 +01:00
Eugene Yokota 7a6253a5c3
Fixes sbt/util#14 by rolling back 6175d92338 2017-07-07 09:50:09 +01:00
Eugene Yokota 2cefe315f2
New house rules 2017-07-07 09:50:08 +01:00
Martin Duhem 6eed17ad4e
Make `sbt.internal.util.JLine` private to sbt package
It was private to `sbt.internal.util`, but it is used in sbt's codebase.
2017-07-07 09:50:07 +01:00
Eugene Yokota 3bb53ae4fc
sbt.util.internal -> sbt.internal.util package 2017-07-07 09:50:05 +01:00
Eugene Yokota d93db4a634
migrate to scalatest 2.2.4 2017-07-07 09:50:05 +01:00
Eugene Yokota 53e719656f
Move util into sbt.util.internal package 2017-07-07 09:50:03 +01:00
Eugene Yokota 7e3ad3631c
Removes a warning. Ref #4
Exhaustion check was not picking up StaticScopes, which is an object.
2017-07-07 09:50:02 +01:00
Martin Duhem 6c7e69497f
Add recommended compiler flags, fix most of the warnings 2017-07-07 09:50:00 +01:00
Martin Duhem c0f55127db
Add sbt-houserules, formatting. 2017-07-07 09:49:59 +01:00
Martin Duhem 39d66c4602
Update IO library to sbt/IO v1.0.0-M1 2017-07-07 09:49:58 +01:00
Eugene Yokota 7f57853f23
move modules around. 2017-07-07 09:49:58 +01:00
Dale Wijnand 48d82f95c2
Breakout Position to drop lm->collection dep 2017-07-03 12:04:45 +01:00
Dale Wijnand 84180ec402
Move Showlines to logging to drop logging->collection dep 2017-07-03 12:04:45 +01:00
Dale Wijnand f8d67d6837
Move HListFormats to collection to drop cache->collection dep
Looks like the reason that util-cache depended on util-collection was to
define the sjson-new formats (HListFormats) for util-collection's HList.
Given that util-collection already depends on sjsonnew, HListFormats can
also be defined in util-collection.

All that was left then was (a) HListFormatSpec requires
sjsonnewScalaJson, so that was added in test scope, and (b) HListFormats
had to be dropped from sbt.util.CacheImplicits - HListFormats will have
to be imported and/or mixed-in where required downstream. For importing
convenience I defined a companion object.
2017-07-03 12:04:44 +01:00
Eugene Yokota 2d777a85ee clean up warnings 2017-07-01 07:47:39 -04:00
Eugene Yokota 4e01a35917 Contraband update 2017-07-01 07:47:19 -04:00
Dale Wijnand a99a99ce43 Merge pull request #85 from eed3si9n/wip/crashlog
send TraceEvent on crash
2017-06-30 12:23:18 +01:00
Eugene Yokota 32d6bf38cf send TraceEvent on crash
Fixes sbt/sbt#3234
2017-06-28 02:18:03 -04:00
Dale Wijnand 03213f84c8
Get rid of Eval 2017-06-21 11:36:02 +01:00
Eugene Yokota f2cc5ee775 convert log4j async LogEvent to an immutable one
This fixes the buffered log not showing up for tests.

Ref sbt/sbt#3198
2017-05-18 00:36:24 -04:00
Eugene Yokota feeb6291cd Add toString for ObjectEvent 2017-05-18 00:34:41 -04:00
Eugene Yokota f48848e5d4 Adds overrides for File-based caching
sbt/util#45 implemented caching using sjson-new. Now many of the functions take `CacheStore` that abstracts the caching ability.

sbt/sbt#3109 demonstrates that setting up CacheStore requires boilerplate involving concepts introduced in sbt 1.

This change adds back overrides using File by making assumption that majority of the time we would want standard JSON converter.
2017-04-17 10:24:54 -04:00
Dale Wijnand d088d16d78
Drop (out-X) from the log output
Fixes sbt/sbt#3056
2017-04-04 14:15:01 +01:00
Eugene Yokota 1dab826ffd Store JValue into ObjectEvent 2017-04-03 03:22:33 -04:00
Eugene Yokota e21c78ebb0 Move JValue format here 2017-04-03 03:22:04 -04:00
Eugene Yokota 94a2e6cb12 Fix directory name 2017-04-03 03:21:14 -04:00
Dale Wijnand d91c3de736
Rename to StrictMode 2017-03-21 21:50:45 +00:00
Dale Wijnand 6c7f99005e
Allow opting out of the fallback OptJsonWriter
Simply

    import OptJsonWriter.OptOut._

And you'll get the implicit lift, but not the implicit fallback.

You get an ambiguous compile error like this:

    [error] /d/sbt-util/internal/util-collection/src/main/scala/sbt/util/OptJsonWriter.scala:28: ambiguous implicit values:
    [error]  both method conflictingFallback1 in trait OptOut0 of type [A]=> sbt.util.NoJsonWriter[A]
    [error]  and method conflictingFallback2 in trait OptOut0 of type [A]=> sbt.util.NoJsonWriter[A]
    [error]  match expected type sbt.util.OptJsonWriter[Foo]
    [error]     val x = implicitly[OptJsonWriter[Foo]]
    [error]                       ^
2017-03-21 17:12:10 +00:00
Dale Wijnand e984875b77
Move OptJsonWriter to public API 2017-03-21 10:47:01 +00:00
Dale Wijnand bbeecae0b1
Define OptJsonWriter & put it on AttributeKey 2017-03-21 00:09:17 +00:00
Eugene Yokota a12045ed42 some change for Scala 2.10 2017-02-15 18:52:04 -05:00
Dale Wijnand b6cad50327 Merge pull request #71 from eed3si9n/wip/eventlogging
event logging
2017-02-08 16:37:10 +00:00
Eugene Yokota a9377ce4a6 Implements registerStringCodec
Uses TypeTag to recover the full name of type parameter, which is calculated by StringTypeTag. This is sent along in ObjectEvent.
On the other end, we can lookup typeclass instances using the tag key.
2017-02-08 05:35:49 -05:00
eugene yokota 5306e29290 Merge pull request #69 from eed3si9n/fport/2855
[fport] Add build-level keys to the tab completion
2017-01-26 10:31:41 -05:00
Eugene Yokota 6e2f77f852 ProblemFormats 2017-01-25 23:25:24 -05:00
Eugene Yokota 1320c96953 Rename log events 2017-01-25 23:15:31 -05:00
Eugene Yokota f76e3aa2bb use java.util.Optional in Position 2017-01-25 20:58:37 -05:00
Eugene Yokota c985d9cdc0 Switch Scripted tests to used ManagedLogger 2017-01-24 21:13:58 -05:00
Eugene Yokota 51f9f91038 Adds BufferedAppender 2017-01-24 21:13:38 -05:00
Eugene Yokota 56b51df66b Avoid default params 2017-01-24 20:29:35 -05:00
Eugene Yokota 08e9ce9526 Implement basic event logging 2017-01-23 16:38:14 -05:00
Eugene Yokota ca6a0be602 Handle ReusableObjectMessage
When log4j2 is not using async logging, it sends the ObjectMessage using ReusableObjectMessage.
2017-01-18 06:54:15 -05:00
Eugene Yokota ef2d079494 Revert "Merge pull request #41 from eed3si9n/wip/2469"
This reverts commit 0da2f30ee8, reversing
changes made to 93418589b7.
2017-01-16 13:26:31 -05:00
Eugene Yokota 36eeb4578d Reimplement multi-logger using log4j2
This introduces ManagedLogger, which is a wrapper around Log4j2's async logging.
Log4j2 separates the notion of logger (the code that collects events) and appender (the code that acts on events). The old code is kept around intentionally to minimize breakage during transition.
2017-01-13 02:49:12 -05:00
Eugene Yokota 008f9bee2e Work around Scala 2.12 init deadlock (SI-9824) 2016-12-22 14:37:59 -05:00
Eugene Yokota 61bdfd4367 Update Eval
https://github.com/typelevel/cats/blob/e2335730a958ce605f0d75f1b0d838454
2336aaf/core/src/main/scala/cats/Eval.scala
2016-12-22 11:50:34 -05:00
Dale Wijnand 7688de459b
Fix JsonFormat[HList]
Introduce HListJF, used as an inner TC so the outer HCons/HNil
JsonFormat can manage when the array starts and ends.
2016-12-19 15:26:10 +00:00
Dale Wijnand ac14fc8de8
Find a way to give FilesInfo an implicit JsonFormat 2016-12-01 14:38:57 +00:00
Dale Wijnand 92e90c559b
Fix stackoverflow in implicit FilesInfo JsonFormat
Fixes #61

* move it back into style
* use that in Tracked (uncomment some code)
* specify the style in the spec test
* must define absolute file.. (doesn't pass with relative, which is wrong imo)
2016-11-30 16:52:10 +00:00
Dale Wijnand 1368f5f9db
Cleanup Input/Output/CacheStore 2016-11-30 16:51:51 +00:00
Dale Wijnand c6e793b03c
Test FilesInfo brokenness 2016-11-30 16:51:51 +00:00
Dale Wijnand 71d104da3d
Tweaks in FileInfo 2016-11-30 16:51:51 +00:00
Dale Wijnand 875a30cc70
Cleanup FileInfo 2016-11-30 16:51:51 +00:00
Dale Wijnand 998cffd9ab
Change hlist format to serialise to flat array 2016-11-28 18:57:51 +00:00
Dale Wijnand bcd5e800c4
Remove InputStream/OutputStream support 2016-11-28 11:11:10 +00:00
Dale Wijnand ab9165ab04
Remove formats already present upstream in sjson-new 2016-11-28 10:36:34 +00:00
Dale Wijnand ab08e1a9d5
Add back additional formats.
At least a subset of these are required for sbt/sbt to migrate away from
sbinary.

This reverts commit cee43575ce.
2016-11-25 11:42:07 +00:00
eugene yokota cf2f4111ec Merge pull request #57 from dwijnand/deprecations
Remove deprecated methods
2016-11-15 12:42:59 -05:00
Dale Wijnand 033adfe4ea
Remove deprecated methods 2016-11-15 17:14:10 +00:00
Dale Wijnand 41c7e9b85d
Improve xsbti.Maybe
* Make Nothing a singleton
* Make Maybe's constructor private
* Optimise equals to use reference equality first
* Optimise Just.equals by having proper, non-anonymous subclasses
* Having non-anonymous subclasses makes them have nicer classnames
* Give Just a value() method
2016-10-31 15:33:39 +00:00
Dale Wijnand ea56f331a1 Lazily concatenate failed errors for completion [forwardport] (#53)
* Fixes [sbt/sbt#2781]
* When using `<TAB>` completion the failed errors were always
  computed for mathcing projects even if there was no failure,
  leading to excessive computation of Levenshtein distances
  and a large lag (seconds) on builds with many matching
  projects.
2016-10-31 09:23:38 +00:00
Dale Wijnand 8d2f106f7a
Really expose Eval. Fixes error in #50 2016-10-28 12:19:41 +01:00
Dale Wijnand 881ab0f298
Expose Eval. Fixes sbt/sbt#2616 2016-10-27 11:13:45 +01:00
eugene yokota 1a9b515e33 Merge pull request #45 from Duhemm/wip/remove-sbinary
Caching based on sjsonnew
2016-10-25 19:22:57 -04:00
eugene yokota fba4e78543 Merge pull request #46 from Duhemm/wip/maybe-equals
Implement hashCode, equals and toString in Maybe
2016-09-14 11:26:20 -04:00
Eugene Yokota a38e100678 Handle sleep interruption 2016-09-12 23:11:20 -04:00
Eugene Yokota bc32cb4c6f Trying to make readline timeout 2016-09-12 23:11:20 -04:00
Martin Duhem 8956da53a8 Update to latest revision of sjsonnew 2016-08-21 19:56:31 +02:00
Martin Duhem cee43575ce Remove unused additional formats 2016-08-21 17:52:08 +02:00
Martin Duhem 4e233d81f9 Make Maybe's toString closer to the actual code 2016-08-21 14:24:34 +02:00
Martin Duhem 432c93b0bb Implement hashCode, equals and toString in Maybe
This brings Maybe's behavior closer to scala's Option.
2016-08-19 15:52:17 +02:00
Martin Duhem feda07b896 Adapt to recent changes to sjson-new 2016-07-24 21:42:03 +01:00
Martin Duhem 465774b13c Adapt to recent changes to sbt-datatype 2016-07-24 21:10:36 +01:00
Martin Duhem c395bd14a8 Add `sub` to `CacheStoreFactory` 2016-06-28 19:44:51 +02:00
Martin Duhem eda708dfeb Add `StreamFormat` and `HListFormat` 2016-06-28 19:44:32 +02:00
Martin Duhem 4cffccc8c8 Caching based on sjsonnew 2016-06-28 11:17:38 +02:00
Dale Wijnand 5ecfc4d59f Un-deprecate now-private methods 2016-06-19 23:16:59 +01:00
Dale Wijnand 745bf4dc6d Remove Attribute#rawLabel 2016-06-19 21:21:08 +01:00
Dale Wijnand 121e7f5d9e Add -Ywarn-unused & -Ywarn-unused-import, & fix warnings 2016-06-19 11:42:31 +01:00
Dale Wijnand d0826ff13c Fix compilation warnings, migrate to blackbox.Context 2016-06-19 11:16:02 +01:00
Eugene Yokota 9c49a0ed9f Update dependencies 2016-05-04 16:27:29 -04:00
Martin Duhem 605beef7d3 Address problems reported by Codacy 2016-05-02 05:51:01 -04:00
Martin Duhem 1f45027b3a Completion for build-level keys
sbt's shell provided completion only for keys that were relative to a
defined project, but didn't provide completion for keys that belong to
the build definition only.

This commit fixes this issue by defining a new kind of `Parser` (from
which completions are generated) which runs its input simultaneously on
distinct parsers. We now define a parser for project-level keys and
another parser for build-level keys. These two parsers are eventually
combined, and we get the completions of both parsers.

Fixes sbt/sbt#2460
2016-05-02 05:50:28 -04:00
eugene yokota d49b6fd420 Fixes #2480. Workaround for Jline regression (#2570)
Workaround jline/jline2#205
2016-05-02 03:27:38 -04:00
Grzegorz Kossakowski 9f9ac3a9cc Scripted logger logs everything
Do not filter any logging in scripted logger by setting the log level to
Debug.
The caller of ScriptedRunner passes a logger and decides the level of
logging it wants to receive. Scripted shouldn't filter anything.
2016-04-12 20:14:10 +02:00
Grzegorz Kossakowski 89e88ff584 Run scripted tests in the alphabetical order
Makes the order deterministic and makes it easier to see the progress on
running tests.
2016-04-07 12:48:45 +02:00
Eugene Yokota 299484cee6 Remove some warnings 2016-04-01 15:27:37 -04:00
eugene yokota 844851d6d4 Merge pull request #34 from eed3si9n/wip/eval
Eval from Cats
2016-04-01 15:10:51 -04:00
eugene yokota 818e6ba97b Merge pull request #28 from Duhemm/wip/scripted-pending-no-exception
Hide stacktrace upon failure on pending scripted test
2016-04-01 01:24:32 -04:00
Eugene Yokota 183f17c192 Rename Eval#value to get 2016-04-01 00:30:35 -04:00
Eugene Yokota 6eb808def9 Add Eval from Cats - a8ba943fff/core/src/main/scala/cats/Eval.scala 2016-04-01 00:30:35 -04:00
Eugene Yokota f4055e6c5f Fixes #32. Don't inject thread sleep by default.
Thread sleeping interferes with scripted test when the build cannot be
loaded. The scripted test gets stuck, and jstack shows

    java.lang.Thread.State: TIMED_WAITING (sleeping)
      at java.lang.Thread.sleep(Native Method)
      at sbt.internal.util.InputStreamWrapper.read(LineReader.scala:138)
      at
jline.internal.NonBlockingInputStream.read(NonBlockingInputStream.java:2
45)
      ....
      at sbt.internal.util.JLine$.withJLine(LineReader.scala:118)
      at sbt.internal.util.JLine.readLine(LineReader.scala:18)
      at
sbt.BuiltinCommands$.sbt$BuiltinCommands$$doLoadFailed(Main.scala:460)
2016-03-31 01:28:55 -04:00
eugene yokota d84f82d8d4 Merge pull request #31 from sbt/wip/thread
Inject thread.sleep, which allows thread interruption during readLine
2016-03-29 15:53:46 -04:00
Eugene Yokota 073f2be487 Inject Thread.sleep periodically during read() to allow thread interruption 2016-03-18 21:58:40 -04:00
Eugene Yokota 5004b8a515 Refactor nulls to Option 2016-03-18 02:38:06 -04:00
Dale Wijnand 497db332cd Merge pull request #29 from Duhemm/fport/add-documentation-for-filefunction-cached
FPORT: add documention for FileFunction.cached
2016-02-19 23:55:07 +00:00
Dale Wijnand dc410f9842 Unexecute Positions 2016-02-14 23:00:26 +00:00
Tim Harper a48d7cb904 add documention for FileFunction.cached 2016-02-11 13:45:16 +01:00
Martin Duhem 149122ab4d Hide stacktrace upon failure on pending scripted test 2016-01-25 14:48:06 +01:00
eugene yokota 5dc798c165 Merge pull request #26 from Duhemm/scripted-core
Add scripted-core
2015-12-23 17:26:42 -05:00
Martin Duhem 23698d6664 Add scripted-core 2015-12-23 09:50:36 +01:00
Eugene Yokota 277cbd12ef Adds concrete classes 2015-12-17 00:57:24 -05:00
Eugene Yokota 121972577d Define T2 as an interface. 2015-12-16 15:54:23 -05:00
Eugene Yokota 200b351552 Adds xsbti.T2. 2015-12-16 15:46:40 -05:00
Eugene Yokota 994634fc2c Adds xsbti.F1. 2015-12-16 15:28:00 -05:00
Eugene Yokota f1edeec351 Fixes sbt/util#14 by rolling back 6175d92338 2015-09-30 21:59:20 -04:00
Eugene Yokota 79b90917ec New house rules 2015-09-16 22:42:10 -04:00
Eugene Yokota c7c697bad1 Add picklers to FileInfo 2015-09-16 21:07:41 -04:00
Martin Duhem aec925b57f Make `sbt.internal.util.JLine` private to sbt package
It was private to `sbt.internal.util`, but it is used in sbt's codebase.
2015-09-10 14:39:29 +02:00
Eugene Yokota 70b49e9a4b Comment on SI-8450 2015-09-07 01:45:39 -04:00
Eugene Yokota dc0fd2d48b move sbt.internal.util.Logger into sbt.util 2015-09-07 01:31:17 -04:00
Eugene Yokota 0a2d39673c sbt.util.internal -> sbt.internal.util package 2015-09-05 00:51:58 -04:00
Eugene Yokota c20887853e migrate to scalatest 2.2.4 2015-09-04 17:40:48 -04:00
Eugene Yokota bc54e035ef Move util into sbt.util.internal package 2015-09-04 12:54:38 -04:00
eugene yokota bc4b85e5b8 Merge pull request #10 from sbt/wip/patmatchwarning
Removes a warning. Ref #4
2015-09-04 10:13:43 -04:00
Eugene Yokota d482668c08 Removes a warning. Ref #4
Exhaustion check was not picking up StaticScopes, which is an object.
2015-09-04 07:25:16 -04:00
Eugene Yokota c9d7a0964a Removes a warning.
Ref #4. Inferred type was existential. This tightens it.
/review @Duhemm, @dwijnand
2015-09-04 06:59:57 -04:00
Martin Duhem 6175d92338 Add recommended compiler flags, fix most of the warnings 2015-08-31 15:25:10 +02:00
Martin Duhem 6603a94847 Add sbt-houserules, formatting. 2015-08-31 10:55:02 +02:00
Martin Duhem b4e27ce471 Update IO library to sbt/IO v1.0.0-M1 2015-08-31 01:51:03 +02:00
Eugene Yokota 4629053277 remove process 2015-08-20 01:00:26 -04:00
Eugene Yokota 871b4f4eef move modules around. 2015-08-20 00:59:57 -04:00