Commit Graph

434 Commits

Author SHA1 Message Date
Josh Suereth 7f2bd2cc4b Remove nested site generation in favor of just creating Scaladoc/Sxr docs.
* Do not delete versioned docs from sbt/website project
* Just sync api/sxr directories
* Remove all build-related information for old sphinx docs.

Replaces #1385
2014-06-02 12:54:01 -04:00
Josh Suereth e0a96e3d7f Fix bug in release script due to typo.
* Fix collection typo
* Create shared command to setup 2.11 builds
* Alter snapshot detection to allow more flexible milestone versioning.
* Remove cusotm isSnapshot key for new sbt 0.13.2 isSnapshot key.
2014-05-29 22:35:44 -04:00
Josh Suereth ae02b495e6 Fix bug in release script due to typo.
* Fix collection typo
* Create shared command to setup 2.11 builds
* Alter snapshot detection to allow more flexible milestone versioning.
* Remove cusotm isSnapshot key for new sbt 0.13.2 isSnapshot key.
2014-05-28 09:37:14 -04:00
Josh Suereth 4c2d88649e Fix formatting issues and bump to sbt 0.13.5 2014-05-28 09:12:55 -04:00
Josh Suereth 89091ca4fc Merge remote-tracking branch 'origin/0.13.5' into wip/fix-doc-generation
Conflicts:
	project/Sbt.scala
2014-05-28 09:09:51 -04:00
Josh Suereth 73e8676ea5 0.13.5 release. 2014-05-27 09:35:32 -04:00
Eugene Yokota d2f07be79d Roll back Ivy to 2.3.0 for 0.13.5 2014-05-20 12:09:19 -04:00
Josh Suereth a1a784bf91 Add the ability to cross publish libraries and create a command to automatically do so. 2014-05-16 16:50:34 -04:00
Josh Suereth abffc3e1bd Bump expected 2.11 module versions so we can compile with 2.11
Add scala 2.11 test/build verification.

* Add 2.11 build configuratoin to travis ci
* Create command which runs `safe` unit tests
* Create command to test the scala 2.11 build
* Update scalacheck to 1.11.4
* Update specs2 to 2.3.11
* Fix various 2.11/deprecation removals
  and other changes.

Fix eval test failure in scala 2.11 with XML not existing.
2014-05-14 19:08:05 -04:00
eugene yokota 066a12cd2a Merge pull request #1320 from sbt/wip/bump-root-version
Bump version number for next bout of development.
2014-05-09 11:28:35 -04:00
Josh Suereth 98ed08a976 Bump version number for next bout of development. 2014-05-09 08:32:55 -04:00
Grzegorz Kossakowski 436e7078fb Enable name hashing algorithm in sbt build.
The name hashing seems to be stable enough for sbt to use it by default
now. It also greatly improves incremental compilation experience for
people working on sbt sources.
2014-05-09 14:18:46 +02:00
Josh Suereth d034561083 Scalariformed project/Sbt.scala 2014-05-07 11:52:49 -04:00
Josh Suereth 5d5d7a6c05 Add the ability to paginate scripted tests.
* Modify scripted task parser to allow "pagination" of globs
  e.g.  "*1of3" will create three pages and run page 1.
* Modify travis definition to fragment long-running test groups
  into pages so we stay under the 50 minute limit.
2014-05-07 11:06:26 -04:00
Eugene Yokota adb41611cf added scalariform 2014-05-01 12:50:07 -04:00
Eugene Yokota b730c00b75 sbt 0.13.2 2014-05-01 12:05:52 -04:00
Josh Suereth 3121f2f278 Revert "add precompiled 2.11.0"
This reverts commit 36ec103274.

This 2.11.0 dependency was causing issues with older sbt launchers
attempting to use the 2.11.0 scala release for sbt's classloader,
leading to binary incompatibility issues.
2014-04-28 07:46:44 -04:00
xuwei-k 36ec103274 add precompiled 2.11.0 2014-04-24 00:51:44 +09:00
Grzegorz Kossakowski 37e57f7940 Use dedicated api for lastCompilationTime in build definition
Since sbt 0.13.0, we have dedicated API in Analysis that gives access to
information about all compilations performed since the last time clean
was ran.

