Commit Graph

1933 Commits

Author SHA1 Message Date
Dale Wijnand a73aa97b2c
Cleanup Extracted 2018-03-06 11:54:10 +00:00
Dale Wijnand 76e2f550ec
Merge branch '1.1.x' into merge-1.1.x-into-1.x
* 1.1.x:
  Update mimaPreviousArtifacts/sbt.version
  Introduce SBT_GLOBAL_SERVER_DIR env var to override too long paths
  Handle very long socket file paths on UNIX

Conflicts:
	project/build.properties
2018-02-14 14:38:07 +00:00
Dale Wijnand 4e038c91ce
Introduce SBT_GLOBAL_SERVER_DIR env var to override too long paths 2018-02-12 17:57:26 +00:00
Eugene Yokota 3db0e09b33 Merge branch '1.1.x' into wip/1.1.1
# Conflicts:
#	main/src/main/scala/sbt/internal/CommandExchange.scala
#	main/src/main/scala/sbt/internal/ConsoleProject.scala
#	notes/1.0.2/sample.md
#	notes/1.1.1/sample.md
#	notes/sample.md
#	sbt/src/test/scala/sbt/ServerSpec.scala
2018-02-09 23:55:23 -05:00
Dale Wijnand 8e7dfb4b20
Handle very long socket file paths on UNIX
Fixes #3930
2018-02-08 13:00:46 +00:00
eugene yokota 4a8adbb8e0
Merge pull request #3923 from dwijnand/PluginCross-scala-versions
Upgrade Scala versions that ^^ uses
2018-02-07 22:02:10 -05:00
eugene yokota 54eb6c2d6b
Merge pull request #3929 from eed3si9n/wip/servertest2
Backport server testing as a unit test
2018-02-07 21:18:35 -05:00
Eugene Yokota 3954985506 formatting 2018-02-07 18:16:02 -05:00
Eugene Yokota 5ab122c3cf Use State to pick the port file 2018-02-07 18:00:02 -05:00
Deokhwan Kim 11dbbd0cfa Update documentation for skip
'skip' is also supported for 'publish' by sbt/sbt#3380.
2018-02-07 00:32:03 -05:00
Steve Waldman 96b9429669 Rework false-defaulting 'suppressServer' to true-defaulting 'autoStartServer'. 2018-02-06 11:49:46 -08:00
Dale Wijnand 2db5c77442
Upgrade Scala versions that ^^ uses
Refs #3907
2018-02-06 16:02:45 +00:00
Steve Waldman 0aa133d276 Implement 'suppressServer' setting, for builds and plugins that prefer to be conservative about exposure to other processes. 2018-02-05 23:11:42 -08:00
Eugene Yokota 4b1de14f87 Use State to pick the port file 2018-01-30 23:46:12 -05:00
Dale Wijnand e3f33ddf7d
Merge pull request #3897 from dwijnand/misc
Misc tweaks and cleanups
2018-01-30 13:02:55 +00:00
Dale Wijnand 286758e2ba
Minor cleanups 2018-01-30 07:29:17 +00:00
eugene yokota 5d89795657
Merge pull request #3876 from eed3si9n/wip/jlineinit
Fix tab completion running `sbt console`
2018-01-22 14:14:35 -05:00
Eugene Yokota c20029ce16 Work around package name confusion
This works around the name conflict between sbt.test package and sbt.Keys.test.

1. sbt.test package is renamed to sbt.scriptedtest. This allows 1.0 plugins and builds to use `test` to mean `Keys.test`.
2. To keep binary compatibility for sbt 0.13 scripted, I am adding `sbt.test.ScriptedRunner` and `sbt.test.ScriptedTests` in `scripted-plugin` artifact.
3. Another affected user is Giter8 plugin that uses ScriptedPlugin. Since the intereactions are limited to `sbt.ScriptedPlugin.*`, we should be fine here. - https://github.com/foundweekends/giter8/blob/v0.11.0-M2/plugin/src/main/scala-sbt-1.0/giter8/SBTCompat.scala
2018-01-22 14:03:02 -05:00
Eugene Yokota b05802f63b move some scripted defaults settings to global
Fixes #3656
2018-01-22 14:03:02 -05:00
Eugene Yokota 08eaba9107 Add SbtPlugin
Fixes #3538

This brings in `sbt.ScriptedPlugin` as `sbt.plugins.ScriptedPlugin` into sbt mothership.
In addition, `sbt.plugins.SbtPlugin` is added that enables the scripted plugin and `sbtPlugin := true`.

This allows plugin authors to bring in scripted plugin by writing:

```scala
lazy val root = (project in file("."))
  .enablePlugins(SbtPlugin)
```
2018-01-22 14:02:06 -05:00
Eugene Yokota ca712acf41 Fix tab completion running `sbt console`
Fixes #3841

