Commit Graph

3692 Commits

Author SHA1 Message Date
Jean-Rémi Desjardins 2eb8fd1b8a Merge branch '0.13' of github.com:sbt/sbt into 0.13 2014-09-16 09:20:21 -07:00
Jean-Rémi Desjardins b754c04a30 Add missing default option 2014-09-15 10:02:08 -07:00
Josh Suereth 2181c60925 Merge pull request #1596 from sbt/wip/herald
minor notes changes for herald
2014-09-15 12:11:25 -04:00
eugene yokota 904c8377b1 Merge pull request #1588 from sbt/wip/bump-sbt-version
Bump version for next sbt release.
2014-09-13 15:38:42 -04:00
Eugene Yokota 46af6b5907 notes 2014-09-13 15:37:00 -04:00
Josh Suereth c6036d956a Merge pull request #1591 from cunei/wip-set-every-1430
Fix for #1430
2014-09-12 22:54:29 -04:00
Antonio Cunei 9b94a16b73 Undone the revert on the optimization, and fixed setAll()
The optimization, and therefore the change in the behavior
of Relation, is now needed by the class Logic, and cannot
be reverted.

This patch (written by Josh) therefore changes the
implementation of setAll() so that _1s is no longer used.
2014-09-12 20:51:04 +02:00
eugene yokota 4846eb35d5 Merge pull request #1586 from sbt/wip/cross-ivy-maven-issues
Fix ivy-mvn cross-wiring issues
2014-09-12 14:42:39 -04:00
Jean-Rémi Desjardins 880f3733d9 Add constructor to avoid binary compatibility issues 2014-09-11 09:36:37 -07:00
Josh Suereth 6033106a2e Add notes and add note about notes in Contributing. 2014-09-11 11:59:38 -04:00
Grzegorz Kossakowski 7885fd2558 Merge pull request #1572 from Duhemm/textanalysisformat-dependency-kinds
Don't hardcode existing relations in TextAnalysisFormat
2014-09-11 16:55:08 +02:00
Martin Duhem 82152b8905 Don't hardcode existing relations in TextAnalysisFormat
The previous implementation of TextAnalysisFormat contained the list
of all the existing relations that sbt knew of, and used this
information to write to and read from the disk the persisted analyses.

In this knew implementation, TextAnalysisFormat gets from the
Relations object what are the existing relations, and then persists
them to disk.

The previous situation was not optimal since it meant that, in order
to add a new dependency kind, one had to modify both the Relations
and TextAnalysisFormat.

Using this new implementation, no change to TextAnalysisFormat is
required whenever a new dependency kind is added.
2014-09-11 14:45:47 +02:00
Grzegorz Kossakowski 6fa9b48691 Merge pull request #1563 from Duhemm/fix-1544
Fix #1544 (SO in dependencies extraction with macros and name hashing)
2014-09-11 13:25:27 +02:00
eugene yokota ba97cf87de Merge pull request #1585 from sbt/wip/manual-conscript-generation
Remove automated conscript generation and only generate on release
2014-09-11 15:18:31 +09:00
Jean-Rémi Desjardins 3ea995225f Merge branch '0.13' of github.com:sbt/sbt into 0.13 2014-09-10 22:56:01 -07:00
Jean-Rémi Desjardins 183c2bcfe2 Add developers keySetting
The motivation for this is mainly to avoid having to define a pomExtra to publish to Maven central
2014-09-10 20:18:28 -07:00
Antonio Cunei 9aa0985f4b This commit reverts part of 322f6de655
The implementation of Relation should in theory make no difference
whether an element is unmapped, or whether it is mapped to an empty
set. One of the changes in 322f6de655
introduced an optimization to the '+' operation on Relations that,
in theory, should have made no difference to the semantic.

The result of that optimization is that some mappings of the form
"elem -> Set()" are no longer inserted in the forwardMap of the
Relation.

Unfortunately, the change resulted in the breakage of #1430,
causing "set every" to behave incorrectly. There must be, somewhere
in the code, a test on the presence of a key rather than an access
via <relation>.get(), or some other access that bypasses the
supposed semantic equivalence described above. I spent several
hours trying to track down exactly the offending test, without
success.

