Commit Graph

3625 Commits

Author SHA1 Message Date
eugene yokota 6fa61e972f Merge pull request #1547 from joshk/patch-1
Use the new Docker queue on Travis
2014-08-22 18:10:35 -04:00
Josh Kalderimis f4c20563d7 bumping the file to run the build again
fixed an issue with the Docker workers
2014-08-22 11:41:21 +02:00
Josh Kalderimis 6e5a57d1bd Use the new Docker queue on Travis
faster, better, stronger

vms boot in seconds, network is more stable

also cleaned up the .travis.yml file a little :)
2014-08-22 09:53:26 +02:00
Eugene Yokota fc504d87d7 notes 2014-08-22 02:56:04 -04:00
eugene yokota 8af683a1f8 Merge pull request #1536 from benmccann/typesafe-https
Fetch typesafe artifacts using https
2014-08-22 02:48:59 -04:00
eugene yokota c69b0066af Merge pull request #1546 from gkossakowski/nameHashingOnByDefault
Enable name hashing incremental compilation by default.
2014-08-21 20:28:39 -04:00
Grzegorz Kossakowski c440c578fc Enable name hashing incremental compilation by default.
This commit changes the default value of `IncOptions.nameHashing` to be
set to true. It means, the improved incremental compilation algorithm
known as "name hashing" will be enabled by default.

In order to disable it, users should add this to their sbt configuration:

  incOptions := incOptions.value.withNameHashing(false)

Number of tests has been cleaned up as part of this change. All tests
that were marked as name hashing specific are removed. The list includes:

  * constants-name-hashing
  * import-class-name-hashing
  * java-static-name-hashing
  * macro-name-hashing
  * struct-name-hashing

We'll keep just regular version of those tests. The tests will just
exercise the default algorithm: name hashing. This is the first step
towards phasing out of the old incremental compilation algorithm.

Apart from that, a few tests changed its status due to enabling name
hashing algorithm.

The `constants` test has been marked pending due to issue described in
#1543.

The `import-class` test has been marked as passing because name hashing
tracks dependencies introduced by import statements correctly, now.

The `macro` test has been marked as pending due to issue described in
#1544.

The `struct` test has been marked as pending due to issue described in
#1545.

The `java-static` has been slightly modified to exercise just static field
and not run into the same issue as with `constants` test.

There are no other known issues related to name hashing so we conclude
that name hashing is ready to be shipped to all sbt, Scala IDE and zinc
users.
2014-08-22 02:08:07 +02:00
Havoc Pennington b202bd6848 Merge pull request #1538 from sbt/fix/1439
Fixes #1439. Fixes metabuild downloading unused Scala 2.10.2
2014-08-20 14:26:02 -04:00
Havoc Pennington b827768faa Merge pull request #1540 from sbt/wip/quieter-cleaning
Removes println when removing unused *.class files.
2014-08-18 12:12:04 -04:00
Havoc Pennington ca8ca042ec Merge pull request #1539 from sbt/wip/1201
Fixes #1201. Display instruction to overrideScalaVersion
2014-08-18 12:11:56 -04:00
Grzegorz Kossakowski 099ce16f8d Merge pull request #1408 from Duhemm/fix-again-1237
Never inspect twice the same macro application, fix (again) #1237
2014-08-18 13:43:26 +02:00
Martin Duhem 26e2449263 Never inspect twice the same macro application
In Scala 2.10.4, this macro can produce a stack overflow :

    def foo(a: Any): Any = macro impl
    def impl(c: Context)(a: c.Expr[Any]): c.Expr[Any] = a

Here, an application such as `foo(someVal)` will produce the expansion
`someVal`. As expected, `someVal` has `original` tree `foo(someVal)`,
but if we inspect this tree, we will find that `someVal` has an
original tree, but it shouldn't.

Moreover, in Scala 2.11, some macros have their own application as
`original` trees.

See sbt/sbt#1237 for a description of these problems.

This commit fixes these two problems.