By looking at at last compilation we can determine lastCompilationTime
value.

Fixes #1272
2014-04-18 18:50:17 +02:00
eugene yokota 96558930c3 Merge pull request #1226 from sbt/wip/bump-to-latest-ivy
Bump to our own release of ivy 2.4.x
2014-04-10 10:15:26 -07: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 f6d1044c4b 0.13.5-SNAPSHOT 2014-03-26 14:34:25 -04:00
Ismael Juma 607e061a6a Bump Scala version to 2.10.4. 2014-03-25 22:08:04 +00:00
Eugene Yokota 66ada09f06 0.13.5-M1 2014-03-25 01:49:33 -04:00
Josh Suereth 905028a6ae Bump version for further 0.13.x development. 2014-03-11 10:25:18 -04:00
Josh Suereth a8acc11fb5 Merge pull request #1130 from sbt/wip/auto-plugins
AUTO PLUGIN FEATURE!!!!
2014-02-20 16:08:01 -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
Mark Harrah 162d8094ba Convert logic system test cases into unit tests.
Still TODO for auto-plugins/logic:

 * property-based tests for logic system
 * user documentation
 * (optional) 'about plugins' or similar to show more information about the auto-plugins for a project
 * (deferred) allow AutoPlugin to inject Commands directly?
 * (deferred) provide AutoPlugin functionality to arbitrary scopes instead of just at the Project level?
2014-01-24 14:37:04 -05:00
Mark Harrah b8619f4aae Main part of integrating natures into project loading. 2014-01-24 14:34:15 -05:00
Mark Harrah 322f6de655 Logic system supporting auto plugins and initial outline of AutoPlugin and Natures types.
* Not integrated into project loading
 * Doesn't yet check that negation is acyclic before execution
2014-01-24 14:30:12 -05:00
Grzegorz Kossakowski ff0fd6eec6 Update dependencies to Scala 2.11.0-M7.
I had to sprinkle some excludes due to dependency of scala-compiler M7 on
M6 modules. Those excludes won't be needed by the time M8 is out.
2014-01-18 01:09:24 +01:00
Adriaan Moors 034eb26af9 Scala 2.11 modules now under org.scala-lang.modules
Using 1.0-RC2 for scala-xml, 1.0-RC1 for scala-parser-combinators.
2014-01-18 00:04:32 +01:00
William Benton 3a1ad44c45 Support Ivy 2.3.0-final.
This entailed modifying ResolutionCache and the CustomPomParser
to reflect changes to the ResolutionCacheManager interface and
DefaultExtendsDescriptor class between Ivy 2.3.0-rc1 and
2.3.0-rc2. Specifically,

1. ResolutionCacheManager now includes two additional methods
that needed implementations in ResolutionCache:
getResolvedModuleDescriptor(mrid: ModuleRevisionId) and
saveResolvedModuleDescriptor(md: ModuleDescriptor). I adapted
the implementations for these (which are expressed primarily in
terms of other interface methods) from Ivy 2.3.0's
DefaultResolutionCacheManager.

2. Instead of taking a ModuleRevisionIdentifier and a resolved
ModuleRevisionIdentifier as its first two arguments, the
DefaultExtendsDescriptor constructor now takes a
ModuleDescriptor. This was a trivial change.

