Commit Graph

323 Commits

Author SHA1 Message Date
Eugene Yokota 54bd86f3c0 notes 2017-04-07 02:09:36 -04:00
Dale Wijnand 155f764943
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-03-16 18:55:26 +00:00
Dale Wijnand 9c2636e46a Merge pull request #3017 from eed3si9n/wip/NumberFormatException
Fix version parsing
2017-03-15 16:03:41 +01:00
Eugene Yokota 15a2d68367 Fix version parsing
Fixes #3011
2017-03-15 00:50:58 -04:00
eugene yokota 32bf2efe6d Merge pull request #3015 from smarter/0.13
Fix #3013: ScriptedPlugin: Add support for paginated tests
2017-03-14 17:54:25 -07:00
Guillaume Martres 052face8ee Fix #3013: ScriptedPlugin: Add support for paginated tests
This was already supported in the internal Scripted used by sbt but not
in the ScriptedPlugin. This is fixed by just copy-pasting the modified
parser. We will have to wait for sbt itself to be built using an sbt
with the upgraded ScriptedPlugin to be able to avoid the code duplication.
2017-03-14 16:53:06 +01:00
Eugene Yokota b78b8f0a60 notes 2017-03-11 14:21:02 -05:00
Eugene Yokota 02c433cc2d more notes 2017-03-11 02:35:48 -05:00
Eugene Yokota fa51689820 0.13.14 notes 2017-03-11 00:39:31 -05:00
Eugene Yokota 48a4ff327f JLine 2.14.3
Fixes #1855
See also https://github.com/jline/jline2/issues/127
2017-03-09 15:01:50 -05:00
eugene yokota cc19d51f1d Merge pull request #2961 from ekrich/wip13/fix-2551
Fix #2551: scripted mode ignores quotation
2017-03-09 14:44:59 -05:00
eugene yokota a3d776c1c9 Merge pull request #2996 from dwijnand/stay-in-shell
Notify & enable users to stay in the warm shell
2017-03-07 13:16:41 -05:00
Dale Wijnand b53d8c4433
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-03-07 12:36:34 +00:00
Dale Wijnand 0130e97d0e Merge pull request #2972 from haochi/0.13
Backport #2941 to 0.13.x
2017-03-06 16:02:25 +00:00
Haochi Chen f2ff94f0f3 Backport #2941 to 0.13.x 2017-02-23 02:24:22 -03:00
Eric K Richardson 8a78de1ff3 Merge branch '0.13' into wip13/fix-2551 2017-02-14 10:05:15 -05:00
ekrich d74b24db42 Fix #2551: scripted mode ignores quotation 2017-02-14 09:55:27 -05:00
Eugene Yokota 54564ba7ce Maven version range improvement
Previously, when the dependency resolver (Ivy) encountered a Maven version range such as `[1.3.0,)`
it would go out to the Internet to find the latest version.
This would result to a surprising behavior where the eventual version keeps changing over time
*even when there's a version of the library that satisfies the range condition*.

This changes to some Maven version ranges would be replaced with its lower bound
so that when a satisfactory version is found in the dependency graph it will be used.
You can disable this behavior using the JVM flag `-Dsbt.modversionrange=false`.

Fixes #2954
Ref #2291 / #2953
2017-02-10 04:00:04 -05:00
Dale Wijnand 9e67e0afba
Add notes for .triggeredBy/.storeAs/etc fix 2017-02-06 10:24:15 +00:00
Dale Wijnand c50f7b5c6b
Add notes for preliminary compatbility with jdk 9 2017-02-06 10:24:12 +00:00
Dale Wijnand 3ff04f987c
Touch up exisiting 0.13.14 notes 2017-02-06 10:24:10 +00:00
Guillaume Martres 3c6db1ce5d 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-01-11 16:06:45 +01:00
eugene yokota c223dccb54 Merge pull request #2854 from ashleymercer/0.13-junit-skipped
JUnitXmlTestsListener now correctly flags ignored, skipped and pending tests
2016-11-30 18:03:04 -05:00
Eugene Yokota 00bab7b743 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.
2016-11-30 02:33:05 -05:00
Ashley Mercer 26bc85cb67 JUnitXmlTestsListener now correctly flags ignored, skipped and pending tests
Fixes #2198 Ref #PULL

Generated Junit-style XML reports now include a count of ignored,
skipped and pending tests; and individual tests are correctly flagged
with the <skipped/> element.
2016-11-29 23:08:51 +00:00
Eugene Yokota 7d6c56e391 Apply binary version conflict check to Compile related configs
Fixes #1466 Ref #2786

Even after fixing the mediator issue, we still have spurious binary
version conflict warning that does not account for sandbox
configurations.

This change follows the scalaVersionConfigs work.
2016-11-11 15:44:05 -05:00
Eugene Yokota 07e2a9a799 Bump up Ivy
Fixes #2015
2016-11-11 14:42:48 -05:00
Eugene Yokota 8d0e4d2ef0 Apply scalaVersion enforcement to Compile related configs
Fixes #2786. Ref #2634.