By undoing the relevant change in 322f6de655, "set every"
works again. That however offers no guarantee that everything else
will keep working correctly; the underlying quirk in the code that
depends on this supposedly inessential detail is also still
lurking in the code, which is less than ideal.
2014-09-11 02:04:17 +02:00
Antonio Cunei 3d981177df Adding test for broken "set every", see #1430
To test, use:
> scripted tests/set-every
2014-09-11 02:03:38 +02:00
Josh Suereth 8451caf93a Bump version for next sbt release. 2014-09-10 12:36:05 -04:00
Josh Suereth 0f88b7a4f3 Merge pull request #1584 from sbt/wip/fix-test-classloader-issues
Fix issues with specifying scalaHome/scalaInstance and running tests
2014-09-10 12:26:15 -04:00
Martin Duhem 8542c9b31a Fix SOE with macros in dependencies extraction
In some cases, expanded macros report that their original tree and
its expansion are the same, thus creating a cyclic chain. This chain
may then produce a SOE during dependencies or used names extraction.

This kind of problem was already reported in sbt/sbt#1237 and
sbt/sbt#1408. Unfortunately, the fix that was applied to the
dependencies extraction part was not sufficient.

Mark test 'source-dependencies/macro' as passing

Fixes #1544
2014-09-10 15:54:06 +02:00
Josh Suereth bdd3d01f6e Fixes from review, better names and internal code documentation. 2014-09-10 07:56:19 -04:00
Josh Suereth b226f6511a Fix Maven configuration mappings in Ivy.
It turns out there was a very subtle, and evil, issue sitting the Ivy/maven configuration, and it
related to dependency mapping.    A mapping of `foo->bar(*)` means that the local configuration
`foo` depends on the remote configuration `bar`, if it exists, or *ALL CONFIGURATIONS* if `bar`
does not exist.   Since the default Ivy configuration mapping was using the random `master`
configuration, which AFAICT is NEVER specified, just an assumed default, this would cause leaks
between maven + ivy projects.

i.e. if  a maven POM depends on a module denoted by an ivy.xml file, then you'd wind up accidentally
bleeding ALL the ivy module's configurations into the maven module's configurations.

This fix works around the issue, by assuming that if there is no `master` configuration, than the
maven default of `compile` is intended.   As sbt forces generated `ivy.xml` files to abide by
maven conventions, this works in all of our test cases.   The only scenario where it wouldn't work
is those who have custom ivy.xml files *and* have pom.xml files which rely on those custom ivy.xml files,
a very unlikely situation where the workaround is:  "define a master configuration".

Includes a test demonstrating the issue.
2014-09-09 17:45:02 -04:00
Josh Suereth 7157af57cf Add failing test for ivy/maven cross-over configuration issue. 2014-09-09 11:04:20 -04:00
Josh Suereth d9ebceebdd Scalariform refactoring. 2014-09-09 10:46:28 -04:00
Josh Suereth 5ceb247c0a Remove automated conscript generation and only generate on release.
Fixes #1558.

Note: This may mean conscript is updated less frequently, but
is better than the alternative.
2014-09-09 10:44:32 -04:00
Josh Suereth da1fc33b52 Removing printlns and adding the test, DOH. 2014-09-09 09:16:10 -04:00
Josh Suereth d2950da9dd Fix issue where ScalaInstance broke the thread-context-classloader for all scala classes.
The issue is that when you manually set a ScalaInstance, i.e. not one from Ivy, the
classpath which is returned for any given configuration ONLY uses Ivy.   This means that
the legitimate Scala JAR files that need to be on the classpath are missing from the list.
For some reason, the way we instantiate tests uses an unfiltered classloader against the
ScalaInstance, *BUT* the thread-context-classloader DOES use a filtered instance by
classpath.   This add the hook into the TestFramework runner creation so that
the classpath accurately reflects the jars needed.

cc @rkuhn
2014-09-09 08:56:51 -04:00
Josh Suereth 50460fad28 Add toString methods to classloaders, for debugging.
* Add toString methods to all classloader classes.
2014-09-09 08:56:20 -04:00
Josh Suereth fa36d0e290 Add missing `configs` method from Project to the build.sbt DSL.
* Create `configs` method for the sbt DSL
* Add ProjectManipulation for this method to implement.
2014-09-09 08:54:43 -04:00
Josh Suereth 9a60ca7da9 Merge pull request #1579 from copumpkin/0.13
Support publishing to file repositories specified in ~/.sbt/repositories. Fixes #1570
2014-09-08 13:24:25 -04:00
eugene yokota b0e4545586 Merge pull request #1582 from sbt/wip/merge-0.13.6
Merge 0.13.6
2014-09-09 02:11:08 +09:00
Josh Suereth 653a1c11ea Merge remote-tracking branch 'origin/0.13.6' into wip/merge-0.13.6 2014-09-08 12:46:08 -04:00
eugene yokota f3a84e39b9 Merge pull request #1581 from sbt/wip/fix-config-class-gc
Fix issue where generated config-classes was not propogated.
2014-09-08 22:57:03 +09:00
eugene yokota 115d404072 Merge pull request #1577 from sbt/wip/fix-inter-project-chains
Split out inter-project resolver into its own Chain.
2014-09-08 22:51:25 +09:00
Daniel Peebles a857ae2759 Fixes #1570 2014-09-08 00:55:58 -04:00
Josh Suereth bc421f0ac9 Fix issue where generated config-classes was not propogated.
Fixes #1568.