Note that ResolutionCache.getResolvedModuleDescriptor does not
appear to be used by Ivy as sbt uses Ivy and there is thus no
test coverage for its implementation. Also note that the
DefaultResolutionCacheManager object created in
Update.configureResolutionCache now requires a reference to an
IvySettings object; DRCM expects this to be non-null.
2013-12-13 14:24:37 -06:00
Mark Harrah 06deda06af Reorganized/commented proguard build configuration.
Review by @jsuereth.
2013-12-13 10:33:07 -05:00
Mark Harrah 48fb98f2d1 0.13.1 2013-12-10 10:18:42 -05:00
Grzegorz Kossakowski ec40eab92d Merge pull request #1013 from gkossakowski/used-names-extraction
Used names extraction logic
2013-12-03 03:30:21 -08:00
Grzegorz Kossakowski 304796bb7a Add support for tracking names used in Scala source files.
Tracking of used names is a component needed by the name hashing
algorithm. The extraction and storage of used names is active only when
`AnalysisCallback.nameHashing` flag is enabled and it's disabled by
default.

This change constists of two parts:

  1. Modification of Relations to include a new `names` relation
     that allows us to track used names in Scala source files
  2. Implementation of logic that extracts used names from Scala
     compilation units (that correspond to Scala source files)

The first part is straightforward: add standard set of methods in
Relations (along with their implementation) and update the logic which
serializes and deserializes Relations.

The second part is implemented as tree walk that collects all symbols
associated with trees. For each symbol we extract a simple, decoded name
and add it to a set of extracted names. Check documentation of
`ExtractUsedNames` for discussion of implementation details.

The `ExtractUsedNames` comes with unit tests grouped in
`ExtractUsedNamesSpecification`. Check that class for details.

Given the fact that we fork while running tests in `compiler-interface`
subproject and tests are ran in parallel which involves allocating
multiple Scala compiler instances we had to bump the default memory limit.

This commit contains fixes for gkossakowski/sbt#3, gkossakowski/sbt#5 and
gkossakowski/sbt#6 issues.
2013-12-03 12:27:29 +01:00
Grzegorz Kossakowski c5317a1f72 Work harder on generating unique values in generator for Analysis.
The TestCaseGenerators uses global set for ensuring that certain generated
values are unique. This is not the best design because the more properties
you check the harder is to generate new sample inputs because of already
accumulated values. This results in:

[info] + Analysis.Simple Merge and Split: OK, proved property.
[info] ! Analysis.Complex Merge and Split: Gave up after only 8 passed tests. 93 tests were discarded.

I don't have an ambition to reduce the scope of this global set but at
least I wanted to make generators to work a bit harder on generating
samples.

Instead of using `suchThat` method for filtering out non-unique samples
we use `retryUntil` that never gives up (therefore it might not
terminate). We had to upgrade to latest (1.11.1) version of scalacheck
in order to have an access to `retryUntil` method.

Also, I overridden the `identifier` to delegate to original
`Gen.identifier` but with minimal size set to be to '3'. This means,
the generated identifier will be of size 3 or larger which is needed in
order to avoid collisions.
2013-11-25 18:50:49 +01:00
Bruno Bieth e4dd71c08c execute scripted test without publishing SBT first
Saves you some time when only your test has changed.
2013-11-13 15:51:21 -05:00
Mark Harrah a92b883e23 update to ScalaCheck 1.11.0 2013-11-04 11:28:40 -05:00
Grzegorz Kossakowski a37d8d4770 Fix unstable existential type names bug.
Fix the problem with unstable names synthesized for existential
types (declared with underscore syntax) by renaming type variables
to a scheme that is guaranteed to be stable no matter where given
the existential type appears.

The sheme we use are De Bruijn-like indices that capture both position
of type variable declarion within single existential type and nesting
level of nested existential type. This way we properly support nested
existential types by avoiding name clashes.

In general, we can perform renamings like that because type variables
declared in existential types are scoped to those types so the renaming
operation is local.

There's a specs2 unit test covering instability of existential types.
The test is included in compiler-interface project and the build
definition has been modified to enable building and executing tests
in compiler-interface project. Some dependencies has been modified:

  * compiler-interface project depends on api project for testing
    (test makes us of SameAPI)
  * dependency on junit has been introduced because it's needed
    for `@RunWith` annotation which declares that specs2 unit
    test should be ran with JUnitRunner

