Commit Graph

881 Commits

Author SHA1 Message Date
Ethan Atkins 7b8ed4d13f Allow sbt scripted tests to run in parallel
I'm not sure if this is a huge benefit or not, but it's nice to have the
option to run the scripted tests in parallel. The default behavior
should be the same as before.
2019-01-31 17:43:14 -08:00
Ethan Atkins b2c9d3e2cf Use custom classloader for scripted tests
We had previously used reflection to load the bridge class, but
continued using sbt's default classloader. This was problematic because
the metabuild could have a different classpath from that required by the
scripted tests.

Bonus: scalafmt

Fixes: #4514
2019-01-31 17:43:14 -08:00
Eugene Yokota e91b651a03 Zinc 1.3.0-M2, Util 1.3.0-M4 2019-01-29 18:15:40 -05:00
Eugene Yokota d58cc75e39 IO 1.3.0-M5 2019-01-16 22:35:12 -05:00
Ethan Atkins 541d4047e6 Bump scala version 2.12.8
I ran a zsh one liner to generate this:
git grep "2.12.7" | cut -d ':' -f1 | sort | uniq | xargs perl -p -i -e "s/2.12.7/2.12.8/"
2019-01-08 11:11:23 -08:00
Eugene Yokota 6001c4e2e6 sbt-assembly 0.14.9 2019-01-02 14:37:29 -05:00
Eugene Yokota cb6bb1bfcb Bump dependencis 2018-12-14 00:11:44 -05:00
Antonio Cunei cf1034e28e Bump scalatest to 3.0.6-SNAP5 2018-12-08 13:12:26 -05:00
Antonio Cunei 9104bde061 Bump log4j2 to 2.11.1 2018-12-08 13:09:02 -05:00
Eugene Yokota 44074983bc util 1.3.0-M3 2018-11-18 12:12:38 -05:00
andrea 39493f7869 adding a fatjar release (aka sbt-big) to the build 2018-11-07 08:37:49 +00:00
Eugene Yokota 93c8ab0a2d librarymanagement 1.2.2 2018-10-15 05:13:43 -04:00
eugene yokota 1f8e9c9657
Merge pull request #4410 from eed3si9n/wip/semantic
ThisBuild / enableSemanticDB
2018-10-12 01:00:16 -04:00
Eugene Yokota 9c611f2c07 -Yrangepos for sbt 2018-10-11 15:44:15 -04:00
andrea 0c11bc6add Build time configurable library management 2018-10-09 09:03:55 +01:00
Ethan Atkins 6725b39a84 Bump io to 1.3.0-M3
I had to turn off -Xfatal-warnings in commandProj because after updating
io, commandProj depends on the deprecated EventMonitor class. In #4335,
I stop using EventMonitor, but deprecate the Watched class which is both
defined and used (as an unused attribute key) in commandProj. I think we
can probably get rid of Watched in 1.4.x and certainly in a hypothetical
2.x, so hopefully we can restore -Xfatal-warnings sooner than later.

I also had to replace uses of IO.classLocationFile with
IO.classLocationPath to avoid compilation failures due to
-Xfatal-warnings.
2018-10-08 13:59:34 -07:00
eugene yokota 4867e87eca
Merge pull request #4396 from eed3si9n/wip/progress
"super shell" for sbt
2018-10-06 13:07:11 -04:00
Eugene Yokota c64166ea8d check PluginCross.scala consisntency 2018-10-05 13:32:40 -04:00
Eugene Yokota fa23e785d6 sbt-houserules 0.3.9 2018-10-05 03:03:59 -04:00
Eugene Yokota 6224b1dda1 Util 1.3.0-M2 2018-10-02 11:08:49 -04:00
Eugene Yokota 467d653efb Bump up test frameworks used in scripted tests
This is in part to test these on JDK 11 by bumping tests to Scala 2.12.7.
2018-09-29 23:19:49 -04:00
Eugene Yokota fb168d24bb Scala 2.12.7 2018-09-27 12:38:39 -04:00
Eugene Yokota ef49a95b7d address more warnings 2018-09-18 17:45:24 -04:00
Eugene Yokota 4b23036c63 contraband 0.4.1 2018-09-18 16:56:19 -04:00
Eugene Yokota 3e1dac5161 -Xfatal-warnings in most subprojects 2018-09-18 11:47:55 -04:00
Eugene Yokota f2bc786fd1 cleaning up a few compiler warnings 2018-09-17 22:30:14 -04:00
eugene yokota 8af7a5acae
Merge pull request #4358 from eed3si9n/wip/license
Apache License 2.0
2018-09-14 11:11:17 -04:00
Eugene Yokota 0843cd6a3c sbt 1.2.3 2018-09-14 03:28:12 -04:00
Eugene Yokota 45c857d152 Bump modules 2018-09-14 03:16:17 -04:00
Eugene Yokota f4ae038023 Fix single repo emulation script
Fixes #4330
Ref 5b179a2611 (diff-fdc3abdfd754eeb24090dbd90aeec2ce)
2018-08-24 06:25:40 -04:00
Eugene Yokota fa3b0f0313 sbt 1.2.1 2018-08-16 15:55:25 -04:00
Eugene Yokota a1d1c77311 Zinc 1.2.1, IO 1.2.1 2018-08-06 16:46:55 -04:00
Eugene Yokota 305a8de319 1.2.1-SNAPSHOT 2018-07-30 20:28:42 -04:00
Eugene Yokota 3d5b198f88 Zinc, LM, Util 1.2.0 2018-07-29 22:45:46 -04:00
Eugene Yokota 29fa4fb20c Zinc 1.2.0-M2 2018-07-14 03:17:52 -04:00
eugene yokota 18602c521d
Merge pull request #4258 from eed3si9n/wip/scripted
scripted-sbt-redux
2018-07-10 10:03:26 -04:00
Eugene Yokota d7dc4b3e29 create scripted-sbt-redux
Fixes #4241
Fixes #4242

