Commit Graph

1543 Commits

Author SHA1 Message Date
Justin Kaeser 7fb8a4e88a port sddPluginSbtFile command from https://github.com/sbt/sbt/pull/4211/ to sbt 0.13 2018-08-23 18:21:16 +03:00
Dale Wijnand fdcdc140fb Upgrade Scala versions that ^^ uses
Refs #3907
2018-02-21 13:56:17 +09:00
Eugene Yokota 68f547a465 Filter auto compiler plugin to classpath JARs
Fixes #3784

For Ivy repos, sbt 1.x publishes source and scaladoc JARs under `compile` configuration with types `src` and `doc` respectively. The current 0.13 implementation of `autoPlugins(...)` is not filtering them out correctly, and ends up including a source JAR as a compiler plugin.
2018-01-06 18:44:27 -05:00
Dale Wijnand 9bf3b0a556
Preserve cleanFiles' type for bincompat 2018-01-02 10:25:18 +00:00
Eugene Yokota 377ff91484
Make clean task run exclusively
Cherry-picked acf6c1191e
2017-12-21 11:55:01 +00:00
Eugene Yokota 183adc3d23
Reimplement clean and cleanFiles tasks
cleanFiles is now a task that lists exactly what will be deleted recursively.

Cherry-picked 7acb8764f5
2017-12-21 11:51:14 +00:00
Ólafur Páll Geirsson dfe2932bc8 Update tuple enrichment deprecation warning messages.
Following discussions in https://github.com/sbt/sbt/issues/3454
2017-08-17 12:56:41 +02:00
eugene yokota 96ddc33a3e Merge pull request #3397 from dwijnand/sbt-plugin-cross-version
Fix addSbtPlugin to use the correct version of sbt
2017-08-08 13:09:56 -04:00
Dale Wijnand 2fc0a6a571
Fix addSbtPlugin to use the correct version of sbt
Fixes #3393
2017-08-08 15:09:12 +01:00
eugene yokota b2b02a1dd7 Merge pull request #3403 from dwijnand/fix-doc-more
Remove a series of warnings from running `doc`
2017-08-04 17:39:32 -04:00
Dale Wijnand 47c4542a30
Remove a series of warnings from running `doc` 2017-08-04 11:34:27 +01:00
Dale Wijnand 684e2c3692
Drop the exec permission on random source files 2017-08-04 11:13:40 +01:00
Eugene Yokota 23bfcf58a5 Fix ^^ and don't inject scalaVersion by default
This no longer injects scalaVersion at the project level, which was interfering with crossScalaVersions delegation to ThisBuild scope.

Fixes sbt/sbt#3353
2017-07-25 13:05:40 -04:00
Eugene Yokota c9fc72c610 Format enforcement 2017-07-25 13:02:24 -04:00
Dale Wijnand d0db2e2dd3 Merge pull request #3347 from dwijnand/sbtUnchecked
Add `@sbtUnchecked` to sbt 0.13.16
2017-07-24 15:56:46 +01:00
Eugene Yokota 92c46dd231 Override current project's scalaVersion on ^^
Both the default settings and ^^ together sets the correct scalaVersion based on `sbtVersion in pluginCrossBuild`, but frequently people set up `scalaVersion` on sbt plugin's subproject, which disables the feature.
This change appends the scalaVersionSetting on ^^ so scalaVersion gets switched to 2.12.2 on ^^ 1.0.0-RC2 etc.

Fixes #3205
2017-07-21 23:01:10 -04:00
Dale Wijnand 3cd2a979ca
Add `@sbtUnchecked` to sbt 0.13.16
Fixes #3337
2017-07-19 13:36:06 +01:00
Eugene Yokota 303ee137bd Scalariform changes 2017-05-21 13:18:53 -04:00
Dale Wijnand d3fa1e06c6
Deprecate BuildCommon's toError
Removed in sbt 1
2017-05-16 10:15:09 +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 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
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 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 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
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
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
Lars Hupel b64f64ca9a avoid deleting the target of `makeJar` if it's not a file 2017-03-14 16:20:20 +01: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 6f3e756871 bump to sbt-giter8-resolver 0.1.3 2017-03-11 01:12:54 -05:00
Dale Wijnand 347323bb98
Avoid missleading, link the syntax migration guide
Fixes #2818
2017-03-10 11:29:44 +00: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 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
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 70a2878dbc 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 23:44:48 -05:00
Dale Wijnand 011d0e8489
Remove some code duplication between TaskInstance and MultiInTask 2017-01-13 14:26:54 +00:00