Commit Graph

1592 Commits

Author SHA1 Message Date
Josh Soref 44d262844c spelling: generate 2017-01-20 08:15:31 +00:00
Josh Soref 3786aff09b spelling: exclusion 2017-01-20 08:14:52 +00:00
Josh Soref 950405f027 spelling: definition 2017-01-20 08:12:30 +00:00
Josh Soref 10c2a28d5d spelling: configuration 2017-01-20 08:11:53 +00:00
Josh Soref ffe0323803 spelling: appended 2017-01-20 08:09:24 +00:00
Eugene Yokota 904069700d Start RelayAppender automatically 2017-01-18 07:04:19 -05:00
Eugene Yokota 569e19d03c Add build-level keys to the tab completion
Fixes #2460
Fixes #2851
Ref #2707, #2708, #2469

Unlike the previous attempts at fixing the handling of build-level
keys, this change does not change the main parsing logic, which uses
`getKey` to retrieve the key from the key map.
The fact that shell worked pre-0.13.11 means that the parsing was ok.

What this changes is just the "example" keys supplied to the parser so
the tab completion works.
2017-01-16 15:39:01 -05:00
Eugene Yokota 4ea2a99c3b Revert "Completion for build-level keys"
This reverts commit e35f9bb11e.
2017-01-16 13:39:21 -05:00
Eugene Yokota 39ad8cfb7d Revert "Unspecified project axis means current project or its build"
This reverts commit 4fea604759.
2017-01-16 13:37:21 -05:00
Eugene Yokota 26bdccd80f Revert "Fix key selection for build level keys"
This reverts commit 60bcc58852.
2017-01-16 13:35:42 -05:00
Eugene Yokota ec2f6c9748 sbt-giter8-resolver 0.1.3 2017-01-16 08:44:13 -05:00
Eugene Yokota d91df1f189 Adjust to 1.0.x 2017-01-16 08:44:13 -05:00
Eugene Yokota b4a1f66aea Remove unused match 2017-01-16 08:44:13 -05:00
Eugene Yokota 2de32ca723 Refactoring per review 2017-01-16 08:44:13 -05:00
Eugene Yokota 1b79cb85b6 Safer template resolver
Fixes #2761

With sbt 0.13.13-RC1 rediscovered that the dependency pulled in from
Giter8 was affecting the plugins. To avoid this, this change splits up
the template resolver implementation to another module called
sbt-giter8-resolver, and it will be downloaded using Ivy into
`~/.sbt/0.13/templates/`, and then launched reflectively using Java as
the interface.
2017-01-16 08:44:13 -05:00
Eugene Yokota 73a427c0b8 Adds templateResolvers and `new` command
This adds `new` command, which helps create a new build definition. The
`new` command is extensible via a mechanism called the template
resolver,
which evaluates the arbitrary arguments passed to the command to find
and run a template.

As a reference implementation [Giter8][g8] is provided as follows:

    sbt new eed3si9n/hello.g8

This will run eed3si9n/hello.g8 using Giter8.

  [g8]: http://www.foundweekends.org/giter8/
2017-01-16 08:43:23 -05:00
eugene yokota e54d4ed8fd Merge pull request #2921 from eed3si9n/fport/2784
[fport] Show deprecations in build.sbt
2017-01-15 23:19:19 -05:00
eugene yokota 9044d6c07a Merge pull request #2910 from eed3si9n/wip/212
[sbt 1.0] Use Scala 2.12.1
2017-01-15 22:24:33 -05:00
eugene yokota 84ab6bf5e4 Merge pull request #2920 from eed3si9n/fport/2754
[fport] SD-232 Recycle classloaders to be anti-hostile to JIT
2017-01-15 21:01:48 -05:00
Eugene Yokota 7ddbd69e53 Use Scala 2.12.1
Bump up the Scala version used by sbt to 2.12.1.
Most changes are migration of the integration tests.
2017-01-15 20:49:14 -05:00
Eugene Yokota 00dda2a5f1 Add "-deprecattion" flag to metabuild
Fixes #2783
Ref #2716

`build.sbt` is treated a Scala source of metabuild, so to enable
deprecation flag on build.sbt we set the option here.
2017-01-15 08:53:04 -05:00
Dale Wijnand 1822d3f67b Replace var/set with withClassLoaderCache 2017-01-15 06:54:52 -05:00
Jason Zaugg 3c508ce52d SD-232 Recycle classloaders to be anti-hostile to JIT.
The compiler interface subclasses `scala.tools.nsc.Global`,
and loading this new subclass before each `compile` task forces
HotSpot JIT to deoptimize larges swathes of compiled code. It's
a bit like SBT has rigged the dice to always descend the longest
ladder in a game of Snakes and Ladders.

The slowdown seems to be larger with Scala 2.12. There are a number
of variables at play, but I think the main factor here is that
we now rely on JIT to devirtualize calls to final methods in traits
whereas we used to emit static calls. JIT does a good job at this,
so long as classloading doesn't undo that good work.

