Commit Graph

4820 Commits

Author SHA1 Message Date
James Koch b75b7f3bbb Merge branch '0.13' into bug-fix 2017-04-30 13:19:47 -04:00
James Koch ecf14d6ad5 Issue #3154 - ScalaTest nested suites reported in JUnit XML reports as "(It is not a test)". 2017-04-30 13:16:23 -04:00
Dale Wijnand 3ea9bbba92 Merge pull request #3153 from dwijnand/kill-enter-to-stay-in-shell
Remove the "hit [ENTER] to switch to interactive mode" feature
2017-04-28 18:07:58 +01:00
Dale Wijnand f4cc3d2938
Remove the "hit [ENTER] to switch to interactive mode" feature
In sbt 0.13.15, in addition to notifying the user about the existence of
sbt's shell, a feature was added to allow the user to switch to sbt's
shell - a more pro-active approach to just displaying a message.

Unfortunately sbt is often unintentionally invoked in shell scripts in
"interactive mode" when no interaction is expected by, for exmaple,
invoking `sbt package` instead of `sbt package < /dev/null`. In that
case hitting [ENTER] would silently trigger sbt to run its shell,
easily wrecking the script. In addition to that I was unhappy with the
implementation as it created a tight coupling between sbt's command
processing abstraction to sbt's shell command.

If you want to stay in sbt's shell after running a task like `package`
then invoke sbt like so:

    sbt package shell

Fixes #3091
2017-04-28 11:00:16 +01:00
Dale Wijnand 684e78cf19 notes 2017-04-28 09:41:53 +01:00
Eugene Yokota d15c051559 notes 2017-04-27 18:41:08 -04:00
Dale Wijnand f9c0187870 Merge pull request #3147 from dwijnand/warn-less
Improvements & bug fixes to the new startup messages
2017-04-27 18:21:30 +01:00
Dale Wijnand 5b808ee38e
Notes for changes to startup messages 2017-04-27 16:38:22 +01:00
Dale Wijnand 54055835be
Notify users about shell only if compile is present
This is a change in strategy.

The motivation is the need to find a good balance between:

  + informing the uninformed that would benefit from this information, &
  + not spamming the already informed

Making it dependent on "compile" being present in remainingCommands will
probably make it trigger for, for example, Maven users who are used to
running "mvn compile" and always run "sbt compile", and who therefore
are unneccesarily suffering terribly slow compile speeds by starting up
the jvm and sbt every time.

Fixes #3091
2017-04-27 16:37:52 +01:00
Dale Wijnand 1c1be9a597
Introduce suppressSbtShellNotification
This requires moving the notification to after LoadProject, so much
later in time, sadly..

Refs #3091
2017-04-27 16:34:32 +01:00
Dale Wijnand a6af8c50c8
Notify users at info level & in 1 line
Refs #3091
2017-04-27 16:34:32 +01:00
Dale Wijnand 2ee0b3c064
Exclude "new" from startup messages
Fixes #3097
2017-04-27 16:34:27 +01:00
Dale Wijnand fdd3f56694
Allow --error to suppress warning messages
Specifically:

* Make them both commands, so they run after early commands (--error).
* Make notifyUsersAboutShell aware of "iflast shell" instead of "boot".
* Make writeSbtShell use a logger and tweak the message

Refs #3091
2017-04-27 16:32:48 +01:00
Dale Wijnand a4e0d9a932
Refactor State#process for clarity 2017-04-27 15:35:36 +01:00
Dale Wijnand 4ab11d7948 Merge pull request #3133 from eed3si9n/wip/sbtcrossbuilding
[sbt 0.13] Port sbt-cross-building's ^ and ^^ commands
2017-04-24 13:06:03 +01:00
Dale Wijnand f64ce4ede1 Merge pull request #3135 from eed3si9n/wip/plusequals
[sbt 0.13] Fix += interference with sbt-buildinfo
2017-04-23 12:39:56 +01:00
Eugene Yokota 90bda04695 Fix += interference with sbt-buildinfo
The macro pattern match was too general. This makes it tighter.

Fixes #3132
2017-04-22 22:59:33 -04:00
eugene yokota 76fe21eb0c Merge pull request #3134 from eed3si9n/wip/zipexception
[sbt 0.13] Ignore ZipException in cache
2017-04-22 13:55:45 -04:00
Eugene Yokota ff017eb475 Port sbt-cross-building's ^ and ^^ commands
This ports sbt-cross-building's cross (`^`) and switch (`^^`) commands.
Instead of making it a plugin, the default settings are now changed
to use `sbtVersion in pluginCrossBuild` for the sbt dependency.
2017-04-22 06:04:56 -04:00
Eugene Yokota 16c8da21ed Ignore ZipException in cache
Fixes #3050
2017-04-22 05:10:23 -04:00
Eugene Yokota 83581db93f Bump to 0.13.16-SNAPSHOT 2017-04-22 05:09:22 -04:00
Eugene Yokota 596702f929 0.13.15 2017-04-09 16:54:02 -04:00
eugene yokota 1fe99df985 Merge pull request #3089 from eed3si9n/wip/slash
Add three slashes (u3) for file URI
2017-04-09 08:50:10 -04:00
Eugene Yokota f42ddc8cfe Add three slashes (u3) for file URI
#3088 attemped to fix the #3086, but by putting no slashes in `sbt.boot.properties` the launcher created by 0.13.15-* becomes incompatible for all previous sbt versions.