SameAPI has been modified to expose a method that allows us to
compare two definitions.

This commit also adds `ScalaCompilerForUnitTesting` class that allows
to compile a piece of Scala code and inspect information recorded
callbacks defined in  `AnalysisCallback` interface. That class uses
existing ConsoleLogger for logging. I considered doing the same for
ConsoleReporter. There's LoggingReporter defined which would fit our
usecase but it's defined in compile subproject that compiler-interface
doesn't depend on so we roll our own.

ScalaCompilerForUnit testing uses TestCallback from compiler-interface
subproject for recording information passed to callbacks. In order
to be able to access TestCallback from compiler-interface
subproject I had to tweak dependencies between interface and
compiler-interface so test classes from the former are visible in the
latter. I also modified the TestCallback itself to accumulate apis in
a HashMap instead of a buffer of tuples for easier lookup.

An integration test has been added which tests scenario
mentioned in #823.

This commit fixes #823.
2013-10-29 16:39:50 +01:00
Mark Harrah d6ca66d406 Docs: sitemap generator, basic robots.txt. Fixes #916. 2013-10-17 15:00:48 -04:00
Mark Harrah 9a85396d4f Include link to source on GitHub at bottom of the page. Fixes #921. 2013-10-16 19:26:25 -04:00
Mark Harrah d4aa7bf0e9 drop unused mutable data type generator 2013-10-08 13:38:33 -04:00
Mark Harrah fb81ca67d8 bump Scala version to 2.10.3 2013-10-02 19:39:17 -04:00
Mark Harrah 72125e73ce Build: scope root sources to 'doc' task since they shouldn't be compiled normally. 2013-09-26 09:17:07 -04:00
Mark Harrah b2599c1bb1 Restore sxr support and fix links to sxr'd sources. Fixes #863. 2013-09-24 11:34:14 -04:00
Mark Harrah 5ecc16df24 Docs: use different local directory for ghpages repository for snapshots and stable updates. 2013-09-22 13:46:34 -04:00
Mark Harrah 7b1b33758c Convert -classpath to CLASSPATH when forking on Windows and length exceeds a heuristic maximum. Fixes #755. 2013-09-11 18:22:16 -04:00
Mark Harrah 005384f9af Use sbt 0.13.0 to build the 0.13 branch. 2013-09-10 08:30:00 -04:00
Mark Harrah fdd93406d5 Docs/build: changes for CI doc refreshes 2013-09-06 21:26:53 -04:00
Mark Harrah f725dd6c65 Docs: pass build values to sphinx/conf.py via environment variables to reduce duplication. 2013-08-27 10:36:22 -04:00
Mark Harrah ea30d7f1ef update url for publishing to typesafe repository 2013-08-23 01:58:07 -04:00
Mark Harrah 46782d95bb latest site plugin 2013-08-16 14:21:44 -04:00
Mark Harrah 50feb1c383 additional helpers to build against 2.11 nightlies 2013-07-18 22:45:04 -04:00
Mark Harrah 2195de1451 remove redundant crossPaths settings 2013-07-18 22:36:40 -04:00
Mark Harrah b92d82ba79 bump to sbinary 0.4.2, which is the same as 0.4.1 but the 2.11 version has the right scala-xml metadata 2013-07-18 18:13:57 -04:00
Mark Harrah a0fdb3885d 0.13.1-SNAPSHOT to be able to use 0.13 plugins without changes 2013-07-17 14:58:53 -04:00
Mark Harrah 7278fbc567 Scala 2.11 modularized dependencies 2013-07-09 14:55:30 -04:00
Mark Harrah fc34039894 switch to org.scala-sbt;test-interface;1.0 2013-06-28 19:03:30 -04:00
Mark Harrah ab0d61c3fe define test-interface dependency in build in one place 2013-06-28 09:08:29 -04:00
cheeseng 5bb46359b5 Change to use test-interface-1.0-SNAP7, and use ScalaTest 2.0.M6-SNAP26 which implemented test-interface-1.0-SNAP7. 2013-06-28 17:18:38 +08:00
Mark Harrah 989c1d3dc6 auto-generate conscript launchconfigs from launcher boot.properties 2013-06-28 00:01:19 -04:00
Mark Harrah 5c1ca5d1ec use 0.12.4 final for building 2013-06-27 14:12:47 -04:00
Mark Harrah 1048976844 jline/jansi fixes for windows. Fixes #763, fixes #562.
The startup script should set sbt.cygwin=true if running from cygwin.
This will set the terminal type properly for JLine if not already set.
If sbt.cygwin=false or unset and os.name includes "windows", JAnsi is
downloaded by the launcher and installed on standard out/err.

