Commit Graph

3648 Commits

Author SHA1 Message Date
Eugene Yokota 65e4b773d4 Fixes #1530. Fixes NPE by using IO.listFiles 2014-08-15 03:52:54 -04:00
Eugene Yokota e1d60b6de0 Fixes #1484. Fixes another variant of update NPE
Ivy gives an array that contains null for caller configurations.
sbinary barfs when it sees null. Curiously two of the sbt plugins that
hit this bug happens to be from Typesafe:
    addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.2")
    addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager"  % "0.7.3")
2014-08-15 02:57:17 -04:00
Eugene Yokota 074fbdb9e6 ModuleDetailReport => OrganizationArtifactReport
ModuleDetailReport hasn’t been released yet, so this rename is safe.
2014-08-15 01:57:21 -04:00
Eugene Yokota 482bdc1b77 scalariform changes 2014-08-15 01:52:31 -04:00
eugene yokota 12c748e0ef Merge pull request #1525 from sbt/wip/fix-eval-issues
Fix Eval issues
2014-08-14 17:48:22 -04:00
Josh Suereth a1b3117a42 Track generated .class files and clean leftovers after project load.
Fixes #1524

* Track generated .class files from Eval
* While loading, join all classfiles throughout Load, lots of bookkeeping.
* When a given build URI is done loading, we can look at its
  project/target/config-classes directory and clean out any extra items
  that are lingering from previous build definitions.
* Add TODOs to handle the same thing in global directories.  Right now,
  given the shared nature of these projects, it's a bit too dangerous to
  do so.
2014-08-14 10:03:24 -04:00
Josh Suereth 0bfb5a4118 Ensure random file hash for .sbt DSL doesn't conflict across .sbt files.
Fixes #1465
2014-08-14 10:01:02 -04:00
Grzegorz Kossakowski 12b6bd148d Merge pull request #1531 from gkossakowski/positions-crash
Set currentRun and currentUnit in Eval
2014-08-14 15:52:01 +02:00
Grzegorz Kossakowski 3fa6b87319 Set currentRun and currentUnit in Eval
First of all, we revert changes to Eval made in
a9cdd96152. That was a work-around
for problem with broken positions set on some trees. The rest of
the commit describes a fix.

Scala compiler's Global has `currentRun` method which is supposed to
return an instance of Run currently in use. Sbt's Eval which wraps
Global would create an instance of Run but not register it in Global.
Similarly, Eval would create an instance of `CompilationUnit` but not
set it in Run.

This would result in some silent failures like assigning broken positions
to parsed trees even if parser *has* received an instance of compilation
unit. See https://issues.scala-lang.org/browse/SI-8794 for details.

We fix the issue by subclassing Global and making it possible to set
current Run instance externally. Then we use this capability to set a run
instance right before we call compiler phases. We also make sure that
current run has current compilation assigned to it.

Fixes #1181
Fixes #1501
Fixes #1523
2014-08-13 23:32:14 +02:00
eugene yokota 52fb91844f Merge pull request #1512 from sbt/wip/fix-1506
Fix unknown host exception in junit xml listener.
2014-08-12 14:55:20 -04:00
eugene yokota 4f18aea818 Merge pull request #1521 from sbt/wip/fix-flaky-settings-test
Fixes flaky no-such-element exception from bad generation of random test...
2014-08-12 11:12:44 -04:00
eugene yokota 3d59b18aef Merge pull request #1516 from sbt/wip/fix-1455
Allow root plugins to be disabled.
2014-08-12 11:12:18 -04:00
Josh Suereth 58175e28c1 Merge pull request #1520 from sbt/fix/1514
Fixes #1514, #321. Fixes -SNAPSHOT issue by re-implemeting ChainResolver
2014-08-12 10:04:10 -04:00
Eugene Yokota d11427dd85 Using iterators 2014-08-11 22:49:48 -04:00
Josh Suereth a151ac9c94 Ok, this is actually the flaky issue with the test.
We use the ch key for testing, so it can't be part of the autogenerated set.
2014-08-11 16:13:26 -04:00
Josh Suereth 0817800065 Fixes flaky no-such-element exception from bad generation of random tests. 2014-08-11 14:54:33 -04:00
Eugene Yokota 01c95b5d62 Special treatment for a special resolver: inter-project 2014-08-11 12:45:14 -04:00
Josh Suereth 86d0cd9aeb Remove printlns. 2014-08-11 09:04:26 -04:00
Eugene Yokota b8ab638b74 So apparently scalariform was unable to parse these files. 2014-08-11 09:03:35 -04:00
Josh Suereth 274e0b446c Added notes so we have a merge conflict for @eed3si9n to deal with. 2014-08-11 09:03:31 -04:00
Josh Suereth 2d0aafc8b0 Allow root plugins to be disabled.
Fixes #1455