This fixes console task that internally uses JLine. When `console` is started from batch mode, the tab is printed as is. This is because JLine is not initialized yet.
Calling `usingTerminal` initializes and restores the terminal afterwards.
2018-01-16 15:41:48 -05:00
Dale Wijnand 113656aed1
Remove compile warnings 2018-01-16 11:17:01 +00:00
Dale Wijnand 0885233281
Deprecates Extracted#append for appendWithSession.
.. and appendWithoutSession.
2018-01-15 14:48:58 +00:00
Dale Wijnand a0b27d29b7
Merge pull request #3854 from sbt/1.1.x
1.1.x
2018-01-08 11:16:26 +00:00
Dale Wijnand 4752084f91
Introduce projectToLocalProject to replace projectToRef
Fixes #3757
2018-01-02 16:07:29 +00:00
Eugene Yokota 0aebb92ef5 don't block the build when server can't get up 2017-12-22 16:14:05 -05:00
Antonio Cunei 94e36a14c8 Change modifiedTime definitions 2017-12-22 01:55:37 +01:00
Antonio Cunei ebff7919e9 Revert *ModifiedTime() calls to *lastModified*() calls
There are just too many instances in which sbt's code relies on
the `lastModified`/`setLastModified` semantics, so instead of moving
to `get`/`setModifiedTime`, we use new IO calls that offer the new
timestamp precision, but retain the old semantics.
2017-12-22 01:55:37 +01:00
Dale Wijnand fd8b422488
Merge pull request #3760 from mpollmeier/mpollmeier/resolver-not-needed-if-not-publishing
don't require publishTo specified if publishArtifact is `false`
2017-12-21 15:40:17 +00:00
Eugene Yokota 13e1862c2f set jna.nosys to true programmatically
Previously I was seeing the error upon the first scripted test. I thought it was because Main was somehow not early enough. It might just be because scripted technically runs as part of the build.

Ref sbt/io#110
2017-12-21 00:08:56 -05:00
Eugene Yokota d8609ced7f formatting 2017-12-20 22:36:07 -05:00
Eugene Yokota 06ffb4f440 warn about multiple instance once
Fixes #3823

When you launch a second instance of sbt on a build, prior to this change it was displaying `java.io.IOException: sbt server is already running` on every command. This make it a bit less aggressive, and just display a warning once.

```
[warn] Is another instance of sbt is running on this build?
[warn] Running multiple instances is unsupported
```
2017-12-20 10:09:03 -05:00
eugene yokota 34d311f9ce
Merge pull request #3807 from dwijnand/remove-warnings
Remove warnings
2017-12-19 13:18:59 -05:00
eugene yokota bff933aceb
Merge pull request #3815 from dwijnand/drop-0.14-references
Drop 0.14.0 references
2017-12-18 20:55:34 -05:00
eugene yokota de4af16434
Merge pull request #3818 from sbt/1.1.x
Merge 1.1.x to 1.x
2017-12-18 20:55:11 -05:00
eugene yokota e40ab026c0
Merge pull request #3816 from eed3si9n/wip/bump
Convert lastModified() calls to the more precise getModifiedTime() + modules bump
2017-12-16 13:19:02 -05:00
Dale Wijnand ae99922101 Use IO.getModified over importing the method 2017-12-16 12:22:42 -05:00
Antonio Cunei 8c7b781d3f Moved Milli._ to IO. 2017-12-16 12:22:42 -05:00
Antonio Cunei 699b53262a Convert lastModified() to sbt.io.Milli.getModifiedTime(), more precise 2017-12-16 12:22:42 -05:00
Dale Wijnand fa2c48ed84
Drop 0.14.0 references
Fixes #3411
2017-12-15 15:44:21 +00:00
Michael Pollmeier 4668faff7c
don't require publishTo specified if publishArtifact is `false`
Even with `publishArtifact := false` the user is still forced to define a (dummy) resolver that's never used, e.g. `publishTo := { Some("publishMeNot" at "https://publish/me/not") }`

Otherwise the following error is thrown:
```
publish
[error] java.lang.RuntimeException: Repository for publishing is not specified.
[error]         at scala.sys.package$.error(package.scala:27)
[error]         at sbt.Classpaths$.$anonfun$getPublishTo$1(Defaults.scala:2436)
[error]         at scala.Option.getOrElse(Option.scala:121)
[error]         at sbt.Classpaths$.getPublishTo(Defaults.scala:2436)
[error]         at sbt.Classpaths$.$anonfun$ivyBaseSettings$48(Defaults.scala:1917)
```
2017-12-15 10:53:29 +00:00
Dale Wijnand 8bd522511d
Make CaffeineCache a lazy val
This is to avoid it initialising Log4J2 (via SLF4J), which we initialise
ourselves programmatically in LogExchange. Also there's no need to
removeAll in initialState.

Fixes #3787
2017-12-15 08:55:55 +00:00
Dale Wijnand 5f0852818b
Add project id to watching message
We redefine watchingMessage in project scope so we can use
thisProjectRef to make the watching message more precise.

Fixes #2038
2017-12-15 01:49:14 +00:00
Dale Wijnand a90832b593
Remove all warnings from mainProj 2017-12-14 15:40:03 +00:00
Dale Wijnand f50260218d
Remove all warnings from actionsProj 2017-12-14 13:19:23 +00:00
Dale Wijnand 2390fdfac6
Remove all warnings from mainSettingsProj 2017-12-14 13:16:23 +00:00
Dale Wijnand 2e5aabb222
Merge pull request #3805 from eed3si9n/wip/file_uri
Encode POSIX file path to URI using u3 (file:///)
2017-12-12 17:32:42 +00:00
Eugene Yokota 06b85919ba
Encode POSIX file path to URI using u3 (file:///)
Ref https://github.com/sbt/io/pull/96

Under RFC 8089, both u1 and u3 are legal, but many of the other platforms expect traditional u3.
This will increase the compatibility/usability of sbt server, for example to integrate with Vim.
2017-12-12 16:27:14 +00:00
Antonio Cunei 5c72c3b487 Revert "Alt scala parser sync workaround"
Although in theory the fix in #3776 should be preferable to
synchronize templateStats() manually, it turns out that we
still get errors in some tests. So, reverting to a
synchronized section while we investigate.

This reverts commit ee90917cc4.
2017-12-08 19:21:14 +01:00
Eugene Yokota 2b2c1f0568 prevent "shutdown" when server didn't come up 2017-12-05 08:04:59 -05:00