Commit Graph

4797 Commits

Author SHA1 Message Date
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
Eugene Yokota 6f3e756871 bump to sbt-giter8-resolver 0.1.3 2017-03-11 01:12:54 -05:00
Eugene Yokota bf8e49edbd launcher 1.0.1 2017-03-11 00:41:00 -05:00
Eugene Yokota fa51689820 0.13.14 notes 2017-03-11 00:39:31 -05:00
eugene yokota 1efe482d4a Merge pull request #3001 from dwijnand/fishbone-to-guide
Avoid missleading, link the syntax migration guide
2017-03-10 20:29:35 -08:00
Dale Wijnand 347323bb98
Avoid missleading, link the syntax migration guide
Fixes #2818
2017-03-10 11:29:44 +00:00
Dale Wijnand 59030cf6f0 Merge pull request #2999 from eed3si9n/wip/bump_jline
JLine 2.14.3
2017-03-10 10:58:44 +00: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
Dale Wijnand bce9679ce7 Merge pull request #2993 from eed3si9n/wip/offline_boot
[sbt 0.13] Add local-preloaded repo
2017-03-08 17:27:00 +00:00
Eugene Yokota 0500959003 Add local-preloaded repo 2017-03-08 09:00:22 -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 e75ebb86b6
Try communicating in actual English 2017-03-07 13:56:05 +00:00
Dale Wijnand 1c614fd699
Instruct how to get into interactive mode directly 2017-03-07 13:30:56 +00:00
Dale Wijnand 019f92dc93
Switch from log.info and !!! to log.warn
Good idea, Lars. Thanks.
2017-03-07 13:01:44 +00: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
Dale Wijnand 7e35049ce7 Merge pull request #2959 from eed3si9n/wip/lowerbound
[sbt 0.13] Maven version range improvement
2017-03-06 15:42:40 +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
eugene yokota b6466624a8 Merge pull request #2943 from eed3si9n/backport/generators
[sbt 0.13] Support sourceGenerators += Def.task { ... }
2017-02-07 12:26:54 -05:00
eugene yokota 18f0e56e9d Merge pull request #2952 from dwijnand/notes
Touch up and add missing notes for 0.13.14
2017-02-06 16:55:50 -05:00