This introduces a new subproject named scripted-sbt-redux. The purpose of this new subproject is to workaround the 'sbt.test` package vs `Keys.test` key confusion (#4242) while maintaining the forward compatibility of 0.13.17's sbt cross testing ^^ (#4241).

The new subproject uses `sbt.scriptedtest` package name, and that's the one that will be used by the mothership.

Meanwhile "scripted-sbt" subproject will also be published for compatibility purpose.
2018-07-10 03:13:47 -04:00
xuwei-k f01ff3dd03 simplify build settings. sbt 1.x no longer support old scala versions 2018-07-10 11:51:14 +09:00
xuwei-k b8b9e96bf5 remove unused project/SiteMap.scala
added d6ca66d406
unused since 7f2bd2cc4b
2018-07-09 14:54:24 +09:00
Eugene Yokota c0030d594c LM 1.2.0-M3
Fixes https://github.com/sbt/sbt/issues/3773
Ref https://github.com/sbt/librarymanagement/pull/211
Ref https://github.com/sbt/librarymanagement/pull/253
2018-07-01 03:12:44 -04:00
Eugene Yokota 17e0042bd8 Util 1.2.0-M2, LM 1.2.0-M2 2018-06-27 21:07:03 -04:00
Eugene Yokota 14b9bd6e7a IO 1.2.0-M2
Fixes https://github.com/sbt/sbt/issues/4223
2018-06-25 17:02:32 -04:00
Eugene Yokota ddf0f4f43d bump modules to 1.2.0-M1 2018-06-18 22:39:40 -04:00
Eugene Yokota 8ec0e0193e sbt-houserules 0.3.7 2018-06-14 02:51:09 -04:00
Eugene Yokota 86427c7ce7 Merge branch '1.1.x' into wip/merge-1.1.x 2018-06-12 23:33:47 -04:00
Eugene Yokota 833e61635e IO 1.1.10 and Zinc 1.1.5 2018-05-27 22:38:58 -04:00
Eugene Yokota b849894a36 IO 1.1.8 2018-05-08 17:52:30 -04:00
Eugene Yokota 24946189f0 Zinc 1.1.7 2018-05-07 16:18:46 -04:00
Eugene Yokota 38d53a941a IO 1.1.7, Zinc 1.1.6 2018-05-05 04:53:34 -04:00
Eugene Yokota 96287f1ad5 Merge branch '1.1.x' into wip/merge-1.1.x 2018-05-04 21:55:50 -04:00
Eugene Yokota 94a57dcf00 Move fakeboot to home
https://github.com/sbt/sbt/pull/4143 kept failing, and while I was debugging,
I noticed that the target that it was downloading scala-compiler was in
/tmp/... for the remote instance.
This moves the fakeboot to a full path, which should make the build
less susceptible to failure due to random network issues.
2018-05-04 19:37:42 -04:00
Eugene Yokota 8409735077 Merge branch '1.1.x' into wip/merge-1.1.x 2018-05-04 12:40:43 -04:00
Eugene Yokota 28e90ea09b Merge branch '1.1.x' into wip/merge-1.1.x 2018-04-29 14:31:30 -04:00
Seth Tisue 4477a42b5a upgrade Scala 2.12.4 -> 2.12.6
I have no specific user-visible benefit in mind other than fewer
JARs to download for people who are on current versions of things
2018-04-27 23:20:51 -04:00
Dale Wijnand 490f57c779
Upgrade to sbt-scalafmt 1.15 & scalafmt 1.4.0 2018-04-24 16:09:48 +01:00
Dale Wijnand 065b65a05e
Drop -Ywarn-unused:-params
Previously we'd get in the build logs:

    [error] params cannot be negated, it enables other arguments

and lots of wawrnings.

Now we just get lots of warnings without the non-fatal error message.
2018-04-24 07:29:49 +01:00
Dale Wijnand a8c1239e32
Merge pull request #4058 from retronym/topic/quietly-cancel
Avoid printing RejectedExectionExeption stack trace after cancellation
2018-04-11 12:00:03 +01:00
Heikki Vesalainen e5a37cad42
Update to Jline 2.14.6
This version of Jline fixes three things for Emacs users:
- ANSI colors are now enabled for Emacs.
- Terminal echo is now disabled for Emacs.
- History is enabled for all dump terminals.
2018-04-11 00:10:56 +03:00
Dale Wijnand 54a6262f7f
Merge pull request #4041 from dwijnand/Scoped.equals
Give Scoped a default equals/hashCode implementation
2018-04-10 06:10:55 +01:00
Eugene Yokota b9eb7764f3 Zinc 1.1.5 2018-04-09 12:37:42 -04:00
Jason Zaugg 1abb0a3641 Upgrade to latest sbt-houserules 2018-04-08 14:31:48 +10:00
Eugene Yokota 32385c8bb7 launcher 1.0.4 2018-04-06 18:36:10 -04:00
Eugene Yokota 8781c16cbb bump IO and Zinc 2018-04-06 16:30:33 -04:00
Eugene Yokota 707bf08c4e Add new closewatch mode 2018-04-05 20:29:26 -04:00
Dale Wijnand 3692db9068
Give Scoped a default equals/hashCode implementation 2018-04-04 15:04:53 +01:00
Dale Wijnand 218621b745
Merge pull request #4061 from eed3si9n/wip/perf
document profiling tools
2018-04-04 14:22:44 +01:00
Eugene Yokota 56ffac22b7 document profiling tools 2018-04-04 01:29:56 -04:00
Jason Zaugg 0b801e7598 Bump Scala version to 2.12.5 2018-04-03 14:25:59 +10:00
Heikki Vesalainen e30c0fbd1e Update to Jline 2.14.6
This version of Jline fixes three things for Emacs users:
- ANSI colors are now enabled for Emacs.
- Terminal echo is now disabled for Emacs.
- History is enabled for all dump terminals.
2018-03-28 14:31:21 +00:00
Eugene Yokota c2837c7714 Merge branch 'wip/bumpsbt' into wip/merge-1.1.x 2018-03-27 10:16:10 -04:00
Eugene Yokota f607b6c73f sbt 1.1.2 2018-03-27 06:52:32 -04:00
Eugene Yokota 9d2d81645b bump modules 2018-03-24 11:02:40 +09:00
Dale Wijnand dd4de14593
Upgrade to contraband 0.4.0 2018-03-12 15:39:07 +00:00
Dale Wijnand ed5a8c118b
Upgrade to contraband 0.3.3 2018-03-08 12:49:38 +00:00
Dale Wijnand 9d808a389c
Update PublishBinPlugin to current sbt 2018-03-06 11:54:13 +00:00
Dale Wijnand 8187a51d31
Cleanup local Scripted plugin 2018-03-06 11:54:11 +00:00
Dale Wijnand 41249f707a
Define local Scripted plugin keys with macros 2018-03-06 11:54:11 +00:00
Dale Wijnand b9e3d6aa2d
Define local Scripted plugin keys in Global scope 2018-03-06 11:54:11 +00:00
Dale Wijnand 90cd60f3b9
Merge branch '1.1.x' into merge-1.1.x-into-1.x
* 1.1.x:
  Use Java's redirectInput rather than sys.process's connectInput
  Re-write toolboxClasspath to use sbt-buildinfo
  Cleanup generateToolboxClasspath
  Upgrade to sbt-buildinfo 0.8.0
  Fix how fullClasspath is defined in TestBuildInfo
  delete buildinfo.BuildInfo from sbt main

Conflicts:
	project/plugins.sbt
2018-02-28 10:30:53 +00:00
Dale Wijnand edb828a8d7
Upgrade to sbt-buildinfo 0.8.0 2018-02-23 13:19:05 +00:00
eugene yokota e078c126d1
Merge pull request #3964 from sbt/1.1.x
1.1.x
2018-02-21 15:12:44 -05:00
Eugene Yokota 594738bb9c add publishLocalAllModule command 2018-02-21 02:28:33 -05: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 e8d1a30474
Update mimaPreviousArtifacts/sbt.version 2018-02-14 10:53:37 +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
Eugene Yokota 7df32cff84 Zinc 1.1.1, LM 1.1.3, IO 1.1.4 2018-02-08 01:06:09 -05: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 a2347332ab Use ipcsocket 2018-02-07 17:46:23 -05:00
Dale Wijnand 2db5c77442
Upgrade Scala versions that ^^ uses
Refs #3907
2018-02-06 16:02:45 +00:00
Eugene Yokota 50f3dd2e20 Use ipcsocket 2018-01-30 23:21:10 -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 bee69ebb92
Get rid of old MavenResolverPluginTest 2018-01-30 07:29:17 +00: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
Dale Wijnand cdba3e6bea
Add, configure & enforce sbt-whitesource 2018-01-11 14:13:21 +00:00
Dale Wijnand cb2042c283
Upgrade to sbt 1.1.0 2018-01-10 16:08:13 +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
Eugene Yokota 47d66eef0f Zinc 1.1.0 2018-01-05 14:07:04 -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
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 4c3b770b27 bump to sbt 1.0.4 2017-12-19 20:57:09 -05:00
eugene yokota 34d311f9ce
Merge pull request #3807 from dwijnand/remove-warnings
Remove warnings
2017-12-19 13:18:59 -05:00
Dale Wijnand 257712c052
Merge pull request #3824 from eed3si9n/wip/windows
Add Windows testing
2017-12-19 17:01:13 +00:00
Dale Wijnand ad2d71cae4
Upgrade to sbt-houserules 0.3.5 2017-12-19 13:25:58 +00:00
Eugene Yokota 294110e2b8 Remove JNA from sbt/sbt
There's a conflict in JNA version difference between sbt and IO.

Fixes #3821
2017-12-19 00:44:31 -05:00
Eugene Yokota 40b86ae412 bump modules and plugins 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 1f1806a4f1
Re-enable unused warnings 2017-12-12 13:02:18 +00:00
Dale Wijnand bbddb26224
2.12.4 2017-12-12 13:02:18 +00:00
Eugene Yokota d193d302f0 lm 1.1.0 2017-11-29 22:31:57 -05:00
Eugene Yokota ff004993e0 Bump modules 2017-11-29 16:53:40 -05:00
Eugene Yokota a6eb1260c8 Merge branch '1.0.x' into wip/bump 2017-11-29 16:45:02 -05:00
wpopielarski 73b0034cfc textDocument/definition for LSP / VS Code
This is an implementation of `textDocument/definition` request.
Supports types only, and only in case when type is found in Zinc Analysis. When source(s) are found then editor opens potential source(s).
This simple implementation does not use semantic data.

During the processing of `textDocument/didSave`, we will start collecting the location of Analysis files via `lspCollectAnalyses`.
Later on, when the user asked for `textDocument/definition`, sbt server will invoke a Future call to lspDefinition, which direct reads the files to locate the definition of a class.
2017-11-28 13:27:07 -05:00
Dale Wijnand 9c32c16ade
Create RunFromSourceMain & "sbtOn" command 2017-11-28 17:27:02 +00:00
Dale Wijnand 297fd5d24b
Merge pull request #3742 from eed3si9n/wip/socket
IPC Unix domain socket / Windows named pipe
2017-11-28 16:04:11 +00:00
Eugene Yokota f785750fc4 IPC Unix domain socket for sbt server
In addition to TCP, this adds sbt server support for IPC (interprocess communication) using Unix domain socket and Windows named pipe.

The use of Unix domain socket has performance and security benefits.
2017-11-27 21:37:31 -05:00
Eugene Yokota 1d8d1a1622 Zinc 1.0.5 2017-11-26 02:26:04 -05:00
xuwei-k 6b4093dc15 update specs2 4.0.1 2017-11-26 13:59:50 +09:00
Eugene Yokota 309fdfac31 Bump modules 2017-11-25 00:27:45 -05:00
Antonio Cunei 43a976d42c Port of sbt/zinc#441 to sbt/sbt 1.0.x 2017-11-16 15:15:21 +01:00
Eugene Yokota afe9757da0 Bump launcher to 1.0.2
Fixes #3676
2017-11-07 22:54:05 -05:00
Eugene Yokota 84f03b64be Bump modules
Fixes #3519
Fixes #3586
Fixes #3569
Fixes #3573
2017-10-26 21:13:48 -04:00
Dale Wijnand e0d8079083
Scalafmt 1.3, sbt-scalafmt 1.14 2017-10-24 12:23:37 +01:00
Dale Wijnand 78c5ee92d3
Track sources in base directory non-recursively
Using a recursive Source meant that ~ looked into target. If you have
any source generators and use ~ with anything the invokes them, like
~compile, that means that the act of generating sources triggers ~ to
re-execute compile (perhaps only on macOS where the NIO WatchService
just polls, after an initial delay).

Requires sbt/io#78

Fixes #3501
2017-10-24 11:09:00 +01:00
Eugene Yokota ae860d5a7d Bump to Scala 2.12.4
Uses Scala 2.12.4 for the build definition. This includes fix for runtime reflection of empty package members under Java 9.

Fixes sbt/sbt#3587
2017-10-20 00:23:29 -05:00
Simon Schäfer ebac491501 Disable patvars warnings
There are simply too many unused pattern vars and I don't want to fix
them right now. And watching all of the warnings everywhere is annoying.
2017-10-19 13:07:24 +02:00
Simon Schäfer 30d59d356d Disable warnings for unused params and implicits
There are many warnings because unused parameter are everywhere.
2017-10-19 13:07:24 +02:00
Dale Wijnand a41727fb17
Add, configure & enforce file headers 2017-10-05 09:03:40 +01:00
Eugene Yokota 0c1c380f71 begins language server protocol
This is the first cut for the Language Server Protocol on top of server that is still work in progress.

With this change, sbt is able to invoke `compile` task on saving files in VS Code.
2017-10-02 04:01:13 -04:00
Eugene Yokota 348a077797 implement tokenfile authentication 2017-09-21 23:05:48 -04:00
Eugene Yokota 87e95e3a51 bump lm to 1.0.2 2017-09-16 01:43:42 -04:00
Eugene Yokota 4bd7010a4f bump Zinc to 1.0.1
Fixes #2884
2017-09-16 00:38:22 -04:00
Eugene Yokota 01e8f609e8 lm 1.0.1 2017-09-10 14:13:51 -04:00
Eugene Yokota afd5ff03f8 WatchSource = sbt.internal.io.Source
Ref #3438
2017-08-28 00:56:27 -04:00
Eugene Yokota 0e77d9f8a2 Merge branch 'wip/npe' into wip/use_sbt1 2017-08-26 15:37:19 -04:00
Eugene Yokota 12be2e28a6 Use sbt 1.0.0 2017-08-26 14:40:58 -04:00
Eugene Yokota c74d397cd7 Bump Util for NPE fix attempt
Ref sbt/util#119
2017-08-26 01:39:51 -04:00
Dale Wijnand ec54269467 Merge pull request #3428 from SethTisue/be-2.13-friendly
be 2.13 friendly
2017-08-14 10:39:08 +01:00
Seth Tisue f5d51bf387 be 2.13 friendly
for the Scala 2.13 community build
2017-08-12 07:35:26 -07:00
Dale Wijnand 805b76f3d4
Add back, re-configure & re-enable Scalafmt 2017-08-10 16:35:23 +01:00
Eugene Yokota ffacc62b86 IO 1.0.0, Util 1.0.0, LM 1.0.0, Zinc 1.0.0 2017-08-09 23:56:59 -04:00
Dale Wijnand a495aa7cb0
Upgrade to sbt 1.0.0-RC3 2017-08-01 14:35:27 +01:00
Eugene Yokota 4d8d5f5df0 IO, Util, LM, Zinc 1.0.0-RC3 2017-07-28 15:45:59 -04:00
Eugene Yokota 0850df67e8 Contraband 0.3.0 2017-07-28 15:40:30 -04:00
Dale Wijnand 716203fefa Merge pull request #3383 from dwijnand/2123
Upgrade to Scala 2.12.3
2017-07-28 16:53:37 +01:00
Dale Wijnand 56d7d400b0
Upgrade to Scala 2.12.3 2017-07-28 07:56:08 +01:00
Eugene Yokota 5768ad2468 Log4j 2 SLF4J Binding
Fixes sbt/sbt#3333
2017-07-28 01:00:47 -04:00
Dale Wijnand c103950b10
Add, configure & enable MiMa 2017-07-26 14:14:04 +01:00
Eugene Yokota b2220fe9d4
sbt 1.0.0-RC2 2017-07-20 06:56:37 +01:00
Eugene Yokota 00a9dd14a4 Bump Contraband to latest 2017-07-17 01:05:30 -04:00
Eugene Yokota c9fae43595 bump to Util 1.0.0-M28 and Zinc 1.0.0-X20 2017-07-16 22:16:33 -04:00
Eugene Yokota f0ac6ae11c Adjust to upstream changes 2017-07-16 00:51:49 -04:00
Martin Duhem 347914191a Adapt to new library management API 2017-07-15 18:09:40 -04:00
Eugene Yokota 850832a31c Bump modules 2017-07-15 17:50:00 -04:00
Dale Wijnand 9494967e05
Upgrade util/lm/zinc & config build for util modules
Welcome back home!
2017-07-07 12:11:59 +01:00
Dale Wijnand f63306140e
Format the build 2017-07-07 09:48:48 +01:00
Dale Wijnand 58956d1c58
Drop util-apply-macro dep, given it was brought back 2017-07-07 09:48:42 +01:00
Eugene Yokota efa3b1d340
Bump to latest io, scalajson, sjsonnew, contraband, util, lm, zinc 2017-07-06 11:05:24 +01:00
Eugene Yokota 04f2a04fa4 sbt-scalafmt 1.3 2017-06-16 16:12:37 -04:00
Eugene Yokota bcc74a962e bump to using sbt 1.0.0-M6
We are missing the plugin for Scalafmt but I think we need to use beta2 ourselves.
2017-06-13 01:09:19 -04:00
Eugene Yokota d952dbb7ba Fix build to publish M6 2017-05-30 02:44:13 -04:00
Eugene Yokota 03c9b648fb Adjust to Zinc and lm changes 2017-05-30 00:59:43 -04:00
jvican 2b12721a68
Add fully-fledged macro check for value inside if
`.value` inside the if of a regular task is unsafe. The wrapping task
will always execute the value, no matter what the if predicate yields.

This commit adds the infrastructure to lint code for every sbt DSL
macro. It also adds example of neg tests that check that the DSL checks
are in place.

The sbt checks yield error for this specific case because we may want to
explore changing this behaviour in the future. The solutions to this are
straightforward and explained in the error message, that looks like
this:

```
EXPECTED: The evaluation of `fooNeg` happens always inside a regular task.

PROBLEM: `fooNeg` is inside the if expression of a regular task.
  Regular tasks always evaluate task inside the bodies of if expressions.

SOLUTION:
  1. If you only want to evaluate it when the if predicate is true, use a dynamic task.
  2. Otherwise, make the static evaluation explicit by evaluating `fooNeg` outside the if expression.
```

Aside from those solutions, this commit also adds a way to disable any
DSL check by using the new `sbt.unchecked` annotation. This annotation,
similar to `scala.annotation.unchecked` disables compiler output. In our
case, it will disable any task dsl check, making it silent.

Examples of positive checks have also been added.

There have been only two places in `Defaults.scala` where this check has
made compilation fail.

The first one is inside `allDependencies`. To ensure that we still have
static dependencies for `allDependencies`, I have hoisted up the value
invocation outside the if expression. We may want to explore adding a
dynamic task in the future, though. We are doing unnecessary work there.

The second one is inside `update` and is not important because it's not
exposed to the user. We use a `taskDyn`.
2017-05-25 15:33:00 +02:00
jvican b4299e7f34
Add check of task invocation inside `if`
This commit adds the first version of the checker that will tell users
if they are doing something wrong.

The first version warns any user that write `.value` inside an if
expression.

As the test integration is not yet working correctly and messages are
swallowed, we have to println to get info from the test.
2017-05-24 17:27:18 +02:00
jvican 2692bec21d
Reformat sbt source (minor changes) 2017-05-24 11:17:45 +02:00
jvican fd4bf0e635
Replace previous scalafmt plugin by neo-scalafmt
The previous scalafmt plugin had two problems:

* Caching with Coursier did not work correctly
* It failed after the upgrade to 1.0 in my computer (from a clean fork):

```
[error] (testingProj/compile:scalafmtInc) java.lang.NoClassDefFoundError: Could not initialize class scala.meta.package$
[error] (runProj/compile:scalafmtInc) java.lang.NoClassDefFoundError: Could not initialize class scala.meta.package$
[error] (taskProj/compile:scalafmtInc) java.lang.NoClassDefFoundError: Could not initialize class scala.meta.package$
[error] (stdTaskProj/compile:scalafmtInc) java.lang.NoClassDefFoundError: Could not initialize class scala.meta.package$
[error] (actionsProj/compile:scalafmtInc) java.lang.NoClassDefFoundError: Could not initialize class scala.meta.package$
[error] (protocolProj/compile:scalafmtInc) java.lang.NoClassDefFoundError: Could not initialize class scala.meta.package$
[error] (commandProj/compile:scalafmtInc) java.lang.NoClassDefFoundError: Could not initialize class scala.meta.package$
[error] (mainSettingsProj/compile:scalafmtInc) java.lang.NoClassDefFoundError: Could not initialize class scala.meta.package$
[error] (mainProj/compile:scalafmtInc) java.lang.NoClassDefFoundError: Could not initialize class scala.meta.package$
[error] (sbtProj/compile:scalafmtInc) java.lang.NoClassDefFoundError: Could not initialize class scala.meta.package$
[error] (scriptedPluginProj/compile:scalafmtInc) java.lang.NoClassDefFoundError: Could not initialize class scala.meta.package$
[error] (scriptedSbtProj/compile:scalafmtInc) java.lang.NoClassDefFoundError: Could not initialize class scala.meta.package$
[error] Total time: 19 s, completed May 24, 2017 10:44:56 AM
```

This commit replaces the previous scalafmt integration by the one
created by Lucidsoftware, big shoutout! (/cc @pauldraper)

https://github.com/lucidsoftware/neo-sbt-scalafmt
2017-05-24 11:15:22 +02:00
Eugene Yokota b013c30c30 Fix content log not showing up on `test`
Fixes #3198

Bump util to 1.0.0-M24. This fixes content log not showing up on `test`
2017-05-19 00:15:19 -04:00
Eugene Yokota 3724277704 migrate ForkOptions to Contraband 2017-05-12 05:22:08 -04:00
Dale Wijnand 0b33c195ef
Upgrade the build to sbt 1.0.0-M5
Some plugins remain commented out, for now.

sbt-doge is no longer needed because a variant of it has been folded
into sbt 1.

For some reason scripted requires src/doc jars of sbt, so switch back to
using `publishAll` rather than `publishLocalBinAll`. :(

Also, the sys.prop change in scripted is to force log4j2 to not use a
thread context classloader, and avoid the following:

    ERROR StatusLogger Unable to create custom ContextSelector. Falling back to default.
     java.lang.ClassCastException: Cannot cast org.apache.logging.log4j.core.async.AsyncLoggerContextSelector to org.apache.logging.log4j.core.selector.ContextSelector
    	at java.lang.Class.cast(Class.java:3369)
    	at org.apache.logging.log4j.util.LoaderUtil.newCheckedInstanceOf(LoaderUtil.java:201)
    	at org.apache.logging.log4j.util.LoaderUtil.newCheckedInstanceOfProperty(LoaderUtil.java:226)
    	at org.apache.logging.log4j.core.impl.Log4jContextFactory.createContextSelector(Log4jContextFactory.java:97)
    	at org.apache.logging.log4j.core.impl.Log4jContextFactory.<init>(Log4jContextFactory.java:58)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    	at java.lang.Class.newInstance(Class.java:442)
    	at org.apache.logging.log4j.LogManager.<clinit>(LogManager.java:94)
    	at org.apache.logging.log4j.spi.ThreadContextMapFactory.createThreadContextMap(ThreadContextMapFactory.java:73)
    	at org.apache.logging.log4j.ThreadContext.init(ThreadContext.java:223)
    	at org.apache.logging.log4j.ThreadContext.<clinit>(ThreadContext.java:202)
    	at org.apache.logging.log4j.core.impl.ContextDataInjectorFactory.createDefaultInjector(ContextDataInjectorFactory.java:83)
    	at org.apache.logging.log4j.core.impl.ContextDataInjectorFactory.createInjector(ContextDataInjectorFactory.java:67)
    	at org.apache.logging.log4j.core.lookup.ContextMapLookup.<init>(ContextMapLookup.java:34)
    	at org.apache.logging.log4j.core.lookup.Interpolator.<init>(Interpolator.java:117)
    	at org.apache.logging.log4j.core.config.AbstractConfiguration.<init>(AbstractConfiguration.java:125)
    	at org.apache.logging.log4j.core.config.DefaultConfiguration.<init>(DefaultConfiguration.java:46)
    	at org.apache.logging.log4j.core.layout.PatternLayout$Builder.build(PatternLayout.java:650)
    	at org.apache.logging.log4j.core.layout.PatternLayout.createDefaultLayout(PatternLayout.java:487)
    	at sbt.internal.util.ConsoleAppender.<init>(ConsoleAppender.scala:245)
    	at sbt.internal.util.ConsoleAppender$.apply(ConsoleAppender.scala:196)
    	at sbt.internal.util.ConsoleLogger.<init>(ConsoleAppender.scala:42)
    	at sbt.internal.util.ConsoleLogger$.apply(ConsoleAppender.scala:34)
    	at sbt.test.ScriptedRunner.run(ScriptedTests.scala:221)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at Scripted$.doScripted(Scripted.scala:125)
    	at $0483e89d182e9d240274$.$anonfun$scriptedTask$5(build.sbt:301)
2017-05-11 09:44:42 +01:00
jvican 70cf417525
Fix #3161: Don't fail if group is not present
This covers the case described in #1361 plus an esoteric case too.
Parsers are initialized when sbt starts and text completions use the
knowledge at that time. If we happen to move a new file that should
influence the behaviour of the tab completion, that file will not be
picked up. Before, since we were throwing an error, the previous case
that would no produce any tab completion would also fail, though the
files are legitimately in the correct place.
2017-05-10 21:40:02 +02:00
jvican f497e15cd8
Run scripted tests in parallel
Add binary-compatible methods to run scripted tests in parallel using
parallel collections. Parallel collections are not tuned and a default
of 4 cores is used for the `ForkJoinPool`. This can be a matter of
experimentation in the future but for now I prefer to stay with it.

The non-parallel methods are not affected by this change.

The changes to the scripted plugin have not been used, only the sbt
scripted plugin is using `runInParallel`. In the future, this change can
also happen so that plugin authors can benefit from parallel sbt
testing. This is not a priority for me now :)
2017-05-10 21:32:36 +02:00
Dale Wijnand 55e055fa39
Upgrade to sbt-ghpages 0.6.0 2017-05-08 15:02:32 +01:00
Dale Wijnand b65dc1830e
Upgrade to sbt-bintray 0.4.0 2017-05-08 15:02:31 +01:00
Dale Wijnand ad03595584
Upgrade to sbt-site 1.2.0 2017-05-08 15:02:31 +01:00
Dale Wijnand 3a7fc6d1e5
Upgrade to sbt-git 0.9.2 2017-05-08 14:34:30 +01:00
Dale Wijnand f9e0dc0a48
Upgrade to sbt-mima 0.1.14 2017-05-08 14:16:35 +01:00
Dale Wijnand 33f79a9fcd
Make sure addSbtModule will work in sbt 1
For some reason using ClasspathDependency doesn't work in sbt 1, while
ClasspathDep[ProjectReference] does. The latter is less specific and
works just as well.
2017-05-08 14:07:37 +01:00
jvican 818b8c85ae
Bump util to X11 and rename `SbtExclusionRule` 2017-05-03 12:42:16 +02:00
Eugene Yokota da046791e0 Apply Scalafmt formatting 2017-04-21 04:48:31 -04:00
Eugene Yokota 9d87e6b3d4 Add Scalafmt 2017-04-21 03:11:48 -04:00
Eugene Yokota 6a1b736c11 Scala 2.12.2
Fixes #3111
2017-04-18 10:41:43 -04:00
Eugene Yokota 9e02995ac0 Bump to Zinc 1.0.0-X14 2017-04-18 00:56:22 -04:00
Eugene Yokota debda67b3d Bump lm 1.0.0-X9 2017-04-15 16:53:38 -04:00
Eugene Yokota 81642138e1 Bump to ZInc 1.0.0-X12 2017-04-15 16:53:37 -04:00
Guillaume Martres 334517aba8 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-04-04 17:05:17 -04:00
Eugene Yokota 596dc62d7e util 1.0.0-M21 2017-04-04 02:39:33 -04:00
Eugene Yokota 622ebfd000 Switch to using util's JValueFormats 2017-04-03 03:41:45 -04:00
Eugene Yokota 093fc061cc Send testing events to logger 2017-04-01 17:19:45 -04:00
Dale Wijnand 0dcb57b587
Remove warnings in the build setup 2017-03-29 14:43:41 +01:00
Dale Wijnand 43eec230e6
Switch SettingQueryResponse to JValue, implement JValueFormat 2017-03-27 12:29:41 +01:00
Dale Wijnand ede2b865b4
Allow disablePlugins(SbtScalariform) to work
SbtScalariform is now an AutoPlugin, so its scalariformSettings are
already added to the project. So don't add it again otherwise
`disablePlugins(SbtScalariform)` won't work.

And miscellaneous cleanups.
2017-03-27 12:29:40 +01:00
Eugene Yokota 180bdfd129 Bump underlying modules to latest 2017-03-23 12:41:24 -04:00
xuwei-k 5b00e7326b s/newInstance/getDeclaredConstructor().newInstance()
java.lang.Class#newInstance deprecated since Java 9

http://download.java.net/java/jdk9/docs/api/java/lang/Class.html#newInstance--

```
Deprecated. This method propagates any exception thrown by the nullary constructor, including a checked exception. Use of this method effectively bypasses the compile-time exception checking that would otherwise be performed by the compiler. The Constructor.newInstance method avoids this problem by wrapping any exception thrown by the constructor in a (checked) InvocationTargetException.
The call

 clazz.newInstance()

can be replaced by

 clazz.getDeclaredConstructor().newInstance()

The latter sequence of calls is inferred to be able to throw the additional exception types InvocationTargetException and NoSuchMethodException. Both of these exception types are subclasses of ReflectiveOperationException.
Creates a new instance of the class represented by this Class object. The class is instantiated as if by a new expression with an empty argument list. The class is initialized if it has not already been initialized.
```
2017-03-15 11:53:49 +09:00
Eugene Yokota 4447b7a1af Fix xml and parser-combinator versions 2017-01-16 11:44:03 -05:00
Eugene Yokota d91df1f189 Adjust to 1.0.x 2017-01-16 08:44:13 -05:00
Eugene Yokota 1b79cb85b6 Safer template resolver
Fixes #2761

With sbt 0.13.13-RC1 rediscovered that the dependency pulled in from
Giter8 was affecting the plugins. To avoid this, this change splits up
the template resolver implementation to another module called
sbt-giter8-resolver, and it will be downloaded using Ivy into
`~/.sbt/0.13/templates/`, and then launched reflectively using Java as
the interface.
2017-01-16 08:44:13 -05:00
Eugene Yokota 73a427c0b8 Adds templateResolvers and `new` command
This adds `new` command, which helps create a new build definition. The
`new` command is extensible via a mechanism called the template
resolver,
which evaluates the arbitrary arguments passed to the command to find
and run a template.

As a reference implementation [Giter8][g8] is provided as follows:

    sbt new eed3si9n/hello.g8

This will run eed3si9n/hello.g8 using Giter8.

  [g8]: http://www.foundweekends.org/giter8/
2017-01-16 08:43:23 -05:00
Eugene Yokota 7ddbd69e53 Use Scala 2.12.1
Bump up the Scala version used by sbt to 2.12.1.
Most changes are migration of the integration tests.
2017-01-15 20:49:14 -05:00
Eugene Yokota b34e182d21 Bump util, lm, and zinc 2017-01-14 00:57:46 -05:00