Commit Graph

4750 Commits

Author SHA1 Message Date
Haochi Chen f2ff94f0f3 Backport #2941 to 0.13.x 2017-02-23 02:24:22 -03:00
eugene yokota b6466624a8 Merge pull request #2943 from eed3si9n/backport/generators
[sbt 0.13] Support sourceGenerators += Def.task { ... }
2017-02-07 12:26:54 -05:00
eugene yokota 18f0e56e9d Merge pull request #2952 from dwijnand/notes
Touch up and add missing notes for 0.13.14
2017-02-06 16:55:50 -05:00
Dale Wijnand 9e67e0afba
Add notes for .triggeredBy/.storeAs/etc fix 2017-02-06 10:24:15 +00:00
Dale Wijnand c50f7b5c6b
Add notes for preliminary compatbility with jdk 9 2017-02-06 10:24:12 +00:00
Dale Wijnand 3ff04f987c
Touch up exisiting 0.13.14 notes 2017-02-06 10:24:10 +00:00
Dale Wijnand 756151f555 Merge pull request #2951 from retronym/topic/java9
Preliminary compatibility with JDK 9
2017-02-05 14:56:21 +00:00
Jason Zaugg 265285e892 Future proof for java.xml.bind removal from Java 9 default classpath
JEP-201 describes the new modularized Java Standard Library in Java 9.
By default, java.xml.bind is no longer on the default classpath; it needs
to be added explicitly with a JVM option `--add-modules java.xml.bind`,
or with a dependency declaration in the module-info.java file if you
package your own code up as a Jigsaw module.

This commit traps the linkage error and (reflectively) uses the
java.util.Base64, which is the recommended way to encode/decode
since 1.8.
2017-02-04 22:23:02 -07:00
Jason Zaugg 3ad3f87212 Future proof against removal of java.ext.dirs in Java 9
This is the start of an effort to make SBT 0.13.x compatible
with JDK 9.

The system property java.ext.dirs no longer exists now that
JEP-220 has removed the extension and endorsed classpath
facilities. It is also forbidden to manually set this to
an empty string from the command line.

This commit treats the absense of this property as an
empty extension classpath.
2017-02-04 22:14:51 -07:00
Eugene Yokota 70a2878dbc Adds an Append instance that extracts taskValue
This adds a macro-level hack to support += op for sourceGenerators and resourceGenerators using RHS of Initialize[Task[Seq[File]]].
When the types match up, the macro now calls `.taskValue` automatically.
2017-01-22 23:44:48 -05:00
eugene yokota 33e7cbc907 Merge pull request #2908 from dwijnand/fix-triggeredBy
Fix triggeredBy/storeAs/etc using :=. Fixes #1444
2017-01-13 13:57:38 -05:00
Dale Wijnand 486c3c3167
Work-around actions/depends-on failure 2017-01-13 14:27:31 +00:00
Dale Wijnand c6d3bbacfa
Migrate actions/depends-on to fix it
Seems following the deprecation warning info and the website
documentation and avoiding the BuildCommon inputTask method avoids
whatever problem was causing it to fail... Strange.. but ok?
2017-01-13 14:26:54 +00:00
Dale Wijnand 011d0e8489
Remove some code duplication between TaskInstance and MultiInTask 2017-01-13 14:26:54 +00:00
Dale Wijnand 936dda6297
Copy all attributes for all methods in SingleInTask
For when := is used over <<= for 'triggeredBy', 'runBefore', etc..
2017-01-13 14:26:54 +00:00
Dale Wijnand 2404d609ce
Fix runBefore with := 2017-01-13 14:26:53 +00:00
Dale Wijnand 9bad462f7a
Fix triggeredBy with :=
Fixes #1444
2017-01-13 14:26:53 +00:00
eugene yokota e851cfc893 Merge pull request #2902 from smarter/auto-dotty-bridge
Automatically choose proper compiler bridge for dotty
2017-01-11 17:51:38 -05:00
eugene yokota 55efa89ca3 Merge pull request #2903 from smarter/fix/dotty-nightlies
Fix support for published dotty nightly builds
2017-01-11 11:01:27 -05:00
Guillaume Martres 3c6db1ce5d Automatically choose proper compiler bridge for dotty
Before this commit, using dotty in your sbt project required to add:
  scalaCompilerBridgeSource := ("ch.epfl.lamp" % "dotty-sbt-bridge" %
    scalaVersion.value % "component").sources()
