Commit Graph

1815 Commits

Author SHA1 Message Date
Miles Sabin 56e843960b Configurable explicit list of artifacts for Scala binary version check 2017-01-22 11:53:45 -05:00
David Perez 618487eb58 New option sbt.task.timings.omit.paths, to produce even cleaner reports. 2017-01-21 18:48:13 -05:00
David Perez 6ab0bc403a Renamed:
sbt.task.timings.shutdown -> sbt.task.timings.on.shutdown
 sbt.task.timings.divider -> sbt.task.timings.unit
2017-01-21 18:48:13 -05:00
David Perez 4f5c5c92a2 Alignment of reported time measuring data 2017-01-21 18:48:13 -05:00
David Perez 70fa960f56 Improved time logging capabilities 2017-01-21 18:48:13 -05:00
David Perez b9c3a56454 Changed logging from error to debug, because it is quite annoying the error message when autocompleting 2017-01-21 18:48:13 -05:00
Eugene Yokota b47f281c6a Migrate tuple notation to 0.13 build.sbt DSL 2017-01-21 10:04:14 -05:00
eugene yokota 605e6047f1 Merge pull request #2936 from eed3si9n/wip/bgrun
Background run
2017-01-20 17:22:40 -05:00
Eugene Yokota 0419098d65 Fix tests/fork-uncaught 2017-01-20 15:13:35 -05:00
Eugene Yokota bf6452f193 Fix actions/run-task 2017-01-20 14:50:37 -05:00
Eugene Yokota 1e960b324c Implement copyClasspath for bgRun
Copies products to the workind directory, and the rest to the serviceTempDir of this service, both wrapped in SHA-1 hash of the file contents. This is intended to mimize the file copying and accumulation of the unused JAR file. Since working directory is wiped out when the background job ends, the product JAR is deleted too. Meanwhile, the rest of the dependencies are cached for the duration of this service.
2017-01-20 13:02:31 -05:00
Eugene Yokota 560c7a1364 Implements fullClasspathAsJars
fullClasspathAsJars forces the behavior as if exportJars has been set to true.
2017-01-20 13:02:31 -05:00
Eugene Yokota 2321648e96 Make sure background jobs are shut down 2017-01-20 13:02:31 -05:00
Eugene Yokota 74cfbd4a9c Implement bgRun based on sbt-core-next 2017-01-20 13:02:31 -05:00
Dale Wijnand e83564a6b7
Move some server pieces from main-command to main 2017-01-20 17:07:25 +00:00
Josh Soref 2791e68d0d spelling: strategy 2017-01-20 08:27:43 +00:00
Josh Soref 65f2d9a3d4 spelling: solely 2017-01-20 08:27:06 +00:00
Josh Soref eee37e1e93 spelling: setting 2017-01-20 08:24:10 +00:00
Josh Soref b2d7525b59 spelling: satisfied 2017-01-20 08:23:43 +00:00
Josh Soref ee13978a46 spelling: represent 2017-01-20 08:22:42 +00:00
Josh Soref 3f8e798505 spelling: plugin 2017-01-20 08:22:11 +00:00
Josh Soref 5dd0946be7 spelling: knowledge 2017-01-20 08:18:43 +00:00
Josh Soref 569b8750f1 spelling: hyphenated 2017-01-20 08:17:11 +00:00
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
Eugene Yokota 75deb4e55d Change "command_exec" to just "exec" 2016-10-27 02:42:12 -04:00
Eugene Yokota 5e0b087daa Use logger 2016-10-27 02:42:12 -04:00
Eugene Yokota a89fcb37ca Exec and CommandExchange refactoring 2016-10-27 02:42:12 -04:00
Eugene Yokota 3359163636 Adds serverPort attribute key 2016-10-27 02:42:12 -04:00
Eugene Yokota ebf4715dd1 Refactor to CommandExchange and CommandChannel 2016-10-27 02:42:12 -04:00
Eugene Yokota 48d3b01e6b Move files around 2016-10-27 02:42:12 -04:00
Eugene Yokota 19b079caf2 Change type to command_exec 2016-10-27 02:42:12 -04:00
Eugene Yokota 1b1f2abfbe Use util 0.1.0-M9 that implements thread-friendly readLine 2016-10-27 02:42:12 -04:00
Eugene Yokota 3381f59ae8 Implement ConsoleListener 2016-10-27 02:42:12 -04:00
Johan Andrén ff211d08f9 Server hooked in as a CommandListener 2016-10-27 02:42:12 -04:00
Eugene Yokota f9dd8b73b7 Refactor to abstract listening for command line 2016-10-27 02:42:12 -04:00
Eugene Yokota 649dc0ce3c This is where we can multiplex commands 2016-10-27 02:42:12 -04:00
Eugene Yokota ec0fe7bb21 Split using newline. Also more error handling. 2016-10-27 02:42:12 -04:00
Johan Andrén 9557107c97 First sloppy stab at an embedded server in sbt 2016-10-27 02:42:12 -04:00
Dale Wijnand 84052b2717
Remove an unused import 2016-10-05 11:12:25 -05:00
Dale Wijnand 2f84e05282
Migrate to blackbox.Context 2016-10-05 11:12:24 -05:00
eugene yokota 87ef5287f6 Merge pull request #2662 from dwijnand/publishTo-TaskKey
[sbt 1.0] Make publishTo & otherResolvers TaskKey's
2016-09-29 01:43:36 -04:00
eugene yokota 8dab60eb92 Merge pull request #2760 from dwijnand/AutoPlugin-extraProjects-1.0
FPORT: Add extraProjects adn derivedProjects. Fixes #2532
2016-09-29 00:46:06 -04:00
Eugene Yokota 0321f0cd48
Add extraProjects adn derivedProjects. Fixes #2532
This adds support to generate synthetic subprojects from an auto plugin.

