Commit Graph

1815 Commits

Author SHA1 Message Date
jvican 1c961e8814
Move `AltLibraryManagementCodec` to internal
This is an implementation detail that should not be exposed in `Defaults`.

It is therefore moved to `librarymanagement.internal`.
2017-04-28 10:31:33 +02:00
jvican 8fd40e56df
Ease `updateTask` and `cachedUpdate` maintenance
This commit does some changes to the implementation with the purpose of
making this code more readable. I find that this rewrite was necessary
as I was implementing the dependency lock file.
2017-04-27 15:14:42 +02:00
Eugene Yokota da046791e0 Apply Scalafmt formatting 2017-04-21 04:48:31 -04:00
Eugene Yokota 1ec7e8d975 format: off / format: on 2017-04-21 03:11:48 -04:00
jvican 5c48b11d3f Simplify and document `load`
This commit has two goals:

* Simplify the `load` API endpoints, removing the unused ones to shorten
  the surface of the API.
* Add documentation to the main `load` methods.
2017-04-21 01:09:06 -04:00
jvican d2a51d5085 Indent timing logs
Sbt has a feature to show timed logs for every operation at startup.
However, its output is cluttered and users cannot read how much time
single methods consume nor if they call other methods.

This commit improves the status quo by adding indentation.
2017-04-21 01:09:06 -04:00
jvican 9175193df3 Remove unused `pluginDefinitionLoader` methods
This commit reduces the complexity around `loadPluginDefinition` et al.
`pluginDefinitionLoader` is not used anywhere in sbt, so the extra
definitions are removed.

Both the implementation of `loadPluginDefinition` and
`pluginDefinitionLoader` are reduced to a bare minimum where the
components at hand (definition classpath, dependency classpath) are
properly defined.

Documentation to the three methods has been added.
2017-04-21 01:09:06 -04:00
jvican 90782b1cd0 Fix implementation of `LoadBuildConfiguration`
It mainly does three things:

* Clean up the implementation, removing unused values like
  `globalPluginDefs`.
* Make the implementation more readable.
* And the big one: Remove the creation of a classloader that we were
  instantiating but whose value we were throwing away. This has an impact
  in performance, but I'm yet to benchmark how much it is.
2017-04-21 01:09:06 -04:00
jvican 2f61114108
Avoid the use of `synchronized` while parsing
Previous commit used `synchronized` to ensure that the global reporter
was not reporting errors from other parsing sessions. Theoretically,
though, sbt could invoke parsing in parallel, so it's better to ensure
we remove the `synchronized` block, which could also be preventing some
JVM optimizations.

The following commit solves the issue by introducing a reporter id.

A reporter id is a unique identifier that is mapped to a reporter. Every
parsing session gets its own identifier, which then is reused for
recursive parsing. Error reports between recursive parses cannot collide
because the reporter is cleaned in `parse`.
2017-04-18 20:30:05 +02:00
jvican f482a6cf0d
Reuse the same global instance for parsing
The previous implementation was instantiating a toolbox to parse every
time it parsed a sbt file (and even recursively!!!).

This is inefficient and translates to instantiating a `ReflectGlobal`
every time we want to parse something.

This commit takes another approach:

1. It removes the dependency on `ReflectGlobal`.
2. It reuses the same `Global` and `Run` instances for parsing.

This is an efficient as it can get without doing a whole overhaul of it.
I think that in the future we may want to reimplement it to avoid the
recursive parsing to work around Scalac's bug.
2017-04-18 20:30:05 +02:00
jvican 3e812dc71a
Add global toolbox to parse sbt files
This change was proposed by Jason in case that the new parsing mechanism
implemented later on has to be reverted. This change provides a good
baseline, but it's far from ideal with regard to readability of the
parser and performance.
2017-04-18 20:30:05 +02:00
jvican a36d8401e1
Don't use runtime universe to discover autoImport
The previous implementation was using the Scala runtime universe to
check whether a plugin had or not an `autoImport` member. This is a bad
idea for the following reasons:

* The first time you use it, you class load the whole Scalac compiler
  universe. Not efficient. Measurements say this is about a second.
* There is a small overhead of going through the reflection API.

