Commit Graph

123 Commits

Author SHA1 Message Date
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
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 272e733b87 Update to Contraband 2017-01-06 11:27:06 -05:00
Dale Wijnand 7fcfec8b8e
-sbinary/+sjson-new, -datatype/+contraband & upgrades
* start to replace sbinary with sjson-new
* upgrade from sbt/datatype to sbt/contraband
* upgrade and migrate to new sbt modules APIs
2017-01-05 21:59:00 +00:00
Dale Wijnand b917011082
Add props to define source dependencies on io/util/lm/zinc
Use either:

* -Dsbtio.path / -Dsbtutil.path / -Dsbtlm.path / -Dsbtzinc.path on the
  command line, or

* -Dsbtio.path= / sbtutil.path= / sbtlm.path / -Dsbtzinc.path in
  project/local.properties
2016-12-11 12:08:28 +00:00
Dale Wijnand cb2e17a347
Cleanup Dependencies 2016-12-11 12:08:28 +00:00
Eugene Yokota 18233ace05 Using sbt-datatype + sjson-new for JSON serialization 2016-10-27 09:27:41 -04:00
Eugene Yokota e7456b5653 Use the new FullReader 2016-10-27 09:20:06 -04:00
Eugene Yokota f9dd8b73b7 Refactor to abstract listening for command line 2016-10-27 02:42:12 -04:00
Eugene Yokota 649dc0ce3c This is where we can multiplex commands 2016-10-27 02:42:12 -04:00
Johan Andrén 9557107c97 First sloppy stab at an embedded server in sbt 2016-10-27 02:42:12 -04:00
cunei ca53c68b87 Fix to bintray repo 2016-10-07 13:37:25 -05:00
Antonio Cunei 1124a88a50 See sbt #1696 2016-09-26 22:45:24 +02:00
Dale Wijnand 472d28964a Configure scripted to do less
Particularly doesn't compile, package and publish source and doc jars.
2016-09-01 01:14:14 +01:00
Eugene Yokota 5f9e6e4aad Don't use test artifacts from other projects
Fixes #2597
2016-05-12 12:45:09 -04:00
Eugene Yokota d8e763438c Fix POM 2016-05-08 22:26:55 -04:00
Eugene Yokota 426f43f618 Fix bintrayRepository 2016-05-08 15:29:28 -04:00
Eugene Yokota d150825e18 Set crossScalaVersions for sbt 2016-05-08 15:01:00 -04:00
Eugene Yokota a322684cb7 Remove comment per review 2016-05-07 20:31:28 -04:00
Eugene Yokota ee272d780e Reorganize directory structure 2016-05-06 16:01:49 -04:00
eugene yokota 6a9ced8eb6 Merge pull request #2589 from eed3si9n/wip/bumptozinc
[sbt 1.0] Bumping up to Zinc 1.0.0-M1
2016-05-06 05:40:58 -04:00
Eugene Yokota fd7c162ea8 Bumping up dependencies 2016-05-05 14:38:24 -04:00
Martin Duhem c70c9989e5 Upgrade to latest zinc 2016-05-04 16:44:31 +02:00