in your build.sbt. We might as well automatically do this, this reduces
the boilerplate for using dotty in your project to:
  scalaOrganization := "ch.epfl.lamp"
  scalaVersion := "0.1.1-SNAPSHOT"
  scalaBinaryVersion := "2.11" // dotty itself is only published as a
                               // 2.11 artefact currently
2017-01-11 16:06:45 +01:00
Guillaume Martres 709cfc96f9 Fix support for published dotty nightly builds
Dotty nightly builds are published to maven, so they end up in
configuration "default", not "compile". We still need to look into
"compile" when dotty is published locally.

You can test this using https://github.com/smarter/dotty-example-project
by updating the sbt version used in project/build.properties and by
replacing "0.1.1-SNAPSHOT" by a nightly version like
"0.1.1-20170109-be64643-NIGHTLY" in build.sbt
2017-01-10 21:40:49 +01:00
Dale Wijnand 10b71ef1c4 Merge pull request #2897 from smarter/fix/scala-bootstrap
OverrideScalaMediator: fix bootstrapping a Scala compiler
2017-01-09 13:36:08 +00:00
Guillaume Martres 47148f3fde snapshot-resolution: add a sleep to ensure timestamp change
This test suddenly started failing for no reason at line 25, adding this
sleep seems to have fixed that. Every other publish was preceded by a
sleep in this test, so this makes some sense.
2017-01-09 03:52:00 +01:00
Guillaume Martres c76832fbc7 Avoid NullPointerException in sbt.ScalaOverrideTest 2017-01-09 01:15:08 +01:00
Guillaume Martres 89d5e96ed0 Add testcase for scala bootstrap
Before the previous commit, this failed with:
[error] (*:update) java.lang.IllegalArgumentException: a module is not
authorized to depend on itself: org.foo#scala-library;2.99.0
2017-01-08 23:03:18 +01:00
Guillaume Martres 0d0476eaa9 OverrideScalaMediator: fix bootstrapping a Scala compiler
Fixes #2867, #2896
2017-01-08 22:08:25 +01:00
eugene yokota c223dccb54 Merge pull request #2854 from ashleymercer/0.13-junit-skipped
JUnitXmlTestsListener now correctly flags ignored, skipped and pending tests
2016-11-30 18:03:04 -05:00
eugene yokota 5141a4524a Merge pull request #2855 from eed3si9n/wip/buildkey_fix
Add build-level keys to the tab completion
2016-11-30 14:00:51 -05:00
Eugene Yokota 00bab7b743 Add build-level keys to the tab completion
Fixes #2460
Fixes #2851
Ref #2707, #2708, #2469

Unlike the previous attempts at fixing the handling of build-level
keys, this change does not change the main parsing logic, which uses
`getKey` to retrieve the key from the key map.
The fact that shell worked pre-0.13.11 means that the parsing was ok.

What this changes is just the "example" keys supplied to the parser so
the tab completion works.
2016-11-30 02:33:05 -05:00
Ashley Mercer 26bc85cb67 JUnitXmlTestsListener now correctly flags ignored, skipped and pending tests
Fixes #2198 Ref #PULL

