Commit Graph

5938 Commits

Author SHA1 Message Date
Dale Wijnand 7a720f1fd0
Merge pull request #3901 from colindean/fix-sbt012x-link
Fixes link to documentation for deprecated 0.10/0.12 DSL syntax
2018-01-25 09:44:28 +00:00
Colin Dean 3e11b3f000 Fixes link to documentation for deprecated 0.10/0.12 DSL syntax
Fixes sbt/website#558
2018-01-24 23:13:00 -05:00
eugene yokota be6bbcd82e
Merge pull request #3875 from eed3si9n/wip/scripted
non-triggered scripted plugin: SbtPlugin
2018-01-23 20:27:03 -05:00
Eugene Yokota 58ee24b427 Migrate to the new way of enabling scripted 2018-01-22 14:03:02 -05:00
Eugene Yokota 0d83b2fc3f notes 2018-01-22 14:03:02 -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 655c2ac5d1 Make ScriptedPlugin not a triggered plugin
Fixes #3514
2018-01-22 14:00:37 -05:00
eugene yokota 8cfec5b3bf
Merge pull request #3891 from allanrenucci/scripted
Enable parallel execution of scripted in the plugin
2018-01-19 12:37:22 -05:00
eugene yokota 8067edbd8a
Merge pull request #3885 from dwijnand/warnings
Remove compile warnings
2018-01-17 13:13:51 -05:00
Allan Renucci 2aed011bc9 Cleanup 2018-01-17 15:19:18 +01:00
jvican 12d2ecfa62 Enable parallel execution of scripted in the plugin
The change to enable batched and parallel execution for scripted was
done only for the scripted-sbt project. This pull request enables it for
scripted-plugin, so that all sbt plugins in 1.x. can benefit from it.

By default, it configures a number of parallel instances of 1 and batch
execution is disabled. Users can change the number of parallel sbt hosts
running scripted tests via the `scriptedParallelInstances` setting.

In some plugins scripted tests', batch execution can cause issues
because the first time `>` commands are executed they assume sbt starts
up. This error can be fixed by doing `reload` before running the `>`
command.

Note that the current scripted plugin does not allow parallel execution
in non-batched mode.
2018-01-17 15:19:18 +01:00
Dale Wijnand c0efc41f2e
Merge pull request #3889 from dwijnand/sbtOn-works-more
Tweak RunFromSourceMain so compile/run/test work
2018-01-17 13:50:46 +00:00
eugene yokota 9a6799ac74
Merge pull request #3887 from dwijnand/fix-sbtOn-prompt-echo
Fix sbtOn's prompt & echo
2018-01-16 15:53:51 -05:00
Dale Wijnand b2290658ba
Tweak RunFromSourceMain so compile/run/test work
Tested pos/neg compilation of a simple hello world file, running said
file & a simple uTest test suite.

Uses things already downloaded in ~/.ivy2/cache, & shares ~/.sbt/boot
for the compiler-bridge component.
2018-01-16 17:05:38 +00:00
Dale Wijnand c00739ebcd
Fix sbtOn's prompt & echo
This is what it looks like now! 🎉

    > sbtOn /s/t-sbtOn
    [...]
    [info] Running (fork) sbt.RunFromSourceMain /s/t-sbtOn
    Listening for transport dt_socket at address: 5005
    [warn] sbt version mismatch, current: 1.0.3, in build.properties: "1.1.0", use 'reboot' to use the new value.
    [info] Loading settings from idea.sbt,global-plugins.sbt ...
    [info] Loading global plugins from /Users/dnw/.dotfiles/.sbt/1.0/plugins
    [info] Updating ProjectRef(uri("file:/Users/dnw/.sbt/1.0/plugins/"), "global-plugins")...
    [info] Done updating.
    [info] Loading settings from plugins.sbt ...
    [info] Loading project definition from /s/t-sbtOn/project
    [info] Updating ProjectRef(uri("file:/s/t-sbtOn/project/"), "t-sbton-build")...
    [info] Done updating.
    [info] Loading settings from build.sbt ...
    [info] Set current project to t (in build file:/s/t-sbtOn/)
    [info] sbt server started at local:///Users/dnw/.sbt/1.0/server/2c27eaf4c750902a3a41/sock
    > show baseDirectory
    [info] /s/t-sbtOn
    > exit
    [info] shutting down server
    [success] Total time: 34 s, completed 16-Jan-2018 14:37:32
    > Exception in thread "Thread-17" java.io.IOException: Stream closed
    	at java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:433)
    	at java.io.OutputStream.write(OutputStream.java:116)
    	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    	at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
    	at scala.sys.process.BasicIO$.$anonfun$input$1(BasicIO.scala:200)
    	at scala.sys.process.BasicIO$.$anonfun$input$1$adapted(BasicIO.scala:198)
    	at scala.sys.process.ProcessBuilderImpl$Simple.$anonfun$run$2(ProcessBuilderImpl.scala:75)
    	at scala.sys.process.ProcessImpl$Spawn$$anon$1.run(ProcessImpl.scala:23)

    > show {.}/baseDirectory
    [...]
    [info] ThisBuild / baseDirectory
    [info] 	/d/sbt
