Commit Graph

148 Commits

Author SHA1 Message Date
Eugene Yokota 9d40404915 JSON port file
This implements JSON-based port file. Thoughout the lifetime of the sbt server there will be `cwd / "project" / "target" / "active.json"`, which contains `url` field.

Using this `url` the potential client, such as IDEs can find out which port number to hit.

Ref #3508
2017-09-17 19:19:56 -04:00
Eugene Yokota 182b8296da 1.0.3-SNAPSHOT 2017-09-16 15:52:58 -04:00
Dale Wijnand 498ef3652b
Set version to 1.0.2-SNAPSHOT 2017-09-11 14:45:14 +01:00
Eugene Yokota afd5ff03f8 WatchSource = sbt.internal.io.Source
Ref #3438
2017-08-28 00:56:27 -04:00
Eugene Yokota 12be2e28a6 Use sbt 1.0.0 2017-08-26 14:40:58 -04:00
Dale Wijnand 4f0d2f9ffd
Scalafmt 1.2.0 2017-08-14 15:47:52 +01:00
eugene yokota 51570a3771 Merge pull request #3418 from dwijnand/scalafmt
Add back, re-configure & re-enable Scalafmt
2017-08-13 20:29:46 -04:00
Dale Wijnand 805b76f3d4
Add back, re-configure & re-enable Scalafmt 2017-08-10 16:35:23 +01:00
Eugene Yokota a100b47fcc 1.0.1-SNAPSHOT 2017-08-10 01:27:24 -04:00
Dale Wijnand deae720bf1
Bump mimaPreviousArtifacts to 1.0.0-RC3 2017-07-31 11:50:27 +01:00
Eugene Yokota d1a950868f Use LM API for cached update task
Fixes sbt/sbt#3326
2017-07-28 17:55:49 -04: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 7b2b7d696b Don't wrap InputStream for Windows
Ref #3282

We used to wrap InputStream so it will inject Thread.sleep, which then allows the thread to be cancelled, emulating a non-blocking readLine. This trick doesn't seem to work for Windows.
For non-Cygwin, actually just removing the wrapping does the job, but I couldn't get it to work for Cygwin.

To test, run some command via network, and then type `show name` into the terminal. On Cygwin, it will not respond.
2017-07-22 03:34:10 -04:00
Eugene Yokota b2220fe9d4
sbt 1.0.0-RC2 2017-07-20 06:56:37 +01:00
Martin Duhem 347914191a Adapt to new library management API 2017-07-15 18:09:40 -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
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 d952dbb7ba Fix build to publish M6 2017-05-30 02:44:13 -04:00
Eugene Yokota 06c5ef4208 fix build 2017-05-26 00:59:49 -04:00
jvican 5b7180cfa7
Reorganize test structure for `mainSettings` 2017-05-24 11:27:04 +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
jvican e846f72ff3
Tell neg test suite the classpath via sbt 2017-05-24 10:27:51 +02:00
jvican 10c737ae20
Move to `core-macros` and depend on it 2017-05-24 00:16:26 +02:00
jvican d2f019a47a
Reformat all util-appmacro 2017-05-24 00:16:23 +02:00
jvican ed38fcd695
Move `util-appmacro` to sbt as `core-macros`
This commit moves everything behind the old util-appmacro over to
sbt/sbt.

appmacro has been renamed as core-macros. It is indeed the project
that defines the main logic to manipulate macros, and defines interfaces
that are then implemented by main-settings. Because of this strong
relationship between these two modules, I find that they have to stay
together and be able to be modified in one commit. I've realised this
while hacking on the macro changes for the usability of sbt.

The reason for this change is because the logic of this module is really
tight to the implementation of sbt and, I would even say, essentially
define the sbt DSL.
2017-05-24 00:16:21 +02:00
eugene yokota d3ff3fb63a migrate PluginTrigger and ProjectOrigin to Contraband (#3191)
and move TestFramework to a non case class.
2017-05-13 13:01:51 +01: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 272afa9d73
Try another travis structure + build tweaks
I've tried to put together some scripted tests to remove the overhead of
compiling the whole sbt, which is around 3 minutes every time.

This new structure *should* make the scripted tests run faster.

Aside from this, we do some more tweaks:

* Increase memory.
* Fork processes to compile and run (to see if it makes a difference).
* Pass in the server flag to sbt.
2017-05-10 21:40:23 +02:00
jvican 6813eb47af
Up memory for every scripted instance 2017-05-10 21:40:23 +02:00
jvican 628517e60c
Try travis with 3 cores and 725M per instance 2017-05-10 21:40:21 +02:00
jvican 6191f35f1c
Fix java options for scripted
* Remove MaxPermSize from another scripted opts
* Reduce memory of sbt host to 1g instead of 2g
* Add Xms java options to scripted
* Enable parallelism with 512M for sbt tests
* Parallelism + batch mode
2017-05-10 21:40:03 +02:00
jvican e69436adde
Remove `MaxPermSize` since sbt depends on JDK8
FTR:

```
[error] OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
```
2017-05-10 21:40:01 +02:00
jvican 5ca2e3c87e
Reduce memory of scripted tests + extra
* Remove oversight in error message
* Up the memory limit per scripted instance
2017-05-10 21:39:45 +02:00
Dale Wijnand 55e055fa39
Upgrade to sbt-ghpages 0.6.0 2017-05-08 15:02:32 +01:00
Dale Wijnand ad03595584
Upgrade to sbt-site 1.2.0 2017-05-08 15:02:31 +01:00
Dale Wijnand f9e0dc0a48
Upgrade to sbt-mima 0.1.14 2017-05-08 14:16:35 +01:00
Dale Wijnand d5a10923f8
Drop myProvided from the build
Introduces by Mark in d928047678.

Dropped because Project#copy no longer exists (publically) in sbt 1.

It looks like it might have been added to deal with transitive
dependencies of scala-compiler, possibly JLine. Now it looks like it's
only used by launcher-interface, which has 0 dependencies.
2017-05-08 14:08:40 +01:00
Eugene Yokota da046791e0 Apply Scalafmt formatting 2017-04-21 04:48:31 -04:00
Eugene Yokota 306db4d788 Check for git diff at Travis CI 2017-04-21 03:11:48 -04:00
Eugene Yokota 9d87e6b3d4 Add Scalafmt 2017-04-21 03:11:48 -04:00
jvican fe23df1e52
Fix #3062: Reduce red squiggles in Intellij
This commit fixes most of the red squiggles created by the lack of
analysis of Contraband-generated Scala files. It does not end with all
the red squiggles but it substantially decreases the amount of them.
2017-04-19 07:53:40 +02:00
Dale Wijnand fa487ac8ea
Upgrade from -Ymacro-no-expand to -Ymacro-expand:none 2017-04-13 11:47:59 +01:00
Eugene Yokota 093fc061cc Send testing events to logger 2017-04-01 17:19:45 -04:00
Dale Wijnand 43eec230e6
Switch SettingQueryResponse to JValue, implement JValueFormat 2017-03-27 12:29:41 +01:00
Dale Wijnand b59258c50d
Fix build warnings 2017-03-02 14:44:01 +01:00
Eugene Yokota 958ba4dec8 sbt 1.0 nightly 2017-01-16 11:43:37 -05:00