There exists a better approach that consists in checking if `autoImport`
exists with pure Java reflection. Since the class is already class
loaded, we check for:

* A class file named after the plugin FQN that includes `autoImport$` at
  the end, which means that an object named `autoImport` exists.
* A field in the plugin class that is named `autoImport`.

This complies with the plugin sbt specification:

http://www.scala-sbt.org/1.0/docs/Plugins.html#Controlling+the+import+with+autoImport
2017-04-18 20:30:04 +02:00
Eugene Yokota 9e02995ac0 Bump to Zinc 1.0.0-X14 2017-04-18 00:56:22 -04:00
Eugene Yokota 81642138e1 Bump to ZInc 1.0.0-X12 2017-04-15 16:53:37 -04:00
Eugene Yokota 86342d0bdd server is now called shell
server command is renamed to shell,
and the old shell command is called oldshell.
2017-04-14 16:35:54 -04:00
Dale Wijnand 36eb7b1e84 Merge pull request #3093 from eed3si9n/wip/log_concurrency
[sbt 1.0] Fix logging + clean concurrency issue
2017-04-14 15:01:41 +01:00
Eugene Yokota 0e8459ad66 Better error message if socket is taken
We need to communicate the error states in the thread, so I added a `Future[Unit]` called `ready`.

If something goes wrong during the startup, like if the port is already taken, this can be used to communicate back to the main thread, and display the error accordingly.
2017-04-13 15:49:21 -04:00
Eugene Yokota acf6c1191e Make clean task run exclusively 2017-04-13 15:29:13 -04:00
Eugene Yokota 7acb8764f5 Reimplement clean and cleanFiles tasks
cleanFiles is now a task that lists exactly what will be deleted recursively.
2017-04-13 15:28:48 -04:00
Dale Wijnand ec15837f43
Replace unnecessary uses of Command.make with Command.apply 2017-04-13 13:52:30 +01:00
Dale Wijnand 6c07972dd0
Cleanup Command/Help and usage 2017-04-13 13:52:30 +01:00
Dale Wijnand 2caa324d52
Solve a scaladoc issue 2017-04-13 11:52:19 +01:00
Dale Wijnand 308abcde9f Merge pull request #3082 from dwijnand/remove-most-deprecated
Remove most @deprecated
2017-04-13 10:32:10 +01:00
eugene yokota 90e560aa55 Merge pull request #3095 from eed3si9n/fport/3089
[fport] Add three slashes (u3) for file URI
2017-04-12 05:46:43 -04:00
Eugene Yokota b0b5396769 Use IO.toFile 2017-04-12 03:50:35 -04:00
Dale Wijnand 881cb4246a Notify about shell less
+ Don't notify ScriptMain users by moving the logic to xMain
+ Only trigger shell if shell is a defined command
+ Use existing Shell/BootCommand strings instead of new ones
2017-04-12 03:24:38 -04:00
Dale Wijnand 3f590d8e13
Drop most remaining deprecations 2017-04-11 16:46:11 +01:00
Dale Wijnand 7ce389c1da
Define DefaultEvaluateTaskConfig 2017-04-11 16:46:09 +01:00
Dale Wijnand 6820bcf99c
Drop deprecated inputTask method
Temporarily (FLW) duplicate it in fullRunInputTask.
2017-04-11 16:45:26 +01:00
Dale Wijnand 01b19f0218
Drop deprecated seq method 2017-04-11 16:44:38 +01:00
Dale Wijnand 4ef5e85390
Drop deprecated default resolvers 2017-04-11 16:43:01 +01:00
Dale Wijnand a6015793e2
Code formatting only changes 2017-04-11 14:32:38 +01:00
Dale Wijnand be3fa7e66d
Just whitespace & comment changes 2017-04-11 11:48:24 +01:00
Dale Wijnand 31b1be2f3b Merge pull request #3081 from dwijnand/kill-project-delegation
Kill project delegation
2017-04-06 07:34:39 +01:00
Dale Wijnand a0eeec37e2
Kill project delegation 2017-04-05 22:47:39 +01:00
Dale Wijnand cd5c36a11f
Stop defining the artifact configuration based on the classifier
I believe this was accidentally not forward-ported from the 0.14 branch
to the 1.0.x branch.  Notice the change was present in #1016:

  https://github.com/sbt/sbt/pull/1016/files#diff-6373e7f7122325e753b75fe1cc76ff5fL576

