Commit Graph

3147 Commits

Author SHA1 Message Date
Josh Suereth dff52ce11e Removing deprecated "re-publish release artifacts" behavior from tests.
In sbt 1.0 republishing released artifacts will be removed, causing these tests
to fail.  We migrate to SNAPSHOT version now, to prevent suprises.
2014-03-08 09:30:23 -05:00
Josh Suereth a4b288f35b Revert "Fix task macro's handling of Symbol owners in <qual>.value"
This reverts commit 3017bfcd07.

This was causing sbt to be unable to compile.  Reverting temporarily until
we have a shot at a full fix.
2014-03-07 22:25:29 -05:00
Josh Suereth f06948a4af Merge pull request #1145 from sbt/wip/issue-1136
Fix #1136 - Ivy's + dependency ranges not converted appropriately to maven.
2014-03-07 17:22:29 -05:00
Josh Suereth 4237ea5342 Merge pull request #1157 from retronym/ticket/1150
Fix task macro's handling of Symbol owners in <qual>.value
2014-03-07 12:02:04 -05:00
Jason Zaugg 3017bfcd07 Fix task macro's handling of Symbol owners in <qual>.value
The qualifier of the `.value` call may contain `DefTree`s (e.g.
vals, defs) or `Function` trees. When we snip them out of the
tree and graft them into a new context, we must also call
`changeOwner`, so that the symbol owner structure and the tree
structure are coherent.

Failure to do so resulted in a crash in the compiler backend.

Fixes #1150
2014-03-07 17:53:14 +01:00
Havoc Pennington ea878eeaf9 Merge pull request #1154 from sbt/wip/merge-0.13.1-to-0.13
Merge doc fixes from 0.13.1 into 0.13 branch.
2014-03-07 10:35:35 -05:00
Josh Suereth 34d8168f75 Merge pull request #1147 from sbt/wip/issue-429
Fixes #429 - Add better error messages when credentials are not found.
2014-03-06 10:52:12 -05:00
Josh Suereth 0a8d844071 Fix merge conflicts in pulling doc fixes from 0.13.1 into 0.13 branch. 2014-03-06 10:10:38 -05:00
Josh Suereth 0e2d789290 Merge pull request #1153 from sbt/security-manager-avoid-file-permission
Override certain SecurityManager methods to avoid filesystem performance hit
2014-03-06 08:13:46 -05:00
Mark Harrah 32d28ab85b Override certain SecurityManager methods to avoid filesystem performance hit. 2014-03-06 07:39:06 -05:00
Josh Suereth 5486daf700 Pull in @cunei's suggestion for a more complete Ivy->Maven dynamic revision convertor.
We attempt to convert these constructs to maven:
   * 1.+
   * ]1,2]
   * [2,3[
   * 1+  - Albeit this one is a heuristic for accuracy.

This should help ivy users which prefer the nicer 1.2.+ syntax.

Also adds tests/improves exisitng tests.
2014-03-05 19:14:21 -05:00
Josh Suereth 21da87c4e7 Fixes #429 - Add better error messages when credentials are not found.
* Create hackery to inspect registered credentials in the IvyCredentialStore.
* Create a new authenticator which inserts itself *after* the ivy authenticator.
  - Will issue an error message detailing host/realm required if credentials are
    not found.
  - Also lists out configured Realms with a 'is misspelled' message.
  - Ignores proxy-related authentication errors, for now.
2014-03-04 11:36:34 -05:00
Josh Suereth a8ab2f3db9 Merge pull request #1115 from metasim/Structure-docs
Added basic documentation for DefinableSetting, inferring behavior from implementation.
2014-03-03 14:16:21 -05:00
Josh Suereth 8cd44646b7 Fix #1136 - Ivy's `+` dependencies not converted to maven style syntax.
* Attempt to convert dependencies that end in `+` into maven-style version range
* if a failure occurs, just use the original version (could be bad...).
2014-03-03 12:10:37 -05:00
Josh Suereth 71c9ec0e55 Adding quick test for #1136.
* Just checks to see if + in version numbers are removed from pom files.
2014-03-03 10:20:15 -05:00
Josh Suereth 3944955d62 Merge pull request #1139 from lucamilanesio/0.13
Completed a full example of forked tests with grouping
2014-02-28 10:33:34 -05:00
Luca Milanesio bedfb12163 Making example specific to build.sbt
(see discussion on https://github.com/sbt/sbt/pull/1139)
2014-02-28 15:19:17 +00:00
Luca Milanesio 63583d2544 Removed redundant semicolon 2014-02-27 10:51:44 +00:00
Luca Milanesio c9208a4719 Completed a full example of forked tests with grouping
The previous example of how to fork group of tests in different
JVMs was incomplete and not fully working.

a) The "testGrouping in Test" is needed, otherwise the grouping is
   not known to which phase to apply
b) Added a more complete Project definition to explain what the curly
   brackets section refers to and where the settings need to be included

The new complete example works out of the box :-)
2014-02-27 10:41:06 +00:00
Josh Suereth 27b83e7d59 Merge pull request #1137 from gourlaysama/wip/forking
update doc: javaHome is not File but Option[File].
2014-02-25 20:53:36 -05:00
Antoine Gourlay 0f6fe85d3f update doc: javaHome is not File but Option[File]. 2014-02-26 01:23:32 +01:00
Josh Suereth 44c62094b8 Merge pull request #1133 from cfeduke/0.13-doc-using-sonatype-publish-key
updated doc to include publishing PGP keys to the key server pool
2014-02-21 16:57:42 -05:00
Josh Suereth ab65e6b3cb Merge pull request #1135 from retronym/ticket/SI-7788
SI-7788 Adapt to renamed implict Predef.conforms
2014-02-21 16:57:06 -05:00
Jason Zaugg 8c4527317f SI-7788 Adapt to renamed implict Predef.conforms
In 2.11, the implicit version is named `$conforms` so as to avoid
accidental shadowing by user code, which renders methods using
views and subtype bounds inexplicable unusable.