Fixes sbt/sbt#1237
2014-08-18 09:22:16 +02:00
Martin Duhem aef9933d87 Add new pending test for sbt/sbt#1237
This test shows that macros that simply return their argument produce
a stack overflow during extraction of used names.

Consider a macro `foo(c: Context)(a: c.Expr[Any]) = a`. An
application of this macro such as `foo(someVal)` will lead to the
expansion `someVal`. sbt will extract the `original` tree from it,
and find `foo(someVal)`, and recurse infinitely on `someVal`.
2014-08-18 09:22:16 +02:00
Eugene Yokota e2412740b2 Removes println when removing unused *.class files.
#1525 removes unused *.class files created by the metabuid.
The implementation currently prints out a long list of *.class files
it’s about to remove. Unless something bad happens, this information is
not very useful to the user, so I suggest we don’t display it.
2014-08-18 01:12:39 -04:00
Eugene Yokota 8c90e7eb74 Fixes #1201. Display instruction to overrideScalaVersion
scala-library is currently treated as just one of the library modules.
This means that it’s at the mercy of eviction if some other library
uses newer version of scala-library.
This commit displays a instruction on how to force scalaVersion if
warnScalaVersionEviction flag is true on EvictionWarningOptions.
2014-08-18 00:54:19 -04:00
Eugene Yokota 8a069d0fb2 Fixes #1439. Fixes metabuild downloading unused Scala 2.10.2
Scala instance is added to the Ivy graph via autoLibraryDependency.
For metabuilds, scala-library is scoped under “provided” configuration,
which does not seem to evict modules on “compiled” configuration.
This commit turns overrideScalaVersion flag to true for the metabuilds,
so override rules are added for the following modules:
- scala-library
- scala-compiler
- scala-reflect
2014-08-17 23:18:32 -04:00
Ben McCann 6508429d81 Fetch tyesafe artifacts using https. See http://blog.ontoillogical.com/blog/2014/07/28/how-to-take-over-any-java-developer/ 2014-08-16 16:17:07 -07:00
eugene yokota 23f9dc26c7 Merge pull request #1535 from sbt/fix/670
Fixes #670. Exclude http.proxyPassword from update.log
2014-08-16 17:11:10 -04:00
eugene yokota ad34bf77e7 Merge pull request #1534 from havocp/wip/havocp-server-mem
Set JVM memory options for server applications
2014-08-16 17:10:47 -04:00
eugene yokota 32990f3570 Merge pull request #1533 from sbt/fix/1530
Fixes #1530. Fixes NPE by using IO.listFiles
2014-08-16 14:42:11 -04:00
eugene yokota 60c8404d5c Merge pull request #1532 from sbt/fix/1484-again
Fix NPE during update again
2014-08-16 14:39:33 -04:00
Eugene Yokota 6b6332a069 Fixes #670. Exclude http.proxyPassword from update.log 2014-08-15 18:25:06 -04:00
Havoc Pennington 705b60dc11 Use java Pattern directly in launcher instead of Scala API
This keeps the launch jar smaller
2014-08-15 15:34:11 -04:00
Havoc Pennington d7ca9c5637 Server launcher: Print errors running java -version to stderr
We forward errors from the spawned server to stderr, so we are
already using stderr and this should save someone some pain
vs. just swallowing the fail.
2014-08-15 15:24:21 -04:00
Havoc Pennington 081f6bac07 Ignore "java -version" IOException when launching servers
process.start and reading from the stderr stream could in
theory throw IOException, we want to return None then
rather than crashing.
2014-08-15 15:24:09 -04:00
Havoc Pennington 3a065dc047 Set Java memory options for server applications
The defaults here are copied from Activator which
in turn are probably copied from somewhere else.
They are of course basically arbitrary, but the
JVM's defaults if we don't set memory options
are insufficient to run most apps.

If the user sets any memory options in the configuration,
we completely leave them alone and don't set any of
our own. So it's always possible to override.
2014-08-15 11:07:19 -04:00
Havoc Pennington b0db0a847e Scalariform reformat of JUnitXmlTestsListener.scala 2014-08-15 09:56:44 -04:00
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