and missing in #2478:

  https://github.com/sbt/sbt/pull/2478/files#diff-6373e7f7122325e753b75fe1cc76ff5fR680
2017-04-05 14:14:18 +01:00
eugene yokota 1f02e61819 Merge pull request #3077 from eed3si9n/fport/3008
[fport] Notify & enable users to stay in the warm shell
2017-04-04 20:33:05 -07:00
Eugene Yokota 15255c15b0 Don't warn on server command 2017-04-04 20:00:56 -04:00
Dale Wijnand c41d428dbc Handle non-shell sbt startup warning
The sbt/sbt-launcher-package doesn't invoke sbt with the "shell"
command. sbt has a mechanism for handling this in its "boot" command
that adds an "iflast shell" to the commands. Handle this when displaying
the "Executing in batch mode" warning.

Fixes #3004
2017-04-04 19:45:24 -04:00
Dale Wijnand 6d3129dcb7 Try communicating in actual English 2017-04-04 19:44:26 -04:00
Dale Wijnand 7b4a349d5b Instruct how to get into interactive mode directly 2017-04-04 19:44:18 -04:00
Dale Wijnand f5d7c384a4 Switch from log.info and !!! to log.warn
Good idea, Lars. Thanks.
2017-04-04 19:43:55 -04:00
Dale Wijnand 1a2bfc546b Notify & enable users to stay in the warm shell
Notify & enable users to stay in sbt's shell on the warm JVM by hitting
[ENTER] while sbt is running.

Looks like this; first I run 'sbt about', then I hit [ENTER]:

    $ sbt about
    [info] !!! Executing in batch mode !!! For better performance, hit [ENTER] to remain in the sbt shell

    [info] Loading global plugins from /Users/dnw/.dotfiles/.sbt/0.13/plugins
    [info] Loading project definition from /s/t/project
    [info] Set current project to t (in build file:/s/t/)
    [info] This is sbt 0.13.14-SNAPSHOT
    [info] The current project is {file:/s/t/}t 0.1.0-SNAPSHOT
    [info] The current project is built against Scala 2.12.1
    [info] Available Plugins: sbt.plugins.IvyPlugin, sbt.plugins.JvmPlugin, sbt.plugins.CorePlugin, sbt.plugins.JUnitXmlReportPlugin, sbt.plugins.Giter8TemplatePlugin
    [info] sbt, sbt plugins, and build definitions are using Scala 2.10.6
    >
    >