But, SBT intentionally needs to hide it to make the implicits
in this file line up.

This commit opts-in the the required identifiers from Predef,
rather than opting out of conforms. This makes the same code
source compatible with 2.10 and 2.11.
2014-02-21 22:14:13 +01:00
Charles Feduke 1baa672275 updated doc to include publishing PGP keys to the key server pool 2014-02-21 16:12:34 -05:00
Josh Suereth 7221890b3d Merge pull request #1132 from sbt/wip/use-bintray-for-plugins
Migrate docs to use bintray for plugins.
2014-02-21 13:50:21 -05:00
Josh Suereth ba8a22679a Migrate docs to use bintray for plugins. 2014-02-21 13:19:00 -05:00
Josh Suereth 0e337b8cbd Fix binary-plugin scripted test so it can run more than once. 2014-02-21 09:26:32 -05:00
Josh Suereth 2ee2576cb9 Fix auto-plugin test from removal of unary_! on Nature but not AutoPlugin. 2014-02-20 20:04:13 -05:00
Josh Suereth c9f83dde47 Merge pull request #1127 from retronym/topic/2.11-2.10-source-compat
using compat._ to plug source compatibility breakages
2014-02-20 16:09:48 -05:00
Josh Suereth a8acc11fb5 Merge pull request #1130 from sbt/wip/auto-plugins
AUTO PLUGIN FEATURE!!!!
2014-02-20 16:08:01 -05:00
Mark Harrah 90134b3af0 'plugins' and 'plugin <name>' commands to inspect plugins
* 'plugins' displays the list of plugins available for each build along with the project IDs each is enabled on
* 'plugin <name>' displays information about a specific plugin in the context of the current project
 - if the plugin is activated on the current project and if so, information about the keys/configurations it provides
 - how the plugin could be activated if possible
* tries to detect when it is run on an aggregating project and adjusts accordingly
 - indicates if an aggregated project has the plugin activated
 - indicates to change to the specific project to get the right context

This is a rough implementation and needs lots of polishing and deduplicating.
The help for the commands needs to be added/expanded.
2014-02-20 13:56:50 -05:00
Mark Harrah 2bf127aaf6 Make BuildDependencies construction a proper function outside of the settings sytem. 2014-02-20 13:28:02 -05:00
Mark Harrah a3d89dc865 Infrastructure for debugging natures and plugins.
* Can provide suggestions for how to define a plugin given a context (a loaded Project in practice).
* When a user requests an undefined key at the command line, can indicate whether any (deactivated) plugins provide the key.

TODO:
* Hook up to the key parser
* Implement 'help <plugin>'
* Determine how to best provide the context (the current project is often an aggregating root, which is not typically a useful context)
2014-02-19 23:04:10 -05:00
Josh Suereth 9969973d09 Merge pull request #1126 from jozic/no-def-package
explicitly disapprove plugins using default package
2014-02-19 09:13:39 -05:00
Eugene Platonov 3389906b01 explicitly disapprove plugins using default package 2014-02-18 23:11:59 -05:00
Jason Zaugg fc189675a6 Merge pull request #1125 from gkossakowski/compile-setup-nameHashing
Make change to CompileSetup backwards compatible.
2014-02-18 12:52:47 +01:00
Grzegorz Kossakowski 19ca7a1edc Make change to CompileSetup backwards compatible.
The c7f435026f introduced a new parameter
to the constructor of `CompileSetup` but it turns out that this class
is being used in zinc. Introduce an overloaded variant of that constructor
that preserves backwards compatibility.
2014-02-18 12:18:07 +01:00
Josh Suereth ef907b8c1d Merge pull request #1122 from gkossakowski/compile-setup-nameHashing
Include value of `nameHashing` flag in `CompileSetup`.
2014-02-17 18:01:49 -05:00
Grzegorz Kossakowski c7f435026f Include value of `nameHashing` flag in `CompileSetup`.
The CompileSetup class is being used to detect changes to arguments of
incremental compiler that affect result of compilation and trigger
recompilation. Examples of such arguments include, the target (output)
directory, Scala compiler options, Scala compiler version, etc.