This commit extends the existing `ClassLoaderCache` to encompass
the classloader that includes the compiler interface JAR. I've
resorted to adding a var to `AnalyzingCompiler` to inject the
dependency to get the cache to the spot I need it without binary
incompatible changes to the intervening method signatures.
2017-01-15 06:42:29 -05:00
Dale Wijnand d58f89af5f Add back addPluginResolvers
See https://github.com/sbt/sbt/pull/2715/files#r79729382
2017-01-15 06:28:10 -05:00
eugene yokota 69385029ed Merge pull request #2914 from eed3si9n/fport/2681
[fport] Fix #2677: Tags.ForkedTestGroup doesn't work
2017-01-14 23:08:44 -05:00
Paul Draper f836ba0c63 Fix #2677: Tags.ForkedTestGroup doesn't work
Move tag to correct task
2017-01-14 21:58:37 -05:00
eugene yokota 28825d4eb5 Merge pull request #2912 from eed3si9n/fport/2630
[fport] Loading performance
2017-01-14 21:56:44 -05:00
eugene yokota 355b724bf2 Merge pull request #2915 from eed3si9n/wip/2692
[fport] Fixes #2686 by resetting scalaVersion for updateSbtClassifiers
2017-01-14 09:08:02 -05:00
eugene yokota fd36a20183 Merge pull request #2907 from eed3si9n/topic/logging
Split log output per channel
2017-01-14 08:34:44 -05:00
Eugene Yokota e0e9f8d1fc Fix patch error 2017-01-14 07:54:25 -05:00
Eugene Yokota f3817ad64f Fixes #2686 by resetting scalaVersion for updateSbtClassifiers
Ref #2634

updateSbtClassifiers uses an artificially created dependency graph set
in classifiersModule. The problem is that ivyScala instance is reused
from the outer scope that has the user project's scalaVersion as
demonstrated as follows:

    scala> val is = (ivyScala in updateSbtClassifiers).eval
    is: Option[sbt.IvyScala] =
Some(IvyScala(2.9.3,2.9.3,List(),true,false,true,org.scala-lang))

This change fixes #2686 by redefining ivyScala with scalaVersion and
scalaBinaryVersion scoped to updateSbtClassifiers task. The existing
scripted test was modified to reproduce the bug.
2017-01-14 07:37:32 -05:00
Anatoly Fayngelerin 6dc2cf4210 dependsOn can now be used inside a .sbt file for a subproject 2017-01-14 07:18:10 -05:00
Eugene Yokota 88a644eb4d Use parent's toString 2017-01-14 06:35:27 -05:00
Eugene Yokota dc71b171da Cache now takes in account of the parent of the classloader 2017-01-14 06:35:07 -05:00
Eugene Yokota 0cfde91a4b Remove unnecessary val 2017-01-14 06:31:20 -05:00
Eugene Yokota 700017be91 Cache based on the underlying URLs of the ClassLoader per review 2017-01-14 06:31:04 -05:00
Eugene Yokota 7a00ba3925 Display log when sbt loading is going to pause
Def.make could take 10099ms for 100 subprojects. This would display
logs probably for projects with more than 10 subprojects, which might
pause for a few seconds during load.
2017-01-14 06:30:45 -05:00
Eugene Yokota 843f79ffd9 Improve structureIndex call by using Vector
This call takes around 8035ms for 100 subprojects. I don't think using
Vector here had any noticeable effect.
2017-01-14 06:30:16 -05:00
Eugene Yokota 3e29a48b56 Cache global user settings 2017-01-14 06:28:00 -05:00
Eugene Yokota f523b9da0d Add perf logs 2017-01-14 06:25:07 -05:00
Eugene Yokota 9a33550c79 Fix the scripted actions/set 2017-01-14 02:26:23 -05:00
Eugene Yokota b34e182d21 Bump util, lm, and zinc 2017-01-14 00:57:46 -05:00
Eugene Yokota 8c9dfda089 Split log output per channel
LogManager implementation is modified to use ManagedLogger, which can swap out backing Appenders without re-creating the log instance.

The State was also changed to track `currentCommand: Option[Exec]`. `Exec` knows the origin of the command invocation, and using that we can now send the network-originated events only to the network clients.

Combined together, this implements log splitting between the sbt clients (channels).
2017-01-13 03:00:02 -05:00
Eugene Yokota 9ee69e5dd4 Fix test 2017-01-06 11:27:41 -05:00
Eugene Yokota 1bf50e10c8 Use Exec in State 2017-01-06 11:27:41 -05:00
Eugene Yokota d96ef58605 Unifying towards using events 2017-01-06 11:27:06 -05:00
Eugene Yokota fa7253ece3 Start lightweight client
This is the beginning of a lightweight client, which talks to the
server over Contraband-generated JSON API. Given that the server is
started on port 5173:

```
$ cd /tmp/bogus
$ sbt client localhost:5173
> compile
StatusEvent(Processing, Vector(compile, server))
StatusEvent(Ready, Vector())
StatusEvent(Processing, Vector(, server))
StatusEvent(Ready, Vector())
```
2017-01-06 11:27:06 -05:00
Dale Wijnand 7fcfec8b8e
-sbinary/+sjson-new, -datatype/+contraband & upgrades
* start to replace sbinary with sjson-new
* upgrade from sbt/datatype to sbt/contraband
* upgrade and migrate to new sbt modules APIs
2017-01-05 21:59:00 +00:00
Dale Wijnand 43821667bf
Upgrade scalariform version 2016-12-11 12:13:11 +00:00
Eugene Yokota fe1a24cf7c Adjust to 1.0.x 2016-10-27 02:42:12 -04:00