In addition, a method called `projectOrigin` is added to distinguish
Organic, BuildExtra, ProjectExtra, and GenericRoot.

Forward-port of #2717 and #2738
2016-09-29 01:46:17 +01:00
Dale Wijnand befb0925e3
Make publishTo & otherResolvers TaskKey's
Fixes #2059
2016-09-29 01:35:51 +01:00
eugene yokota bd1b3cfe00 Improve `show` when key returns a `Seq` (#2752)
This changes the output to:

```
> show externalDependencyClasspath
[info] Updating {file:/xxx/hello/}root...
[info] Resolving jline#jline;2.12.1 ...
[info] Done updating.
[info] *
Attributed(/Users/xxx/.sbt/boot/scala-2.11.8/lib/scala-library.jar)
[info] *
Attributed(/Users/xxx/.ivy2/cache/commons-io/commons-io/jars/commons-io-
2.4.jar)
```
2016-09-23 02:12:44 +01:00
Eugene Yokota 15c078ab0b Quieter ivyLoggingLevel for CI
`ivyLoggingLevel` is dropped to `UpdateLogging.Quiet` when Jenkins or
Travis is detected.
2016-09-15 22:57:07 -04:00
Eugene Yokota 357a146460 Silent startup for scalas
Fixes #840
2016-09-15 03:42:23 -04:00
eugene yokota 26d0b25a12 Merge pull request #2721 from eed3si9n/wip/zinc_x2
bumping to zinc 1.0.0-X3
2016-09-07 00:45:31 -04:00
Eugene Yokota f4400ed171 zinc 1.0.0-X3 2016-09-06 23:39:34 -04:00
Dale Wijnand 1ba7bb0fb9 Merge pull request #2712 from Duhemm/fport/key-selection-build-level
Forward port #2469 & #2708
2016-09-01 09:23:01 +01:00
Martin Duhem faf6120c93 Unspecified project axis means current project or its build 2016-08-31 10:42:32 +02:00
Eugene Yokota 9655f50c55 bumping to zinc 1.0.0-X2 2016-08-30 21:37:20 -04:00
kenji yoshida 27fe8eb6f7 remove unused imports (#2719) 2016-08-30 07:29:17 +01:00
Eugene Yokota 829ec4dd3a Update Defaults and scripted to := style 2016-08-29 23:02:10 -04:00
xuwei-k 857fc0f5da use JavaConverters instead of JavaConversions
- https://issues.scala-lang.org/browse/SI-9684
- 0c5b42d974
2016-08-30 01:31:04 +09:00
Martin Duhem 3da38b14db Fix key selection for build level keys
PR #2469 added build keys to tab completion, with the side effect of
considering as available candidate in key selection, thus making sbt
think that some inputs were ambiguous (e.g. `baseDirectory`): should it
apply to the current project or to the build level key?

This commit fixes this issue by improving the key selection:
 - If there's no candidate, we return the default key
 - If there's a single possible project level key, and zero or more
   build level keys, then we select the project level key.
 - If there are zero project level key, and a single build level key,
   then we select the build level key
 - If there are multiple candidates, sbt says that the input is
   ambiguous.

Fixes #2707
2016-08-26 08:14:28 +02:00
Martin Duhem 3c9d2ff57a 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-08-26 08:14:28 +02:00
kenji yoshida 0c086a7761 `aggregate` can now be used inside a .sbt file (#2683)
(cherry picked from commit b92e5773f7)
2016-07-27 23:35:16 +09:00
Dale Wijnand c5f59d4406 Check formatting with TravisCI
Fixes #2657
2016-07-18 12:58:30 -04:00
eugene yokota f221d0ab28 Merge pull request #2667 from OlegYch/fix-project-macro-error-message
Better error message from project macro
2016-07-18 11:29:26 -04:00
eugene yokota 4b0ccd2dab Merge pull request #2670 from dwijnand/remove-404-resolvers
Remove resolvers to repositories that don't exist
2016-07-18 11:10:18 -04:00
Dale Wijnand b245cf5f58 Remove resolvers to repositories that don't exist
Fixes #2195
2016-07-15 08:16:40 +01:00
eugene yokota 5abccaedd2 Merge pull request #2673 from dwijnand/leave-update-options-alone
Don't redefine updateOptions to ignore ThisBuild
2016-07-14 22:35:28 -04:00
Dale Wijnand 84c611af36 Remove unused vals/defs 2016-07-12 14:31:35 +01:00
Dale Wijnand 886d95c0e5 Don't redefine updateOptions to ignore ThisBuild
Fixes #2671
2016-07-12 13:24:14 +01:00
Dale Wijnand deea82542c Remove unused imports 2016-07-12 11:55:10 +01:00
OlegYch caba7e145c Better error message from project macro 2016-07-12 01:29:24 +03:00
Dale Wijnand 96e086b1a1 AutoPlugin should require JvmPlugin by default
Fixes #2082
2016-07-08 10:57:55 +01:00
Dale Wijnand 12c2734052 Pattern match some if/else's 2016-07-07 18:21:25 +01:00
Dale Wijnand 4c75d778b9 Group imports 2016-07-07 18:21:25 +01:00
Dale Wijnand 32760bed55 Remove some fatal exception catching 2016-07-07 18:21:25 +01:00
Dale Wijnand 387674a451 Remove some heads and tails 2016-07-07 18:21:25 +01:00
Eugene Yokota 246ec58e35 Adapting to Zinc changes 2016-06-26 03:55:37 +02:00
Grzegorz Kossakowski 824b59a3ef Adapt to changes to DefinesClass in zinc
The definition of `DefinesClass` has changed from being a function
`File => String => Boolean` to just a function `String => Boolean`. The
changes in this commit reflect that fact.

Also, this commit implements a newly introduced PerClasspathEntryLookup.
2016-06-26 03:49:55 +02:00
Grzegorz Kossakowski e8c5ff0ffe Remove use of `DefinesClass` in Load.scala
It turns out that `DefinesClass` was a dead data: it was passed around
but not used anywhere.
2016-06-26 03:49:55 +02:00
Dale Wijnand 01a7a00915 Remove old sbt parser 2016-06-21 13:15:10 +01:00
Dale Wijnand a0193d28ea Cleanup mainProj 2016-06-21 13:15:10 +01:00
Dale Wijnand ffafdc2e03 Remove OldPlugin 2016-06-21 08:09:30 +01:00
Dale Wijnand bf8c5d2135 Drop use of AttributeKey#rawLabel 2016-06-21 08:09:30 +01:00
Miles Sabin 1e9bb93285 Override scala organization and version transitively at the Ivy level 2016-06-05 09:46:00 +01:00
Pedro Larroy f5e8c8736f Fix typo: paralleism -> parallelism 2016-05-26 07:38:27 +00:00
James Roper e21c871d71 Replaced cross building support with sbt-doge 2016-05-17 09:49:16 +10:00
ekrich d383c2f306 Add Windows script support and native file extensions on Unix platforms
When running a sbt script, this change lets the user on UNIX and
Windows platforms to use native file extensions like none/.sh or
.bat/.cmd. The code copies the file to the sbt boot/hash/src_managed
directory with a .scala extension.
2016-05-13 12:01:14 -07:00
Eugene Yokota d437e8299e Typo fix 2016-05-07 20:31:19 -04:00
Eugene Yokota 420679df10 Address Codacy issues 2016-05-07 15:46:22 -04:00
Eugene Yokota 0cc9488632 Bring BuildStructure and others into internal 2016-05-06 19:21:13 -04:00
Eugene Yokota ce3926fbed Bring EvaluateConfigurations and DslEntry to internal 2016-05-06 17:32:26 -04:00
Eugene Yokota ee272d780e Reorganize directory structure 2016-05-06 16:01:49 -04:00
eugene yokota 6a9ced8eb6 Merge pull request #2589 from eed3si9n/wip/bumptozinc
[sbt 1.0] Bumping up to Zinc 1.0.0-M1
2016-05-06 05:40:58 -04:00
Eugene Yokota 60fa2b842a Renamed per review 2016-05-06 01:41:17 -04:00
Eugene Yokota f8ef449789 Fix test quick 2016-05-06 01:30:35 -04:00
Eugene Yokota 738e8fb2f3 Adjust discovery code to new Zinc 2016-05-05 16:11:57 -04:00
Eugene Yokota fd7c162ea8 Bumping up dependencies 2016-05-05 14:38:24 -04:00
Martin Duhem c70c9989e5 Upgrade to latest zinc 2016-05-04 16:44:31 +02:00
Eugene Yokota e3d2af9e40 We shouldn't cross publish sbt for backward compatibility
By keeping sbt artifact to be called sbt, the user can try by just
changing the build properties.
2016-05-04 00:09:02 -04:00
Eugene Yokota 89a17c79d6 Adjust to changes 2016-05-02 01:37:16 -04:00
Eugene Yokota 296758e159 Fix #2519. Fixes Maven Central getting included even with repo override 2016-05-01 03:19:34 -04:00
Eugene Yokota 78ea2932a4 Fixes #2427 inter-project dependency interference with sbt-web
sbt-web uses exportedProducts key as an extension point.
This removes exportedProductsAlways from 0.13.10-RC1,
and uses exportedProducts instead.
2016-05-01 02:59:06 -04:00
Eugene Yokota 447e2f7f8c Inter-project dependency tracking. Fixes #2266
Adds `trackInternalDependencies` and `exportToInternal` settings. These
can be used to control whether to trigger compilation of a dependent
subprojects when you call `compile`. Both keys will take one of three
values: `TrackLevel.NoTracking`, `TrackLevel.TrackIfMissing`, and
`TrackLevel.TrackAlways`. By default they are both set to
`TrackLevel.TrackAlways`.

When `trackInternalDependencies` is set to `TrackLevel.TrackIfMissing`,
sbt will no longer try to compile internal (inter-project) dependencies
automatically, unless there are no `*.class` files (or JAR file when
`exportJars` is `true`) in the output directory. When the setting is
set to `TrackLevel.NoTracking`, the compilation of internal
dependencies will be skipped. Note that the classpath will still be
appended, and dependency graph will still show them as dependencies.
The motivation is to save the I/O overhead of checking for the changes
on a build with many subprojects during development. Here's how to set
all subprojects to `TrackIfMissing`.

    lazy val root = (project in file(".")).
      aggregate(....).
      settings(
        inThisBuild(Seq(
          trackInternalDependencies := TrackLevel.TrackIfMissing,
          exportJars := true
        ))
      )

The `exportToInternal` setting allows the dependee subprojects to opt
out of the internal tracking, which might be useful if you want to
track most subprojects except for a few. The intersection of the
`trackInternalDependencies` and `exportToInternal` settings will be
used to determine the actual track level. Here's an example to opt-out
one project:

    lazy val dontTrackMe = (project in file("dontTrackMe")).
      settings(
        exportToInternal := TrackLevel.NoTracking
      )
2016-05-01 02:57:03 -04:00
Martin Duhem b086360046 Update bridge retrieval in `consoleProject`
Fixes sbt/sbt#2428
2016-05-01 02:49:11 -04:00
xuwei-k a6e31a0dc7 exclude directories from unmanagedSources
fix #2552
2016-04-30 11:13:02 +09:00
Eugene Yokota e4ee409cd5 Some changes due to cross publishing 2016-04-29 16:18:40 -04:00
Eugene Yokota 9e10f01363 Workaround for XML literal in build.sbt 2016-04-29 16:18:19 -04:00
eugene yokota b285cf114d Merge pull request #2575 from eed3si9n/wip/remove_plugin
[sbt 1.0] Rename sbt.Plugin => sbt.internal.OldPlugin
2016-04-29 03:54:00 -04:00
Eugene Yokota fddbf77877 Fix tests 2016-04-29 02:12:35 -04:00
eugene yokota d5fbe99bdd Merge pull request #2543 from eed3si9n/wip/project_dsl
[sbt 1.0] Reduce sbt.Project(...) params and make settings(...) lazy
2016-04-25 10:35:39 -04:00
Eugene Yokota f6ff1f916c Rename sbt.Plugin => sbt.internal.OldPlugin 2016-04-25 05:09:39 -04:00
Eugene Yokota a20da88a45 Reduce parameters from sbt.Project.apply 2016-04-25 04:26:30 -04:00
Dale Wijnand 60bc28829b Add Append & Remove instances for Option 2016-03-30 22:13:19 +01:00
Dale Wijnand f6c5be06b3 Drop sealed on Remove.Sequence 2016-03-30 22:13:19 +01:00
Eugene Yokota e57215e240 Fix test 2016-03-29 13:11:42 -04:00
Eugene Yokota d01f8d3c1b Port project/extra 2016-03-29 01:54:58 -04:00
Eugene Yokota 036e57c114 sbt.Build => sbt.internal.BuildDef
sbt.Load => sbt.internal.Load
2016-03-28 11:52:12 -04:00
Dan Sanduleac 6111156344 Fix CacheIvy as inclusions and exclusions were flipped :( 2016-03-07 13:45:17 +00:00
Dan Sanduleac 16f9ddba08 Add test for ModuleID format 2016-03-07 13:44:48 +00:00
Dan Sanduleac 3910d4d87a ModuleID's format should include the branch! otherwise we lose it... 2016-03-07 13:33:03 +00:00
Eugene Yokota e270d2bec1 Adjust to code reorganization. 2016-02-26 17:48:33 -05:00
Eugene Yokota 4d58714aa7 Adds CompatibilityWarningOptions. Fixes #2347
This addresses 0.13.10 regression, which currently warns users about
Maven incompatibility on a private configuration. This adds a config
class so the build user can control the level of the warning as well as
the target configuration to be monitored.
By default, we are only going to look at `Compile` and `Runtime`.
2016-02-26 17:46:12 -05:00
Eugene Yokota c1760fdc3c Move intransitive warning to update. Ref #2127 2016-02-26 17:40:07 -05:00
eugene yokota bdded0898d Merge pull request #2393 from dwijnand/fport/make-sbt-dotty-aware
FPORT: Make sbt aware of Dotty
2016-02-26 17:29:27 -05:00
Eugene Yokota b1b7430d9c Fixes #2464. Actually reorganize appResolvers
Fixes #2464 and Fixes #2465
appResolvers is a set of resolvers specified in the launcher
configuration.
This list fluctuates depending on the version of sbt, and sbt 0.13.10
meant to stabilize it by weeding out JCenter even when it includes it,
which failed when I applied the filter on the wrong list. This should
correct it.
2016-02-25 23:09:18 -05:00
Eugene Yokota cd373c99ad Add useJCenter setting, which is set to false. Fixes #2217
Adds a new setting `useJCenter`, which is set to `false` by default.
When set to `true`, JCenter will be placed as the first external
resolver to find library dependencies.

The implementation of `externalResolvers` is changed to incorporate the
setting by calling `Resolver.reorganizeAppResolvers`. These changes
were required because `externalResolvers` uses whatever that's in the
launchconfig, which the build user may not upgrade.
2016-02-25 23:02:16 -05:00
Martin Duhem 20d0c41473 Update to latest util, incrementalcompiler and librarymanagement 2016-02-24 16:54:03 +01:00
Dan Sanduleac abb53d4cb2 Fix for weird bug where sbt.librarymanagement's package object somehow conflicts with sbt.Keys.. Thanks Scala 2016-02-23 12:02:11 +00:00
Dan Sanduleac 978f2304e5 Stop deducing confs from classifier when delivering 2016-02-09 15:13:10 +00:00
Dan Sanduleac 63d657e9c0 [1/2] Add {source,doc}ArtifactTypes settings, use them in update* tasks in conjunction with ArtifactTypeFilter 2016-02-09 15:13:10 +00:00
Dan Sanduleac f11755e181 ModuleID + inclusions 2016-02-09 11:48:12 +00:00
Dan Sanduleac 7d2054f3ae ExclusionRule -> InclExclRule 2016-02-09 11:46:16 +00:00
Tim Harper 2eda2ebd46 bugfix - apply autoImports for global plugins at global configuration stage
Previously, the autoimports for globally defined plugins were not
imported for global configuration files, although they were imported for
project configuration files.

This patch causes an additional plugin discovery phase to happen during
global config evaluation, so that auto-plugins can be detected and their
imports subsequently included.
2016-01-18 21:43:32 -07:00
Guillaume Martres a05218f5ac Make sbt aware of Dotty
This small set of changes, together with the compiler-bridge I wrote
(https://github.com/smarter/dotty-bridge) enables us to compile code
using Dotty in sbt, see https://github.com/smarter/dotty-example-project
for an example.

Partial forward port of #2344.
2016-01-17 16:37:22 +00:00
Eugene Yokota 6c1b054249 Adds bootIvyConfiguration to grab compiler bridge source. Fixes #2336
Forward-port of #2337.

As described in #2336, I noticed that when using 0.13 nightly from
Bintray, sbt was unable to locate the compiler source.
Since `updateSbtClassifiers` is already set up to download sbt's own
sources, the `ivyConfiguration` should be reused. However, `compilers`
is a derived task, which is unable to depend on a scoped key.
To workaround this I had to create a new key called
`bootIvyConfiguration`. This should now use the metabuild's resolvers
to download the compiler bridge source.
2016-01-16 16:11:51 +00:00
Dale Wijnand c5949268ef Drop sealed from the typeclasses in Append
Forward port of #2322
2016-01-08 16:45:06 +01:00
eugene yokota a9d80cf38c Merge pull request #2281 from eamelink/bugfix-1982
Fix search result highlighting on Windows
2015-11-27 15:36:50 -05:00
xuwei-k 84e8f20080 fix typo 2015-11-25 20:01:22 +09:00
Erik Bakker 995ccf85a6 Fix search result highlighting on Windows
Use only ANSI color codes that are supported by Windows
2015-11-20 22:08:03 +01:00
Jesse Kinkead 0ecc2543ec Always export apiURL even if autoAPIMappings is false. 2015-11-04 10:51:54 -08:00
Eugene Yokota f14692f0b1 changes due to bumping up librarymangement to 0.1.0-M4 2015-10-02 00:25:45 -04:00
Eugene Yokota 814ceeab79 librarymanagement 0.1.0-M3 to use internal syntax 2015-10-01 23:28:27 -04:00
Eugene Yokota 9eb718ae45 Fixes actions/depends-on 2015-10-01 01:57:02 -04:00
Martin Duhem 72edbfa177 Create `object Import` for source compat 2015-09-29 19:16:45 -04:00
Eugene Yokota cda5ff84c7 Use the new Doc object from incrementalcompiler 2015-09-28 22:56:34 -04:00
Martin Duhem a2abb6eeb6 Update to latest version of incremental, fix imports 2015-09-16 10:16:03 +02:00
Eugene Yokota ba7ffa5d4d Fix compiler bridge name 2015-09-15 03:06:35 -04:00
Eugene Yokota bb8133eaba use incremental compiler version instead of sbt version 2015-09-14 23:43:32 -04:00
Eugene Yokota 21a027c487 Fix Compiler.compilers 2015-09-14 21:59:36 -04:00
Eugene Yokota 076ccd7b90 Merge 2015-09-14 10:54:22 -04:00
Martin Duhem c981abd295 Fix all imports 2015-09-14 14:28:09 +02:00
eugene yokota 57321bf6bc Merge pull request #2192 from DavidPerezIngeniero/0.13
More robustness when using the tasks and settings command
2015-09-10 21:14:57 -04:00
Martin Duhem 92ea782d94 Fix deprecation messages 2015-09-04 12:25:59 +02:00
Martin Duhem 1c4a900ff5 Retrieve compiler bridge sources in temp directory
Note that they won't be downloaded again, because the component compiler
will look for a previously-compiled version of the compiler bridge
before trying to fetch the sources again. If they've already been
downlaoded, then they have been compiled and a compiled version of the
compiler bridge already exists.
2015-09-04 12:00:44 +02:00
Martin Duhem dcad8a5527 Specify the compiler bridge module in a setting
In order to restore reproducibility of builds, we no longer cascade over
the possibly available versions of the compiler bridge sources (a
specific version of the bridge sources may not be available one day, but
exist on the next day), but rather let the build definition configure
which module to use.

Fixes sbt/sbt#2196
2015-09-04 11:17:27 +02:00
David Perez 1e2617a807 More robustness when using the tasks and settings command 2015-09-01 14:16:41 +02:00
Martin Duhem e31a9ba456 Download compiler interface sources in boot directory 2015-08-26 10:33:11 +02:00
Dale Wijnand 13c6729507 Extract Def.settings from Project#settings.
This allows for the same functionality that using SettingsDefinition in
Project#settings allows (specifying either bare Setting[_] or a Seq[Setting[_]])
to be available outside of the settings for a project, for instance when
defining a val.

In short, it allows:

    val modelSettings = Def.settings(
      sharedSettings,
      libraryDependencies += foo
    )
2015-08-20 18:45:41 +01:00
Pierre DAL-PRA 8f1fb2d232 Fix additional warnings 2015-08-07 00:23:14 +02:00
Pierre DAL-PRA 54d54b9f4f Replace procedure syntax by explicit Unit annotation 2015-08-04 10:07:38 +02:00
Pierre DAL-PRA f0bd9001e6 Remove redundant collection conversions 2015-08-01 12:05:35 +02:00
Pierre DAL-PRA b9171e59ad Simplify operations on collections 2015-08-01 02:25:17 +02:00
Josh Suereth 4464b13acd Remove reference to dead servers. 2015-07-24 13:58:39 -04:00
Josh Suereth d0e918d6d3 Merge pull request #2114 from pdalpra/add-append.sequence-list
Add an Append.Sequence instance for List
2015-07-18 07:05:59 -04:00
Pierre DAL-PRA 10c71b3f8a Add an Append.Sequence instance for List, fixes #2107 2015-07-18 10:51:31 +02:00
Pierre DAL-PRA f944ec98d2 Log javaOptions/fork interactions:
- When forking, log the javaOptions that are used
- When javaOptions are defined but fork := false, warn that javaOptions
	will be ignored
2015-07-18 00:37:35 +02:00
eugene yokota 5824ef6d7f Merge pull request #2106 from Duhemm/interface-specific-sources-clean
Find most specific version of compiler interface sources
2015-07-17 10:25:16 -04:00
Pierre DAL-PRA 13b37cc987 Fix several warnings 2015-07-17 09:17:42 +02:00
Martin Duhem cbd5cd5875 Fix inlined method 2015-07-16 15:34:04 +02:00
Martin Duhem 90a8423d8e Find most specific version of compiler interface sources
This commit introduces a mechanism that allows sbt to find the most
specific version of the compiler interface sources that exists using
Ivy.

For instance, when asked for a compiler interface for Scala 2.11.8-M2,
sbt will look for sources for:

 - 2.11.8-M2 ;
 - 2.11.8 ;
 - 2.11 ;
 - the default sources.

This commit also modifies the build definition by removing the
precompiled projects and configuring the compiler-interface project so
that it publishes its source artifacts in a Maven-friendly format.
2015-07-16 11:18:48 +02:00
Josh Suereth d2fdfb81a0 Merge pull request #2091 from Duhemm/hide-stacktrace
Don't show the stack trace on compilation error in build definition
2015-07-09 14:26:03 -04:00
Pierre DAL-PRA cf72c7cc0e Fix a few typos in keys descriptions 2015-07-09 17:00:48 +02:00
Martin Duhem 6c123f22ba Hide stacktrace on compilation error in build definition 2015-07-09 11:40:02 +02:00
Jonas Fonseca 54618ad55a Fix typos in annotations referring to EvaluateTaskConfig 2015-07-01 09:22:15 -04:00
Eugene Yokota 81f175ddbf Fixes #1666 2015-06-20 00:51:42 -04:00
James Roper 3625ce5943 Added Extracted.runInputTask
This provides a convenience function for running an input task from the
extracted state. This is particularly useful for commands, release steps
etc that may want to run input tasks, like scripted.
2015-06-10 16:09:09 +02:00
Andrew Johnson 7c0f455c79 Use FiniteDuration to represent time rather than a long 2015-05-13 14:18:27 -04:00
Andrew Johnson 4ec092617f Add forceUpdateMs 2015-05-13 08:02:48 -04:00
Josh Suereth b568565615 Merge pull request #1970 from matthewfarwell/test-exclude
Test exclude
2015-05-11 15:27:06 -04:00
eugene yokota c1952698e4 Merge pull request #2000 from dwijnand/command-to-string
Implement SimpleCommand.toString. Fixes #1998.
2015-05-07 10:45:16 -07:00
Eugene Yokota 66e07f6e83 use Duration to track minForcegcInterval 2015-05-05 19:29:22 -04:00
Dale Wijnand 97ed5822c7 Implement SimpleCommand.toString. Fixes #1998. 2015-05-05 09:11:52 +01:00
Eugene Yokota 8aca4e8fa6 Force GC on cross building 2015-05-04 23:49:36 -04:00
Eugene Yokota 2bbe872969 Use interval throttling
JMX doesn't seem to work in reporting

    memoryMxBean.getObjectPendingFinalizationCount

At least for the test build that I used it always reports zero.
2015-05-04 23:09:23 -04:00
Eugene Yokota d82fe46052 Fixes #1223. Uses JMX to find out when to force GC. 2015-04-30 14:53:50 -04:00
eugene yokota 1ebe3804b3 Merge pull request #1992 from dwijnand/cross-scala-versions-default
Fix crossScalaVersions default, derived from scalaVersion. Fixes #1828.
2015-04-29 05:08:40 -07:00
eugene yokota 27bd275343 Merge pull request #1989 from dwijnand/inThisBuild
Add inThisBuild, similar to inConfig. Fixes #1847
2015-04-26 18:58:12 -07:00
eugene yokota d0fbd10852 Merge pull request #1987 from ajsquared/0.13
Add configurationsToRetrieve
2015-04-26 18:54:32 -07:00
Dale Wijnand 116c1e1e8b Fix crossScalaVersions default, derived from scalaVersion.
Fixes #1828.
2015-04-26 17:06:59 +01:00
Dale Wijnand 1aff36d505 Add help message for `inspect actual`. Fixes #1651. 2015-04-26 03:18:29 +01:00
Dale Wijnand 348a28f761 Cleanup inspectDetailed. 2015-04-26 02:31:51 +01:00
Dale Wijnand 677c33611a Add inThisBuild, similar to inConfig. Fixes #1847 2015-04-25 20:39:59 +01:00
Andrew Johnson b617b41ae1 Support configuring a subset of configurations from which to retrieve dependencies when retrieveManaged is true 2015-04-23 12:49:45 -04:00
Matthew Farwell d4cffdddd9 corrected exclusion logic, added more unit tests & scripted tests 2015-04-17 09:28:58 +02:00
Matthew Farwell 0e56878534 Added unit tests for Defaults.selectedFilter 2015-04-14 06:31:27 +02:00
Matthew Farwell a9e06109a3 Added exclusions to testOnly and testQuick command line, indicated by a '-' prefix. 2015-04-13 16:31:22 +02:00
eugene yokota c879432b0f Merge pull request #1950 from ajsquared/0.13
Add retrieveManagedSync
2015-04-10 12:48:17 -07:00
Andrew Johnson e647234743 Add retrieveManagedSync 2015-03-31 10:59:41 -04:00
Dale Wijnand 5c2ec63fa6 Make use of the nicer Project settings syntax in 0.13.8. 2015-03-27 01:19:26 +00:00
David Perez 4b5a3b785e Merge remote-tracking branch 'upstream/0.13' into 0.13 2015-03-25 16:12:54 +01:00
David Perez ef6c5f7e55 Merge remote-tracking branch 'origin/0.13.7' into 0.13 2015-03-25 16:01:15 +01:00
David Perez 5ce11c67c5 Catch exceptions with NonFatal 2015-03-25 15:02:45 +01:00
David Perez 2c52efeca5 Removed unicode arrow 2015-03-25 13:14:48 +01:00
David Perez 79ef772219 Removed unicode arrow 2015-03-24 14:54:10 +01:00
Dale Wijnand a4d2e04532 Add explicit return type for implicit removeSeq. 2015-03-23 22:29:57 +00:00