Commit Graph

3532 Commits

Author SHA1 Message Date
Grzegorz Kossakowski 74fb8b4e3c Merge pull request #1202 from Duhemm/inherited-macros
Disable macro heuristic for inherited macros (sbt/sbt#1142)
2014-04-03 19:57:58 +02:00
Martin Duhem 5a40641cc1 Classes that only inherit a macro don't have a macro
Prior to this commit, a class that inherited a macro from another
class was considered by incremental compiler as having a macro.
Now, only classes that explicitly define a macro are considered as having
a macro. This influences decision whether to invalidate (recompile)
dependencies of a file that inherits a macro upon a whitespace change.
From now on, we don't invalidate dependencies in such case which
results in much better incremental compiler experience when macros are
being involved. Check #1142 for detailed discussion.

The change to the behavior is reflected by marking the
source-dependencies/inherited-macros test as passing.
The source-dependencies/macro test covers the case of defining the macro
directly in source file. Therefore we know that the desired behavior of
invalidating dependencies of macros is preserved.

Fixes #1142
2014-04-03 18:27:17 +02:00
Martin Duhem b5b07348f0 Add a pending test for sbt/sbt#1142
Add a scripted test documents the current behavior of incremental
compiler when it comes to handling of inherited macros. A whitespace
change to a file that inherits a macro triggers recompilation of all files that
depend (by composition or inheritance) on that file.
2014-04-03 18:27:03 +02:00
Josh Suereth d34ca37c40 Bump ivy version to include exclusion performance fix. 2014-03-31 16:02:39 -04:00
Eugene Yokota 02ad34442f back to 0.13.5-SNAPSHOT 2014-03-29 13:41:28 -04:00
Josh Suereth 6e72324b88 Bump to our own nightly of ivy 2.4.0 (RC1+).
* Testing the infrastructure to use our own instance of ivy
* Allow us to push bug-fixes/performance directly into ivy
  on our own pace, as we submit patches back to ivy master
2014-03-29 13:06:27 -04:00
Eugene Yokota a4a6aa0bc3 0.13.5-M2 2014-03-27 23:28:53 -04:00
Eugene Yokota 5f7e68c7dd Auto plugin names are imported with or without autoImport. Fixes #1217 2014-03-27 17:36:40 -04:00
eugene yokota 9dde1ac46e Merge pull request #1215 from eed3si9n/topic/renameaddsettings
Deprecate autoSettings, Rename ProjectSettings => BuildScalaFiles
2014-03-26 14:36:46 -04:00
Eugene Yokota f6d1044c4b 0.13.5-SNAPSHOT 2014-03-26 14:34:25 -04:00
Eugene Yokota 4f969491d0 Deprecate autoSettings, Rename ProjectSettings => BuildScalaFiles
* autoSettings is renamed to settingSets. Since this was part of 0.13.0
we need to deprecate it first.
2014-03-26 11:35:50 -04:00
Josh Suereth 121800ca7e Merge pull request #1211 from eed3si9n/topic/renamemodule
Rename GlobalModule -> CorePlugin
2014-03-26 11:20:40 -04:00
Josh Suereth 0e3bd91f38 Merge pull request #1212 from ijuma/feature/scala-2.10.4
Bump Scala version to 2.10.4.
2014-03-25 22:42:03 -04:00
Ismael Juma 607e061a6a Bump Scala version to 2.10.4. 2014-03-25 22:08:04 +00:00
Eugene Yokota 1debc48568 Rename GlobalModule -> CorePlugin 2014-03-25 15:49:07 -04:00
Eugene Yokota 66ada09f06 0.13.5-M1 2014-03-25 01:49:33 -04:00
Eugene Yokota 3f2f12f5bb Fix PluginsTest 2014-03-25 01:49:08 -04:00
Eugene Yokota 575e657962 Default AutoPlugin to an empty root plugin 2014-03-25 00:20:11 -04:00
eugene yokota e4221d1e27 Merge pull request #1204 from eed3si9n/topic/valAutoImport
Unifies AutoPlugin and AutoImport. Fixes #1188
2014-03-24 23:17:04 -04:00
Eugene Yokota ff77d0b0f2 Remove def autoImport: Any from AutoPlugin. 2014-03-24 23:04:22 -04:00
Eugene Yokota cc80d216ab Adjusting to 0.13 changes 2014-03-24 20:03:01 -04:00
Eugene Yokota 2c654b2d90 Unifies AutoPlugin and AutoImport. Fixes #1188
* AutoImport trait is subsumed by def autoImport method under
AutoPlugin class.
* When def autoImport is overridden by a lazy val or a val, *.sbt
automatically imports autoImport._.
2014-03-24 19:10:35 -04:00
eugene yokota 4315049337 Merge pull request #1203 from eed3si9n/topic/requiredAutoPlugin
Unifies AutoPlugin and RootPlugin
2014-03-24 19:02:00 -04:00
Eugene Yokota d697c10950 Hide unary_! operator from API 2014-03-24 18:59:14 -04:00
Josh Suereth d03e2380b2 Merge pull request #1197 from sandreev/t_1196_empty_tests
fixes #1196
2014-03-24 16:19:11 -04:00
Josh Suereth 7a65ceca31 Merge pull request #1205 from eed3si9n/topic/pomparser
CustomPomParser compatibility with 0.13.1. #1191 #1192
2014-03-24 13:06:04 -04:00
Eugene Yokota 5b1c33dd6e Added conflict report and unit tests 2014-03-22 02:47:11 -04:00
Eugene Yokota f43daecee3 Use tabs 2014-03-22 02:46:17 -04:00
Eugene Yokota f58fbb8d7d CustomPomParser compatibility with 0.13.1. #1191 #1192 2014-03-21 23:53:06 -04:00
Eugene Yokota d692191c24 More plugins conflict test 2014-03-21 22:45:32 -04:00
eugene yokota def8fdc439 Merge pull request #1192 from dansanduleac/i1191
Rename sbtTransformHash -> e:sbtTransformHash
2014-03-21 18:09:01 -04:00
Eugene Yokota 49faf8a752 Removes Changes entry on AutoPlugin and AddSettings 2014-03-21 18:05:15 -04:00
eugene yokota 9533887797 Merge pull request #1163 from Duhemm/macro-arg-deps
Record dependencies on macro arguments
2014-03-21 17:58:06 -04:00
Eugene Yokota 7f8d4ba8bf Merging AutoPlugin work from "0.13.2" branch 2014-03-21 13:58:08 -04:00
Eugene Yokota e95935a7db Adds conflict check at the end to enforce exclusion requirements. 2014-03-21 01:06:00 -04:00
Eugene Yokota c7dc499fe4 Updated comments. Typo fix per @jozic 2014-03-20 21:47:49 -04:00
Sergey Andreev 910d39f3a9 fixes #1196 2014-03-20 17:46:42 -07:00
Martin Duhem 04e226bd59 Add scripted test for nested macros
Add test analogous to source-dependencies/macro-arg-dep
but check if dependencies of nested macro applications are handled
properly. Nested macro applications are tricky because we have to look
into original (before macro expansion) trees recursively. This test verifies
that.
2014-03-20 19:26:22 +01:00
Martin Duhem 133ba07eb8 Unit test for dependency extraction from macro applications
Add a unit test which checks whether we capture dependencies introduced
by arguments to macros. Those dependencies are special because macros
get expanded during type checking and arguments to macros are not visible
during regular tree walk.
2014-03-20 19:13:20 +01:00
Eugene Yokota f8bedf4012 Unifies AutoPlugin and RootPlugin
* Separates def select into def trigger and def requires.
* Setting trigger = noTrigger and requires = empty makes a plugin a
root.
2014-03-20 07:08:33 -04:00
Martin Duhem b21e475364 Improve unit testing compiler
It was not possible to make `ScalaCompilerForUnitTesting` compile several
files in different runs, which means that it was not possible to compile
and use a macro in a test case, since macros cannot be used in the same
compilation run that defines them.

This commit allows a test case to provide multiple grouped snippets of
code that will be compiled in separate runs.

For instance :
    List(Map(<snippet A>, <snippet B>), Map(<snippet C>))

Here, <snippet A> and <snippet B> will be compiled together, and then
<snippet C> will be compiled, and will be able to use symbols defined
in <snippet A> or <snippet B>.
2014-03-19 22:21:29 +01:00
Martin Duhem 70fecfe767 Record dependencies on macro arguments
Macros take arguments as trees and return some other trees; both of
them have dependencies but we see trees only after expansion and
recorded only those dependencies.

This commit solves this problem by looking into the attachments of the
trees that are supposed to contain originals of macro expansions and
recording dependencies of the macro before its expansion.
2014-03-19 22:14:58 +01:00
Grzegorz Kossakowski 2a98355c64 Test for missing dependencies of macro arguments
Add a test which shows the problem of not properly capturing dependencies
of macro arguments.
2014-03-19 22:14:58 +01:00
Dan Sanduleac 6588ac1b62 sbtTransformHash -> e:sbtTransformHash 2014-03-19 11:08:17 +00:00
Josh Suereth fd860e0d3a Merge pull request #1189 from jroper/project-add-plugins
Allow end users to add Plugins, not just AutoPlugins
2014-03-19 00:12:00 -04:00
James Roper 9f20f04e16 Allow end users to add Plugins, not just AutoPlugins
This allows plugins to define a Plugins instance that captures both the
plugin and its required dependencies.

Also fixed up some scaladocs that were wrong.
2014-03-18 19:49:38 +11:00
Havoc Pennington a006235644 Merge pull request #1177 from sbt/wip/issue-1176
When fragmenting Defaults, we mixed back settings in the wrong order.
2014-03-12 09:13:58 -04:00
Josh Suereth 7c15eb01f3 When fragmenting Defaults, we mixed back settings in the wrong order.
* packageArtifacts is not cleared by defautlSettings
* Added a test for this behavior (this one test should ensure the ordering for most settings is correct.)

Fixes #1176
2014-03-12 08:50:37 -04:00
Havoc Pennington ad0ca70757 Merge pull request #1174 from sbt/wip/release-notes-0.13.2
Add changes documentation for 0.13.1->0.13.2
2014-03-11 13:44:18 -04:00
Josh Suereth fbffdb6551 Add changes documentation for 0.13.1->0.13.2 2014-03-11 13:20:38 -04:00