* Add a mechanism to detect if a plugin clause includes/excludes
  a particular plugin.
* Add a filter for our "enabling" clauses so that user-excluded
  root plugins do not show up.
* Add a test to ensure this succeed.
2014-08-11 09:01:18 -04:00
Josh Suereth f7c4898a97 Merge pull request #1491 from sbt/fix/528
Unresolved dependency warning includes source position. Fixes #528
2014-08-11 07:51:33 -04:00
Eugene Yokota 286d567781 Fixes #1514, #321. Fixes -SNAPSHOT issue by re-implemeting ChainResolver.
Adds `lastestSnapshots` flag to `updateOptions`, which controls the behavior of the chained resolver. Up until 0.13.6, sbt was picking the first `-SNAPSHOT` revision it found along the chain. When  is enabled (default: ), it will look into all resolvers on the chain, and compare them using the publish date.
The tradeoff is probably a longer resolution time if you have many remote repositories on the build or you live away from the severs. So here's how to disable it:

    updateOptions := updateOptions.value.withLatestSnapshots(false)

Ivy by default uses latest-revision as the latest strategy. This strategy I don't think takes in account for the possibility that a changing revision may exist in multiple repositories/resolvers with having identical version number like 0.1.0-SNAPSHOT.
The implementation is a bit hacky, but I think it attacks the core of this problem.
2014-08-10 18:56:58 -04:00
Eugene Yokota 15185d9004 Minimizing scripted repro 2014-08-09 21:23:07 -04:00
Eugene Yokota 899d5295c8 Adds a test case that exercises the multiple-repository -SNAPSHOT issue. #1514
* Create a project "common" which publishes a "bad" artifact.
* Resolve project "dependent" which resolves the "bad" artifact into the cache.
* Publish a new "common" snapshot to a diffferent repository (publishLocal)
* Attempt to build the new project, leading to issues.
2014-08-09 20:42:19 -04:00
eugene yokota 6f0b6669f6 Merge pull request #1515 from sbt/wip/fix-1398
Disable flaky test, as it's timeout based.
2014-08-09 18:31:41 -04:00
eugene yokota b63ce455df Merge pull request #1507 from sbt/wip/optional-https-maven-central
"Use HTTPS for downloading artifacts from Maven Central" + disable flag
2014-08-09 18:31:13 -04:00
Roberto Tyley d46087ff08 Fix pom-export of Maven Central repository
Commit a1e26ca6 broke the `make-pom` & `pom-advanced` dependency-management
tests by replacing one reference to `IBiblioResolver.DEFAULT_M2_ROOT` in
`Resolver`, but not the other reference in `MakePom`:

https://travis-ci.org/sbt/sbt/jobs/31939788#L2517-L2519

...the secure url was no longer recognised as the default Maven Repository
root, so was erroneously exported.
2014-08-08 17:08:54 -04:00
Eugene Yokota f3d71f98e4 Adds sbt.repository.secure (default: true) #1494 2014-08-08 17:08:54 -04:00
Eugene Yokota bc91e456f7 scalariform project/Docs.scala 2014-08-08 17:07:44 -04:00
Roberto Tyley 0bada62349 Update misc tests and doc to reflect HTTPS access for Maven Central 2014-08-08 17:07:44 -04:00
Roberto Tyley a826ac743b Use HTTPS for downloading artifacts from Maven Central
Sonatype have enabled HTTPS access for Maven Central:

http://central.sonatype.org/articles/2014/Aug/03/https-support-launching-now/

Note that the Ivy class IBiblioResolver contains the old http url
(ie DEFAULT_M2_ROOT="http://repo1.maven.org/maven2/"):

http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java?revision=1557968&view=markup#l72
2014-08-08 17:07:44 -04:00
Josh Suereth aee7903338 Disable flaky test, as it's timeout based.
Fixes #1398
2014-08-08 14:28:33 -04:00
Josh Suereth fbf9d72607 Merge pull request #1509 from sbt/fix/1501
Fixes #1181/#1501. Fixes ArrayIndexOutOfBoundsException: -1
2014-08-08 13:39:01 -04:00
Josh Suereth 666819e707 Fix unknown host exception in junit xml listener.
Fixes #1506
2014-08-08 13:03:01 -04:00
Josh Suereth f6cf403825 Merge pull request #1508 from sbt/wip/jcenter-fix
Moves JCenter and Bintray repo into object Resolver. #1405
2014-08-08 11:04:31 -04:00
eugene yokota d99d75408c Merge pull request #1505 from jaceklaskowski/initdetailed-help-fix
BuiltinCommands.initialize has load-commands commented out
2014-08-08 10:31:34 -04:00
Eugene Yokota 840acba087 Adds `dependencyPositions` task to explicitly track dependency positions. 2014-08-08 00:53:09 -04:00
Eugene Yokota a9cdd96152 Fixes #1181/#1501. Fixes ArrayIndexOutOfBoundsException: -1
When the compiler reports back the error to CompilationUnit created by Eval#mkUnit, it sometimes returns OffsetPosition whose `source` is set to `NoSourceFile`.

This causes ArrayIndexOutOfBoundsException. The current workaround is to pattern match on the passed in pos and create a new one when the incoming source looks suspicious.
I have not figured out whether this is caused by our macro code or compiler.
There are various build.sbt errors that would cause this behavior:

```scala
libraryDependencies ++= Seq(
  depA
  depB // missing comma
)

lazy val bob = scala.Console println

test ++

run+
```
2014-08-07 23:58:49 -04:00
Eugene Yokota d7dba9c095 Moves JCenter and Bintray repo into object Resolver. #1405
This is more consistent with other hardcoded repos like Sonatype.
Also hardcoding everything to https.
2014-08-07 15:50:57 -04:00
Josh Suereth 0b2f2ae5a8 Merge pull request #1504 from jaceklaskowski/fix-reload-help
Properly show reload brief/detailed help
2014-08-07 11:48:22 -04:00
Jacek Laskowski 8affccb42a BuiltinCommands.initialize has load-commands commented out 2014-08-06 23:56:59 +02:00
Jacek Laskowski 8c4f4a7182 Properly show reload help 2014-08-06 23:30:47 +02:00
Josh Suereth 939bb9ba42 Merge pull request #1405 from evgeny-goldin/0.13
BintrayMavenRepository added
2014-08-06 15:50:05 -04:00
Josh Suereth 3ea5eb5f7a Merge pull request #1493 from sbt/fix/1384
Fixes #1384. Fixes Scope.parseScopedKey
2014-08-06 12:35:59 -04:00
Evgeny Goldin 75b815e125 JCenter and BintrayMavenRepository resolvers added 2014-08-06 01:43:19 +02:00
Eugene Yokota f318436725 Deprecate parseScopedKey 2014-08-05 11:28:28 -04:00
Eugene Yokota ee01908369 Fixes #1384. Fixes Scope.parseScopedKey
Scope.parseScopedKey now supports full range of legal keys
described in the documentation including {.} and other
notation for ProjectRef, BuildRef, and ThisBuild.
2014-08-05 11:28:28 -04:00
eugene yokota cd40f05085 Merge pull request #1498 from sbt/wip/fix-broken-cross
Fix broken cross versioning semantics using +
2014-08-04 17:38:34 -04:00
eugene yokota 9654b2a658 Merge pull request #1497 from sbt/wip/0.13.5-merge
0.13.5 merge
2014-08-04 11:51:11 -04:00