Generated Junit-style XML reports now include a count of ignored,
skipped and pending tests; and individual tests are correctly flagged
with the <skipped/> element.
2016-11-29 23:08:51 +00:00
Eugene Yokota 49809056fc Revert "Completion for build-level keys"
This reverts commit e35f9bb11e.
2016-11-29 05:59:33 -05:00
Eugene Yokota 612d9555d0 Revert "Unspecified project axis means current project or its build"
This reverts commit 4fea604759.
2016-11-29 05:59:18 -05:00
Eugene Yokota 33330c9d62 Revert "Address problems reported by Codacy"
This reverts commit 1bda41fc31.
2016-11-29 05:59:06 -05:00
Eugene Yokota 3e653f73b3 Revert "Fix key selection for build level keys"
This reverts commit 60bcc58852.
2016-11-29 05:57:43 -05:00
Paul Draper da1bdba0f8 Improve performance for DefaultParsers.validID(String)
KeyIndex can call this method hundreds of thousands of times, so this
change makes a significant difference in loading time.
2016-11-18 22:03:47 +00:00
eugene yokota a58b184195 Merge pull request #2828 from eed3si9n/wip/thedude
Apply binary version conflict check to Compile related configs
2016-11-11 20:11:25 -05:00
eugene yokota 85f9189d60 Merge pull request #2827 from eed3si9n/wip/mediator_fix
Apply scalaVersion enforcement to Compile related configs
2016-11-11 20:11:12 -05:00
Eugene Yokota 7d6c56e391 Apply binary version conflict check to Compile related configs
Fixes #1466 Ref #2786

Even after fixing the mediator issue, we still have spurious binary
version conflict warning that does not account for sandbox
configurations.

This change follows the scalaVersionConfigs work.
2016-11-11 15:44:05 -05:00
Eugene Yokota 07e2a9a799 Bump up Ivy
Fixes #2015
2016-11-11 14:42:48 -05:00
Eugene Yokota 8d0e4d2ef0 Apply scalaVersion enforcement to Compile related configs
Fixes #2786. Ref #2634.

sbt 0.13.12 added Ivy mediator that enforces scalaOrganization and
scalaVersion for Scala toolchain artifacts.
This turns out to be a bit too aggressive because Ivy configurations
can be used as an independent dependency graph that does not rely on
the scalaVersion used by Compile configuration. By enforcing
scalaVersion in those graph causes runtime failure.

This change checks if the configuration extends Default, Compile,
Provided, or Optional before enforcing scalaVersion.
2016-11-11 05:15:58 -05:00
eugene yokota 55e2b56af9 Merge pull request #2826 from vpetro/bump-giter8resolver-version
Use sbt-giter8-resolver 0.1.2
2016-11-09 11:39:18 -05:00
Petro Verkhogliad 08951436f0
Use sbt-giter8-resolver 0.1.2 2016-11-08 15:31:29 -05:00
Petro Verkhogliad 29a524e18d
Use sbt-giter8-resolver 0.1.1 2016-11-06 17:25:56 -05:00
Dale Wijnand 109cb4a762
Set version to 0.13.14-SNAPSHOT 2016-10-28 13:20:40 +01:00
Dale Wijnand 9d3bda71ea
Merge branch '0.13.13' into 0.13
* 0.13.13:
  Set version in launchconfig to 0.13.13 (automatic)
  Temporarily disable control/io for Scala 2.12
  Set version to 0.13.13
2016-10-28 13:20:05 +01:00
Dale Wijnand 673e89d087
Set version in launchconfig to 0.13.13 (automatic) 2016-10-28 13:15:32 +01:00
Dale Wijnand 1af8aab2d2
Temporarily disable control/io for Scala 2.12 2016-10-28 12:51:03 +01:00
Dale Wijnand 6dcba49934
Set version to 0.13.13 2016-10-28 12:02:36 +01:00
eugene yokota bbc70632d0 Merge pull request #2767 from avdv/fix-2766-sourceFile-null
Fix #2766 sourceFile null causes NPE
2016-10-25 13:40:48 -04:00
Eugene Yokota 462ee042ad Cross publishing to 2.12 2016-10-25 13:37:48 -04:00