The uglier but backward compatible fix for #3086 is to use u3 format with three slashes. This on Windows will resolve to `file:///C:/Users/foo/.sbt/preloaded`, and on Mac and Linux `file:////root/.sbt/preloaded/`. Mac and Linux are both tolerant of extra slashes on the front:

```
> eval new File(new URL("file:////Users/foo/.sbt/preloaded/").toURI)
[info] ans: java.io.File = /Users/foo/.sbt/preloaded
```
2017-04-09 03:11:38 -04:00
eugene yokota c31dfda4ba Merge pull request #3088 from eed3si9n/wip/windows_file
Improve IO.toFile for Windows
2017-04-08 12:17:39 -07:00
Eugene Yokota de3d711f06 Remove slashes from local-preloaded
On Mac and Linux, user.home should return `/home/foo`, resulting to `file:/home/foo`.

On Windows, user.home should return `C:\Users\foo`, resulting to `file:C:/Users/foo`.
2017-04-08 03:59:52 -04:00
Eugene Yokota dea267c224 Improve IO.toFile's handling for Windows
Improve IO.toFile's handling for Windows, and use it for identifying resolvers.

This adds support to convert URL to File on Windows in several ways:

```
val u0 = new URL("file:C:\\Users\\foo/.sbt/preloaded")
val u1 = new URL("file:/C:\\Users\\foo/.sbt/preloaded")
val u2 = new URL("file://unc/Users/foo/.sbt/preloaded")
val u3 = new URL("file:///C:\\Users\\foo/.sbt/preloaded")
val u4 = new URL("file:////unc/Users/foo/.sbt/preloaded")
```

Note that `u0` and `u2` are something `new File(u.toURI)` won't handle. This also correctly handles UNC convention specified by Microsoft in https://blogs.msdn.microsoft.com/ie/2006/12/06/file-uris-in-windows/.

Fixes #3086
Fixes #2150
2017-04-08 03:56:34 -04:00
Eugene Yokota 3247e69cc8 0.13.15-SNAPSHOT 2017-04-07 03:16:43 -04:00
Eugene Yokota ebf3fc0fca launchconfig 2017-04-07 03:15:09 -04:00
Eugene Yokota 54bd86f3c0 notes 2017-04-07 02:09:36 -04:00
eugene yokota ce0f558f38 Merge pull request #3035 from dwijnand/notify-less
Notify about shell less
2017-03-22 09:26:41 -07:00
Dale Wijnand bd59f14f08
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-03-21 13:20:34 +00:00
Eugene Yokota 8b74f1d9d3 0.13.14-RC2 2017-03-20 23:12:27 -04:00
Dale Wijnand 7f2bf7ce1b Merge pull request #3025 from dwijnand/sbt.version
Write sbt.version to project/build.properties
2017-03-17 09:47:41 +00:00
Dale Wijnand aaaf254375
Tell the user we're setting sbt.version 2017-03-16 21:49:15 +00:00
Dale Wijnand 465a9be635
Add -Dsbt.skip.version.write=true opt-out 2017-03-16 19:42:17 +00: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
eugene yokota aa1355c921 Merge pull request #3014 from larsrh/issue/3010
Check for regular file in Package.makeJar
2017-03-14 17:54:11 -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
Lars Hupel 7c2d753ab6 test case for package target check 2017-03-14 16:34:45 +01:00
Lars Hupel b64f64ca9a avoid deleting the target of `makeJar` if it's not a file 2017-03-14 16:20:20 +01:00
eugene yokota 4de2d5040b Merge pull request #3008 from dwijnand/fix/3004/false-positive-executing-in-batch-mode
Handle non-shell sbt startup warning
2017-03-13 10:02:26 -07:00
Dale Wijnand 14adc2b47f
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-03-13 15:44:36 +00:00
Eugene Yokota b78b8f0a60 notes 2017-03-11 14:21:02 -05:00
Eugene Yokota eeac53b395 0.13.14-RC1 2017-03-11 13:44:22 -05:00
eugene yokota a7413f6415 Merge pull request #3002 from eed3si9n/wip/notes
Preparing for 0.13.14-RC1
2017-03-11 08:30:36 -08:00
Eugene Yokota 02c433cc2d more notes 2017-03-11 02:35:48 -05:00