The value for jline.terminal is transformed from explicit jline.X to
the basic types "windows", "unix", or "none".  Now that sbt uses JLine
2.0, these types are understood by both sbt's JLine and Scala's.
Older Scala versions shaded the classes but not the terminal property
so both couldn't be configured with a class name at the same time.
2013-06-26 13:40:33 -04:00
Mark Harrah aeab5bfdaa fix duplicate launcher upload 2013-06-24 20:06:38 -04:00
Mark Harrah 26a0692fd3 build with 0.12.4-RC3 2013-06-20 16:55:17 -04:00
Mark Harrah a3defe2556 update to Scala 2.10.2 final 2013-06-20 15:44:29 -04:00
Mark Harrah 280e1b6d60 Build cleanup, publish launcher normally, pull it normally in scripted plugin
Still want to deploy the launcher to the previous path for compatibility with
existing scripts so that the transition to 0.13 is not impeded.
2013-06-20 15:44:29 -04:00
Mark Harrah 5dc671c7f8 Synchronize ClassLoaderCache and the Scala provider cache.
Construction of Scala providers was already properly synchronized jvm and machine-wide.
The cache on top of construction was not and neither was the newer ClassLoaderCache.
This could cause the same Scala version to be loaded in multiple class loaders, taking
up more permgen space and possibly decreasing performance due to less effective jit.

The issue is very rare in practice for 0.13 because of the low probability of contention
on ClassLoaderCache.  This is because the work for a cache miss is mainly the construction
of a URLClassLoader.  In 0.12, however, the work potentially involved network access and
class loading (not just class loader construction), thus greatly increasing the probability
of contention and thus duplicate work (i.e. class loader construction).