sbt 0.13.12 added Ivy mediator that enforces scalaOrganization and
scalaVersion for Scala toolchain artifacts.
This turns out to be a bit too aggressive because Ivy configurations
can be used as an independent dependency graph that does not rely on
the scalaVersion used by Compile configuration. By enforcing
scalaVersion in those graph causes runtime failure.

This change checks if the configuration extends Default, Compile,
Provided, or Optional before enforcing scalaVersion.
2016-11-11 05:15:58 -05:00
Eugene Yokota a3357af540 notes 2016-10-14 21:22:34 -04:00
Eugene Yokota cb5cf8dd54 notes 2016-10-14 21:08:39 -04:00
Dale Wijnand 6ad39b1069
Deprecate tuple enrichments. Fixes #2763 2016-10-14 21:28:51 +01:00
Eugene Yokota 6f3bbed47e 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.
2016-10-12 20:06:10 -04:00
Miles Sabin 0dfd40972d Added CrossVersion.patch which strips off -bin-suffix. (#2757) 2016-09-29 01:42:59 +01:00
Dale Wijnand f860d5ef31 Recycle classloaders to be anti-hostile to JIT: Notes (#2756) 2016-09-27 23:26:24 +01:00
Eugene Yokota 272ada1e74
Improve `show` when key returns a `Seq`
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-27 14:23:53 +01:00
Eugene Yokota 1ed546d567 notes 2016-09-16 02:46:24 -04:00
Eugene Yokota d945925d0e
Silent startup for scalas
Fixes #840
2016-09-15 22:08:56 +01:00
eugene yokota dea72b6471 Launcher fixes notes 2016-09-15 16:17:24 -04:00
eugene yokota dddbc8491e Update 0.13.13.markdown 2016-09-15 15:49:59 -04:00
eugene yokota cb9ac64ba4 Use third-person singular on the bullet points 2016-09-15 15:43:59 -04:00
Dale Wijnand 29c23eaaae
Hand merge notes, with my own tweaks 2016-09-15 13:19:01 +01:00
Dale Wijnand 8f2a5a659a Merge pull request #2742 from eed3si9n/wip/early2
[sbt 0.13] Rename early command to `early(command)`
2016-09-15 11:22:16 +01:00
Eugene Yokota ee718e8700 Rename early command to `early(command)`
Backports #2741, Fixes #1041

e93c445 added a feature called early command, which uses `--` as a
prefix to denote some commands that runs ahead of session loading.
While the feature might be useful especially for logging, `--` is too
useful just for this purpose.

In addition, this adds log level commands with single `-`, such as
-error to treat them as early commands; and keeps `--` variant for log
level for backward compatibility.
2016-09-15 03:06:12 -04:00
Eugene Yokota 675f70fd85 Rename to extraProjects/derivedProjects
Ref #2717
2016-09-14 20:09:16 -04:00
eugene yokota 0a13ac1231 Merge pull request #2730 from dwijnand/wip/forked_test
Fail when the forked test harness fails
2016-09-05 14:19:11 -04:00
Jaroslaw Grabowski cfe3b801e1 Support wildcard exclusions in maven resolver
The idea here is that if a dependency contains exclude with wildcards
than it is inTransitive.
2016-09-02 12:20:22 +01:00
Eugene Yokota 254c615f36 Fail when the forked test harness fails
Fixes #2442/#2722
2016-09-02 11:59:30 +01:00
eugene yokota 16a6906826 Deprecate the old operators `<<=`, `<+=`, and `<++=` (#2716)
* Backport style changes in tests and Defaults.scala

This backports the scripted tests and Defaults.scala style changes to
use `build.sbt` and `:=`.

* Fix backport

* 	Deprecate the old operators `<<=`, `<+=`, and `<++=`

The no-longer-documented operators `<<=`, `<+=`, and `<++=` are
deprecated in anticipation of the removal in sbt 1.0. Ref #2711

For `<<=`, the suggested migration would be to use either `:=` or `~=`
operators. The RHS of `<<=` takes an `Initialize[_]` expression, which
can be converted to `:=` style by wrapping the expression in
parenthesis, and calling `.value` at the end.
2016-08-29 21:15:13 +02:00
Eugene Yokota 0fab1181c4 Add buildExtras and projectExtras. 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.
2016-08-27 07:31:51 -04:00
eugene yokota 6631456eff Deprecate .value extension method from input tasks (#2709)
Calling the `.value` method on an input task returns `InputTask[A]`, which is completely unintuitive. I think it's basically a bug in `.value`. This change deprecates the `.value` call on input tasks, in preparation to the removal in sbt 1.0.

In most cases `.evaluated` should be called, which returns `A` by evaluating the task. Just in case `InputTask[A]` is needed, `inputTaskValue` method is now provided.

One of the motivation for doing this now is the deprecation of old operators `<<=`, which forces more users to convert to the `:=` style and potentially run into the `.value` behavior.
2016-08-26 14:44:49 -04:00