Commit Graph

3667 Commits

Author SHA1 Message Date
Bruno Bieth dcc87bd246 avoid deadlock in ConsoleOut.systemOutOverwrite
System.out can be reset after being captured by `val lockObject`.
Then locking `lockObject` and calling `println()` could lead to a
deadlock.
2013-11-01 13:27:23 -04:00
James Roper b337f3d9ac Flush ObjectOutputStreams after construction
This protects against deadlocks between the writing and reading end,
since the ObjectOutputStream constructor writes a header, but does not
flush, and the ObjectInputStream constructor reads the header, and
blocks until it's read.
2013-11-01 13:26:07 -04:00
Mark Harrah 259bb192cf Docs: use programmatic version in global base directory 2013-10-29 13:21:04 -04:00
Cody Allen a292fd1378 Add SBT version to example path for credentials file
As of sbt 0.13, the credentials won't be found if they aren't within a version directory.
2013-10-29 11:54:48 -04: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
Grzegorz Kossakowski 18a87e61c9 Move TestCallback.scala to a directory matching its package name. 2013-10-29 16:39:50 +01:00
Grzegorz Kossakowski 580c84974a Remove dead source file `F0.scala` from interface subproject.
It doesn't seem to be used anywhere.
2013-10-29 16:39:50 +01:00
Benjy 655e2e5c91 Fix serialization in Sync.
The serialized structures there aren't part of an Analysis,
so they aren't interned.

TODO: Refactor InternedAnalysisFormats so that this is more
straightforward and less error-prone.  This commit is
a first-pass fix of the broken test.
2013-10-28 15:00:17 -04:00
Mark Harrah 1030902207 Changes for 0.13.1-M1 2013-10-28 08:44:23 -04:00
Mark Harrah 7bcc00f637 Merge remote-tracking branch 'gkossakowski/separate-dependency-phase' into 0.13 2013-10-24 16:57:32 -04:00
Mark Harrah 0a2bb3a958 Merge remote-tracking branch 'benjy/interned_files' into 0.13 2013-10-24 16:55:16 -04:00
Mark Harrah c2b319e977 error,warn,info,debug commands to set log level, useful in conjunction with early combinator --. Fixes #806. 2013-10-24 16:34:16 -04:00
Mark Harrah f461b94e73 Fix API comment for State.{+,++} 2013-10-24 16:34:16 -04:00
Mark Harrah ecd3b8843d clean up show command description to use string interpolation 2013-10-24 16:34:16 -04:00
Mark Harrah e93c4450a1 early commands: anything prefixed with -- gets moved to the front of the command sequence on startup 2013-10-24 16:34:16 -04:00
Mark Harrah 86ae3c8c59 Deprecate -, --, and --- in favor of onFailure, sbtClearOnFailure, and resumeFromFailure. 2013-10-24 16:34:16 -04:00
Mark Harrah 4e7f30c893 provide Logger via Keys.sLog for use by settings during project initialization. Ref #806. 2013-10-24 16:34:16 -04:00
Mark Harrah eeb1ce8884 use global logging levels as the default for task logging levels 2013-10-24 16:34:16 -04:00
Mark Harrah 55832b3a03 set global logging levels from project settings if not already explicitly set 2013-10-24 16:34:16 -04:00
Mark Harrah 5498275ebd Track whether global logging levels were set explicitly by the user or not. 2013-10-24 16:34:16 -04:00
Mark Harrah fb1437cf36 Transfer logging,trace levels from old to new global loggers. 2013-10-24 16:34:16 -04:00
Grzegorz Kossakowski 59de0f00b0 Remove long comment that explains phase ordering issues.
As pointed out by @harrah in #705, we might want to merge both API
and dependency phases so we should mention that in the comment explaining
phase ordering constraints instead.

I'd still like to keep the old comment in the history (as separate commit)
because it took me a while to figure out cryptic issues related to
continuations plugin so it's valuable to keep the explanation around in
case somebody else in the future tries to mess around with dependencies
defined by sbt.
2013-10-24 16:44:46 +02:00
Grzegorz Kossakowski e8746dc0c7 Add a bit documentation to Dependency phase.
It gives some high-level overview of what this phase does.
2013-10-24 16:44:45 +02:00
Grzegorz Kossakowski 838416360a Move dependency extraction into separate compiler phase.
This is the first step towards using new mechanism for dependency
extraction that is based on tree walking.