By adding `nameHashing` to CompileSetup we have a chance to handle change
to that flag smoothly by throwing away old Analysis object and starting
with an empty one. That's implemented in AggressiveComile by extending
the logic that was responsible for detection of changes to CompileSetup
values. Thanks to this change we fix #1081.

Analysis formats has been updated to support persisting of newly added
value in CompileSetup. We used to not store the value of `nameHashing`
flag in persisted Analysis file and infer it from contents of relations
but that leads to issue #1071 when empty relations are involved. Given
the fact that CompileSetup stores `nameHashing` value now, we can just
use it when reading relations and fix #1071. This requires reading/writing
compile setup before reading relations. I decided to make that change even
if there's a comment saying that reading/writing relations first was done
intentionally.
2014-02-17 17:00:19 +01:00
Jason Zaugg bd943b8e83 using compat._ to plug source compatibility breakages
This commit makes the code source compatible across Scala 2.10.3
and https://github.com/scala/scala/pull/3452, which is proposed
for inclusion in Scala 2.11.0-RC1.

We only strictly need the incremental compiler to build on Scala
2.11, as that is integrated into the IDE. But we gain valuable
insight into compiler regressions by building *all* of SBT with
2.11.

We only got there recently (the 0.13 branch of SBT now fully cross
compiles with 2.10.3 and 2.11.0-SNAPSHOT), and this aims to keep
things that way.

Once 2.10 support is dropped, SBT macros will be able to exploit
the new reflection APIs in 2.11 to avoid the need for casting
to compiler internals, which aren't governed by binary compatibility.
This has been prototyped by @xeno-by: https://github.com/sbt/sbt/pull/1121
2014-02-17 14:53:59 +01:00
Simeon H.K. Fitch 9f43d0660d Revised documentation based on feedback from @jsuereth 2014-02-12 15:37:49 -05:00
Simeon H.K. Fitch 7f6abbaf35 Added basic documentation for DefinableSetting, inferring behavior from implementation. 2014-02-12 12:31:15 -05:00
Jason Zaugg 9428bb3344 Merge pull request #1114 from gkossakowski/scala-2.11.0-M8
Remove work-arounds for Scala 2.11 problematic dependencies
2014-02-12 15:27:23 +01:00
Josh Suereth c26a7a6a49 Merge pull request #1111 from D-Roch/patch-1
Update Community-Plugins.rst
2014-02-12 08:23:49 -05:00
Grzegorz Kossakowski 4a9981720a Remove work-arounds for Scala 2.11 problematic dependencies
The ff0fd6eec6 introduced some exclusions
that were necessary for getting sbt to resolve dependencies properly
against Scala 2.11.0-M7.

Scala 2.11.0-M8 fixed its dependency structure so we can get rid of those
exclusions now.
2014-02-12 14:12:20 +01:00
Grzegorz Kossakowski 53331d9328 Merge pull request #1113 from retronym/ticket/si-8263
Scala 2.11 compatibility
2014-02-12 14:05:47 +01:00
Jason Zaugg 4e073373da SI-8263 Avoid SOE in Symbol#logicallyEnclosingMember under Scala 2.11
Since the fix for SI-2066, Scala 2.11 calls logicallyEnclosingMember on the
`x` in the expansion of the task macro:

    InitializeInstance.app[[T0[x]](T0[java.io.File], T0[java.io.File]), Seq[java.io.File]]

This exposed the fact that SBT has created `T0` with `NoSymbol` as
the owner. This led to the a SOE.

I will also change the compiler to be more tolerant of this, but we
can observe good discipline in the macro and pick a sensible owner.
2014-02-12 13:30:46 +01:00
Jason Zaugg 9b4564f0cd SI-8262 Fix compilation with 2.11 due to shadowing of Range
We now have `global.Range`, so our wildcard import of `global._`
shadows `scala.Range`.

This commit fully qualifies that type so as to be compatible with
Scala 2.10 and 2.11.
2014-02-12 13:11:28 +01:00
Roch Delsalle 05d96912d1 Update Community-Plugins.rst
sbt-scct fork / published on central with 0.13 compatibility
2014-02-12 11:02:53 +01:00