Commit Graph

78 Commits

Author SHA1 Message Date
Dale Wijnand 6f52437e95
Fix a "discarded non-Unit value" warning in FileExamplesTest 2018-03-06 11:54:12 +00:00
Dale Wijnand 21eb1f0f12
Cleanup Attributes 2018-03-06 11:54:12 +00:00
Dale Wijnand fc73203d0b
Fix validID & expand tests
Make sure that we generate valid ID (according to matches(ID, s)) so
that we properly test the new validID implementation.

And that's what led to the bug fix. :)
2018-02-19 18:42:24 +00:00
Dale Wijnand d66d0e34a9
Add prop-based test for the validID re-impl 2018-02-19 15:00:21 +00:00
Johannes Rudolph 9370a2adf0
Speedup Parsers.validID
It turned up in profiling sessions. Previously, it used parser combinators
which are somewhat slow especially when the JVM is still cold.

The grammar for ID is simple enough to afford this handwritten parser.
2018-02-19 09:13:12 +01:00
Dale Wijnand 286758e2ba
Minor cleanups 2018-01-30 07:29:17 +00:00
Dale Wijnand 5daf10d6c7
Tweak the description of KList 2018-01-23 17:14:27 +00:00
Dale Wijnand 4a5ff4fc0d
Remove all warnings from completeProj 2017-12-12 13:02:19 +00:00
Dale Wijnand 34136fb70b
Remove all warnings from logicProj 2017-12-12 13:02:19 +00:00
Dale Wijnand b80a6b217b
Remove all warnings from collectionProj 2017-12-12 13:02:18 +00:00
xuwei-k b8086e0768 make strict some methods in Completions 2017-11-23 15:21:02 +09: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
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 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
Dale Wijnand 805b76f3d4
Add back, re-configure & re-enable Scalafmt 2017-08-10 16:35:23 +01:00
Eugene Yokota 467617a4b9 Implement withRank 2017-07-25 01:50:53 -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
Eugene Yokota 8d159b87a2 Fix test 2017-07-17 02:14:17 -04: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