Fixes #2987
2017-04-04 19:43:28 -04:00
Eugene Yokota 6606958d40 Add { for readability 2017-04-04 18:49:37 -04:00
Dale Wijnand 7ac43c5e59 Tell the user we're setting sbt.version 2017-04-04 18:47:52 -04:00
Dale Wijnand cd63c1f844 Add -Dsbt.skip.version.write=true opt-out 2017-04-04 18:47:43 -04:00
Dale Wijnand a974ce7bb4 Write sbt.version to project/build.properties
Have sbt.version set in project/build.properties is a best practice
because it makes the build more deterministic and reproducible.

With this change sbt, after ensuring that the base directory is probably
an sbt project, writes out sbt.version in project/build.properties if it
is missing.

Fixes #754
2017-04-04 18:46:24 -04:00
Guillaume Martres 2283c68031 Automatically choose proper compiler bridge for dotty
Before this commit, using dotty in your sbt project required to add:
  scalaCompilerBridgeSource := ("ch.epfl.lamp" % "dotty-sbt-bridge" %
    scalaVersion.value % "component").sources()
in your build.sbt. We might as well automatically do this, this reduces
the boilerplate for using dotty in your project to:
  scalaOrganization := "ch.epfl.lamp"
  scalaVersion := "0.1.1-SNAPSHOT"
  scalaBinaryVersion := "2.11" // dotty itself is only published as a
                               // 2.11 artefact currently
2017-04-04 14:49:32 -04:00
Dale Wijnand 4a6feb2b23
Switch Defaults.runnerTask back to a setting
I believe this was an unintentional change in
74cfbd4a9c.
2017-04-04 11:48:45 +01:00
Dale Wijnand 1020405d64 Merge pull request #3068 from dwijnand/kill-settingsSet
Kill settingsSets
2017-04-04 11:32:37 +01:00
Dale Wijnand 101187a3be
Kill settingsSets
Fixes #2617
2017-04-04 08:38:44 +01:00
Eugene Yokota 304d167813 Send ObjectEvent as JSON 2017-04-03 03:17:57 -04:00
Eugene Yokota 093fc061cc Send testing events to logger 2017-04-01 17:19:45 -04:00
Eugene Yokota d6e0fd2f0d Sort the import alphabetically in Defaults 2017-04-01 17:13:28 -04:00
Dale Wijnand 30bf72482b
Add test for a LM type
Use libraryDependencies which is a Seq[ModuleID]
2017-03-27 14:15:12 +01:00
Dale Wijnand 52de082b2e
Add OptJsonWriter to SettingKey 2017-03-27 14:15:11 +01:00
Dale Wijnand 6950a1e061
Use the OptJsonWriter on AttributeKey 2017-03-27 14:15:10 +01:00
Dale Wijnand 63fcca5543
Test setting query functionality 2017-03-27 14:15:10 +01:00
Dale Wijnand 70ac55d0b4
Encode success/failure in setting query response 2017-03-27 14:15:10 +01:00
Dale Wijnand 6211e8d7da
Move some things from terms to imports 2017-03-27 12:29:41 +01:00
Dale Wijnand 43eec230e6
Switch SettingQueryResponse to JValue, implement JValueFormat 2017-03-27 12:29:41 +01:00
Dale Wijnand f2b70de538
Implement a Manifest-based lookup 2017-03-27 12:29:41 +01:00
Dale Wijnand 342fc2cf8f
Commit to the current JsonFormatRegistry. 2017-03-27 12:29:41 +01:00
Dale Wijnand 6e6f66d6d0
Start structure to discover JsonWriter 2017-03-27 12:29:40 +01:00
Dale Wijnand 371f14d9a5
BuildStructure#root is SessionSettings#currentBuild 2017-03-27 12:29:40 +01:00
Dale Wijnand 992b35af3c
Start setup for JSON-format setting values 2017-03-27 12:29:39 +01:00
Dale Wijnand aa69d0d042
Split setting query things out into SettingQuery.scala 2017-03-27 12:29:39 +01:00
Dale Wijnand 4566c615c7
Move setting query things into SettingQuery 2017-03-27 12:29:39 +01:00
Dale Wijnand 8081661a7d
Fix ordering 2017-03-27 12:29:38 +01:00
Dale Wijnand 9f13499bcf
Don't double wrap setting value
Oh the wonderful world of Object#toString
2017-03-27 12:29:38 +01:00
eugene yokota 317085a458 Merge pull request #3031 from eed3si9n/wip/bump_modules
Bump underlying modules to latest
2017-03-23 22:19:53 -07:00
Eugene Yokota 180bdfd129 Bump underlying modules to latest 2017-03-23 12:41:24 -04:00
xuwei-k f04dbe50bf fix typo 2017-03-21 16:45:42 +09:00
xuwei-k 5b00e7326b s/newInstance/getDeclaredConstructor().newInstance()
java.lang.Class#newInstance deprecated since Java 9

http://download.java.net/java/jdk9/docs/api/java/lang/Class.html#newInstance--

```
Deprecated. This method propagates any exception thrown by the nullary constructor, including a checked exception. Use of this method effectively bypasses the compile-time exception checking that would otherwise be performed by the compiler. The Constructor.newInstance method avoids this problem by wrapping any exception thrown by the constructor in a (checked) InvocationTargetException.
The call

 clazz.newInstance()

can be replaced by

 clazz.getDeclaredConstructor().newInstance()

The latter sequence of calls is inferred to be able to throw the additional exception types InvocationTargetException and NoSuchMethodException. Both of these exception types are subclasses of ReflectiveOperationException.
Creates a new instance of the class represented by this Class object. The class is instantiated as if by a new expression with an empty argument list. The class is initialized if it has not already been initialized.
```
2017-03-15 11:53:49 +09:00
eugene yokota c6b593df95 Merge pull request #2990 from valydia/1.0.x
Add logging of the name(s) of build files
2017-03-09 14:46:19 -05:00
eugene yokota 00113e7133 Merge pull request #2962 from ekrich/wip/fix-2551
Fix #2551: scripted mode ignores quotation
2017-03-09 14:45:13 -05:00
Dale Wijnand 5cedfab81e
Bring back global project-axis reference 2017-03-05 13:42:17 +00:00
Dale Wijnand 07e2da9d85
Don't breach responsibility, NetworkChannel
Only depend on BuildStructure and currentBuild, not the whole of State!
2017-03-05 13:42:16 +00:00
Dale Wijnand bf5bc46d3c
Disallow SettingQuery relying on currentProject
Introduce a specialised scopedKeyParser on SettingQuery to redefine the
"projectRef" parser to never match "*" or omitted project refereneces.
2017-03-05 13:42:16 +00:00
Dale Wijnand b282ea51d7
Extract Act.taskKeyExtra 2017-03-05 13:42:15 +00:00
Dale Wijnand f09897ca29
Drop aggregation in querying settings 2017-03-05 13:42:14 +00:00
Dale Wijnand 2efacb8c46
Delete SettingQuery instances we don't need
.. now that there's a copy in the git history
2017-03-05 13:42:14 +00:00
Dale Wijnand d9d741851a
Add and handle GetSetting 2017-03-05 13:42:11 +00:00
Dale Wijnand 164b0fe830
Pass State to NetworkChannel 2017-03-05 13:40:50 +00:00
Dale Wijnand 1ef59759cc
Extract onExecCommand 2017-03-05 13:40:49 +00:00
valydia 047a061812 Add logging of the name(s) of build files
Fixes #1911
2017-03-04 14:13:39 +00:00
Dale Wijnand e67cd6948b
Fix a bunch but not all compile warnings 2017-03-03 01:33:44 +01:00
Eric K Richardson 3c0257d11c Merge branch '1.0.x' into wip/fix-2551 2017-02-14 10:39:24 -05:00
ekrich b97d68a214 Fix #2551: scripted mode ignores quotation 2017-02-14 10:29:58 -05:00
Devis Lucato 9fd3218eff Fix typo on sbtVersion description 2017-02-09 12:13:58 -08:00
Eugene Yokota 57b1b5baa9 Remove sbt.syntax 2017-02-08 02:26:50 -05:00
eugene yokota ba28c00a1a Merge branch '1.0.x' into topic/generators 2017-02-06 16:17:21 -05:00
eugene yokota 6b5f0980e8 Merge pull request #2940 from eed3si9n/wip/2706
[fport] Configurable explicit list of artifacts for Scala binary version check
2017-01-24 12:40:02 -05:00
Dale Wijnand 26a8b0816a Merge pull request #2937 from eed3si9n/wip/notuples
Migrate tuple usage in Defaults.scala to 0.13 build.sbt DSL
2017-01-24 17:18:26 +00:00
Eugene Yokota 51f7d2e24a Adds an Append instance that extracts taskValue
This adds a macro-level hack to support += op for sourceGenerators and resourceGenerators using RHS of Initialize[Task[Seq[File]]].
When the types match up, the macro now calls `.taskValue` automatically.
2017-01-22 22:53:27 -05:00
Eugene Yokota e2c7f58a14 Uncomment JLine.usingTerminal 2017-01-22 13:13:40 -05:00
Roman Iakovlev e8b951c0d1 Review comments for https://github.com/sbt/sbt/pull/2633 2017-01-22 13:10:34 -05:00
Roman Iakovlev 982a7c8724 Add new SBT global setting asciiGraphWidth
This setting controls the maximum width of the ASCII graphs printed
by commands like `inspect tree`. Default value corresponds to the
previously hardcoded value of 40 characters.
2017-01-22 13:06:20 -05:00
Eugene Yokota 6c4cf28202 Fix dependency-management/scala-organization-version-check
No implicit for Append.Value[Vector[String], String] found
2017-01-22 12:57:16 -05:00
Justin Kaeser cfecf1f6b9 avoid IntelliJ marking valid code as erroneous
relative imports and "println _" cause error highlighting in IntelliJ
2017-01-22 12:01:41 -05:00
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