We need dependency extraction in separate phase because the code
walking trees should run before refchecks whereas analyzer phase runs
at the very end of phase pipeline.

This change also includes a work-around for phase ordering issue with
continuations plugin. See included comment and SI-7217 for details.
2013-10-24 16:44:45 +02:00
Grzegorz Kossakowski fea18a4fbe Remove AnalysisCallback.{beginSource, endSource} methods.
As pointed out by @harrah in #705, both beginSource and endSource are
not used in sbt internally for anything meaningful.

We've discussed an option of deprecating those methods but since they
are not doing anything meaningful Mark prefers to have compile-time
error in case somebody implements or calls those methods. I agree with
that hence removal.
2013-10-24 16:44:45 +02:00
Benjy 3d5a348e1a Deprecate AnalysisFormats. 2013-10-23 11:17:51 -04:00
Benjy 8046ad7eec Added some modifiers, per code review comments. 2013-10-23 10:58:44 -04:00
Benjy c66eefcec9 Switch to using the interned serialization format. 2013-10-23 10:41:13 -04:00
Mark Harrah 57306e6257 Better representation of no cross-version suffix in suffix conflict error message. 2013-10-23 09:46:43 -04:00
Mark Harrah 7de1b4bf3d shortcut heterogeneous AList to KList.toList 2013-10-23 09:46:43 -04:00
Mark Harrah 27bd93f601 cleanups in Settings 2013-10-23 09:46:43 -04:00
Mark Harrah 2c441d21f6 drop view for iterator in IMap 2013-10-23 09:46:43 -04:00
Benjy 0b033337df Interned serialization format for Analysis objects. 2013-10-22 13:02:53 -04:00
Ches Martin a93767961c Docs: fix taskKey usage in Custom Settings example
Following commentary on 126f41c0ac
2013-10-22 09:29:35 -04:00
Joachim Hofer 76965895d0 updated links for my plugins that moved to the sbt org on github, added testng plugin 2013-10-20 17:38:31 -04:00
Mark Harrah 11b0c7b3ff Process settings once in SettingGraph for better performance.
Running 'inspect tree sbt/update' on sbt goes from 27 s to <1 s.
Review by @eed3si9n.
2013-10-18 19:56:43 -04:00
Mark Harrah 567551696d Merge remote-tracking branch 'benjy/analysis_test2' into 0.13 2013-10-18 18:38:28 -04:00
Benjy 948a9cf5cc Change how test labels are combined, per code review comments. 2013-10-18 15:34:47 -07:00
Travis f7cd647a2f Filter test options are backwards
The itFilter, defined as integration tests are configured to be run under task 'test' where I think you meant to hav then run under 'fun:test' and vise versa for the unitFilter.
2013-10-18 17:04:40 -04:00
Mark Harrah 9dcb8727d8 New method `toTask` on `Initialize[InputTask[T]]` to apply the full input and get a plain task out. 2013-10-18 16:49:34 -04:00
Mark Harrah e3e95f902d Merge remote-tracking branch 'benjy/analysis_test' into 0.13 2013-10-17 15:17:57 -04:00
Mark Harrah 49f2f9fe1a Merge remote-tracking branch 'benjy/internpool2' into 0.13 2013-10-17 15:17:43 -04:00
Mark Harrah d6ca66d406 Docs: sitemap generator, basic robots.txt. Fixes #916. 2013-10-17 15:00:48 -04:00
Mark Harrah 715a5655ef Deprecate some methods replaced by PathFinder.pair 2013-10-17 15:00:48 -04:00
Benjy da6af7c5f7 Test for Analysis split/merge.
Requires scalacheck generators for Analysis and its subobjects. These
may be useful for other tests in the future.

Also fixes a bug in RelationTest.
2013-10-17 11:56:10 -07:00
Mark Harrah 4506c8b877 remove dead APIFormats code 2013-10-16 19:26:26 -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 7b7e642393 Docs: minor fixes 2013-10-16 19:26:19 -04:00
Benjy 9c380a9f1f An intern pool implementation, and associated serialization formats. 2013-10-15 13:26:20 -07:00
Mark Harrah 689f3e18e4 Merge remote-tracking branch 'benjy/analysis2' into 0.13 2013-10-15 15:20:27 -04:00