2018-01-16 14:40:03 +00:00
Dale Wijnand 113656aed1
Remove compile warnings 2018-01-16 11:17:01 +00:00
Dale Wijnand d1071002be
Merge pull request #3790 from eatkins/cache-watch-service
Cache WatchService in continuous builds
2018-01-12 15:17:51 +00:00
Dale Wijnand c806a556ef
Merge pull request #3872 from dwijnand/whitesource
Add, configure & enforce sbt-whitesource
2018-01-11 17:00:48 +00:00
Dale Wijnand cdba3e6bea
Add, configure & enforce sbt-whitesource 2018-01-11 14:13:21 +00:00
Dale Wijnand 9c94c4ce1a
Merge pull request #3867 from dwijnand/11
Upgrade to sbt 1.1.0
2018-01-10 17:51:29 +00:00
Dale Wijnand cb2042c283
Upgrade to sbt 1.1.0 2018-01-10 16:08:13 +00:00
Dale Wijnand a52c3bbd9c
Merge pull request #3864 from xuwei-k/mimaPreviousArtifacts
update mimaPreviousArtifacts. add sbt 1.1.0
2018-01-10 14:27:12 +00:00
xuwei-k afd214d4b0 update mimaPreviousArtifacts. add sbt 1.1.0 2018-01-10 12:48:07 +09:00
Dale Wijnand 907fc2615b
Merge pull request #3839 from xuwei-k/delete-build-info
delete "buildinfo.BuildInfo" from sbt main
2018-01-09 14:30:07 +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
xuwei-k 7ff88a3e51 delete buildinfo.BuildInfo from sbt main
sbt-buildinfo plugin have `buildInfoScopedSettings(Compile)` in default.
I think it is unnecessary. or we should set "buildinfoPackage in Compile" and "buildinfoObject in Compile"

https://github.com/sbt/sbt-buildinfo/blob/v0.7.0/src/main/scala/sbtbuildinfo/BuildInfoPlugin.scala#L11
2018-01-08 14:50:42 +09:00
eugene yokota 852d4ea37c
Merge pull request #3852 from eed3si9n/wip/notes
Zinc 1.1.0
2018-01-06 01:45:02 -05:00
Eugene Yokota 5a695b9761 launchconfig 2018-01-05 22:47:58 -05:00
Eugene Yokota 47d66eef0f Zinc 1.1.0 2018-01-05 14:07:04 -05:00
Eugene Yokota bd5cbc4fb3 notes 2018-01-05 14:06:46 -05:00
Dale Wijnand f2f44c738c
Merge pull request #3836 from dwijnand/projectToLocalProject
Introduce projectToLocalProject to replace projectToRef
2018-01-03 16:36:34 +00:00
eugene yokota 8ac280e094
Merge pull request #3835 from cunei/wip-disable-fork-parallel
Keep "tests/fork-parallel" disabled, but add an explanation
2018-01-02 15:09:36 -05:00
Dale Wijnand 4752084f91
Introduce projectToLocalProject to replace projectToRef
Fixes #3757
2018-01-02 16:07:29 +00:00
cunei c3c487c8ab
Merge branch '1.1.x' into wip-disable-fork-parallel 2017-12-23 06:08:55 +01:00
Antonio Cunei eb0bf30712 Adjustments to test file. Scripted can't cope with empty comments
Apparently an empty comment line, meaning a single '#' on a line,
cannot be fed to scripted, which will complain with an odd error
message.

This commit tweaks the comments in the tests/fork-parallel file
so that there are no empty comment lines.
2017-12-23 05:00:38 +01:00
eugene yokota a28381e93a
Merge pull request #3837 from eed3si9n/wip/windows2
Add Library interface
2017-12-22 16:56:03 -05:00
Eugene Yokota 0aebb92ef5 don't block the build when server can't get up 2017-12-22 16:14:05 -05:00
Eugene Yokota 0a3900f53d Add Library interface
Fixes #3821

Initially I missed why #3821 was failing.

Looking at it again, the error message reads:

```
Caused by: java.lang.IllegalArgumentException: Interface (NGWin32NamedPipeLibrary) of library=kernel32 does not extend Library
        at com.sun.jna.Native.loadLibrary(Native.java:566)
        at sbt.internal.NGWin32NamedPipeLibrary.<clinit>(NGWin32NamedPipeLibrary.java:38)
        ... 7 more
```

Inside `Native.loadLibrary`, it requires the "library" interface to extend `com.sun.jna.Library`, which this adds.
2017-12-22 16:10:46 -05:00
eugene yokota 22b7518d5d
Merge pull request #3822 from cunei/wip-milliBis
Use IO.getModifiedTimeOrZero(file) calls
2017-12-22 13:03:55 -05:00
Eugene Yokota 7f0ff7c90a IO 1.1.3, Zinc 1.1.0-RC4 2017-12-22 11:45:31 -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
Antonio Cunei 8c7f93d7a5 Keep tests/fork-parallel disabled, but add an explanation
See https://github.com/sbt/sbt/issues/3545#issuecomment-353247827
2017-12-21 15:25:24 +01:00
Dale Wijnand bef5c9c996
Merge pull request #3833 from eed3si9n/wip/jna
try to set jna.nosys to true programmatically
2017-12-21 08:24: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 eace6c0aed
Merge pull request #3828 from eed3si9n/wip/double_server
warn about multiple instances once
2017-12-20 15:38:40 -05:00