This is the fallout of attempting not to leak config-file classes. Since
we DO NOT have valid incremental compiler for config-classes, we've instituted
workaround to ensure that regular incremental compilation *AND* our own
sbt loader do not hose each other.   A full solution will eventually be
to find a way for .sbt files to participate in regular compilation of a
project.

For now, we fix the tracking of generated.class files throughout an sbt
"loadProjects" call, and then clean any .class files that were not
generated for a full reload.   This commit just fixes
a minor tracking issue.
2014-09-07 12:01:50 -04:00
Josh Suereth b43d358e0e Merge pull request #1573 from cunei/wip-scala-bin-compat
Allow the "-bin" Scala version suffix to specify a bincompat version
2014-09-05 11:34:05 -04:00
Josh Suereth dbf69b11cd Split out inter-project resolver into its own Chain.
Fixes #1565

* Create two chains if we have inter-project resolver
  - One which ensures inter-project deps are always taken
  - One which will look in all "other" repositories for
    dependencies and will use the "most up-to-date" -SNAPSHOT
    strategy.
* No additional tests, as this would simple break every
  multi-project test if it were wrong.
2014-09-05 10:40:49 -04:00
Josh Suereth 86480a3f6c Merge pull request #1561 from jamesward/patch-2
Fix url to sbt-dev group
2014-09-04 14:39:51 -04:00
Antonio Cunei a6d85ae2cb Allow the "-bin" Scala version suffix to specify a bincompat version
There is sometimes the need to use a test version of Scala that is
intended to be binary compatible with a standard release version.

At this time, due to the particular logic implemented within sbt,
a non-numeric suffix will never have the same binaryScalaVersion
of a release version ending in ".0", like for instance "2.11.0".

This commit allows developers to use as suffix any string that
begins with "-bin", for instance "2.11.0-bin-compat-test-1".
Such a suffix will have a binaryScalaVersion of "2.11", being
therefore considered binary compatible with release versions.
2014-09-04 01:15:58 +02:00
Martin Duhem efa71548d1 Add unit tests for TextAnalysisFormat
Those tests use the random Analysis generator that is used in the
unit tests for the subproject `incremental-compiler`.

Random Analyses are serialized and then constructed back from this
representation.
2014-09-03 23:24:08 +02:00
Martin Duhem c55ae4fd18 Fix random Analysis generator for ScalaCheck
Unit tests in incremental-compiler subproject use a generator to
create random Analysis objects. This generator was unfortunately
not working properly and generated only empty Analyses (it failed
to generate any non-empty Analysis because of a bug in the `unique`
generator).
2014-09-03 23:10:22 +02:00
James Ward cfd9da5789 Fix url to sbt-dev group 2014-08-31 09:51:58 -06:00
eugene yokota 68602278d5 Merge pull request #1557 from gkossakowski/scripted-compactify
Fix `compactify` scripted test failure.
2014-08-27 14:18:28 -04:00
Grzegorz Kossakowski b4110bfc17 Fix `compactify` scripted test failure.
Travis CI stopped allowing long file names on its file system. We need
to explicitly set lower limit on file name length using
`-Xmax-classfile-name` Scala compiler option. We set the limit to 240
characters.

Fixes #1553
2014-08-27 16:24:28 +02:00
Eugene Yokota 7e0c76f5a6 Merge branch '0.13' into 0.13.6 2014-08-24 18:24:37 -04:00
Eugene Yokota 66ad21ec52 notes 2014-08-24 18:21:32 -04:00
Josh Suereth 260d67f288 Merge pull request #1537 from sbt/fix/1275
Improves pom dynamic revision conversion
2014-08-24 18:19:02 -04:00
Josh Suereth dfb5943731 Merge pull request #1555 from sbt/fix/1541-scala-sbt
#1541. Use HTTPS for sbt plugin repository
2014-08-24 18:18:02 -04:00