When there is contention, multiple class loaders are constructed and then preserved by the
scalaInstance task in each project throughout the first task execution.  Only when multiple
scalaInstance tasks execute simultaneously and only during the first execution does this occur.
(Technically, it could still happen later, but it doesn't in practice.)

This means that the number of duplicate class loaders should quickly saturate instead of growing
linearly with the number of projects.  It also means that the impact depends on the exact
tree structure of projects.  A linear chain of dependencies will be unaffected, but a build with
independent leaves may be limited by the number of cores.  The number of cores affects
the number of threads typically used by the task engine, which limits the number of concurrently
executing scalaInstance tasks.

In summary, this might affect the first, cold compilation of a multi-module project with
independent leaves on a multi-core machine with Scala version different from the version used
for sbt.  It might increase the maximum permgen requirements as well as slow the jit compilation
by up to one task execution.  Subsequent compilations should be unaffected and the permgen
utilization return to be as expected.
2013-06-19 21:38:06 -04:00
Mark Harrah 9dce57b9fc remove task key definition from the build since it is now in sbt 2013-06-19 17:14:57 -04:00
Mark Harrah cb3df0982f snapshot version for development 2013-06-06 20:06:07 -04:00
Mark Harrah 6cee9d4aa4 0.13.0-Beta2 2013-06-05 23:57:21 -04:00
Mark Harrah a1f9ac3bc1 build with 0.12.4-RC2 2013-06-05 19:55:24 -04:00
Mark Harrah e83038bed4 Fix issue with JLine dependency.
The reported issue was a JLine class not being found on sbt startup.

JLine was depended on in the sbt build in two places, one with an extra
attribute (component) and one without.  The retrieve pattern used by the
launcher includes that extra attribute.  Previously, the dependency
without the attribute was selected and jline properly ended up on the sbt
classpath.  Now, either by bumping JLine to 2.11 or some other
insignificant change, jline ends up in a subdirectory for the component
and doesn't get on the classpath.

(The move in 0.10 away from retrieving based on patterns and
using things directly from the cache was good, but this can't be
used in the launcher until a hash-based artifact is used so that
sbt+Scala jars aren't deleted or overwritten while sbt runs.)

A secondary issue was that the compiler-interface-src artifact didn't have
a configuration and was therefore not included in the published artifacts.
2013-06-03 22:49:48 -04:00
Mark Harrah 138a5ecd20 stamp-version should fail if current version is a release 2013-06-03 10:36:21 -04:00
Mark Harrah 90d7834c86 snapshot version for development 2013-06-03 10:05:26 -04:00
Mark Harrah 19d75ae2f9 preparation for 0.13.0-Beta1 2013-06-01 10:56:30 -04:00
Mark Harrah 16b9f0a925 2.10.2-RC2 2013-05-30 19:22:17 -04:00
Mark Harrah 8d461953d4 snapshot version 2013-05-06 08:28:34 -04:00
Mark Harrah 5b90eee971 0.13.0-M2 2013-05-05 22:34:59 -04:00
Mark Harrah c3a5042f02 drop httpclient dependency, which wasn't actually being used by Ivy 2013-05-05 15:42:15 -04:00
cheeseng 838b737caa Bump up test-interface dependency to version 1.0-SNAP3. 2013-04-22 14:22:12 +08:00
Mark Harrah ebd24e95df back to a snapshot version 2013-03-18 11:47:45 -04:00
Mark Harrah 26d422fd0c 0.13.0-M1 2013-03-18 10:06:37 -04:00
Mark Harrah 6d4da5e394 precompile against Scala 2.9.3 2013-03-18 10:06:24 -04:00
Mark Harrah 6750ef7614 use Scala 2.10.1 final 2013-03-13 12:40:03 -04:00
Mark Harrah 9eb2406e6c Scala 2.10.1-RC3 2013-03-05 17:22:12 -05:00
Mark Harrah 8c4ebabe19 remove JLine from the launcher
It is no longer necessary for it to be loaded in a stable class loader
and line reading in the launcher does not require anything more advanced
than java.io.Console.readLine(String).
Scala versions 2.8 and later use the version that goes through JAnsi
and for that it is sufficient to have JNA in a stable loader.
2013-02-26 09:27:56 -05:00
Mark Harrah 54c08115f6 JLine now has junit in the proper scope, no need for intransitive() 2013-02-26 09:00:18 -05:00
Alex Dupre 92e99cfef0 Switch from JLine 1.0 to 2.10. 2013-02-26 07:39:33 -05:00
jozic 51728d1ad1 switch dispatch to dispatch.classic to avoid collisions with plugins which use newer versions of dispatch (0.9+) 2013-02-19 08:54:56 -05:00
Mark Harrah 67c459b6a2 -Ymacro-no-expand for API docs 2013-02-13 08:13:50 -05:00
Mark Harrah 76e0a941ba Update to 2.10.1-RC1
Needed an explicit type in PMap to workaround an error.
Need to drop tuple assignment of parser.parsed in input task macro as a workaround
  for macro/resetAllAttrs/pattern matching/annotation issue in RC1.
2013-02-13 07:17:20 -05:00
Mark Harrah 7a3a8bb50b Disable -Xlint for scalac. Too many 'Adapting argument list by creating a 2-tuple' warnings. 2013-02-13 03:25:13 -05:00
Mark Harrah c0b1bb51e6 -Xlint 2013-02-04 17:30:31 -05:00
Eugene Yokota 125727ba83 support binary version in launcher 2013-01-29 16:55:13 -05:00