Commit Graph

3667 Commits

Author SHA1 Message Date
Mark Harrah d2f063c3b9 implicit-search-higher-kinded test did not require higher kinds- it tests the companion scope search 2013-02-28 08:56:58 -05:00
Grzegorz Kossakowski 7cca5422c4 Test case for dependencies involving implicits and higher-kinds.
This is a pending test case for sbt/sbt#686 which tests if dependencies
are track properly when it comes to implicit scope.

This test is marked as pending because sbt does not track
dependencies correctly in this case.
2013-02-28 08:49:26 -05:00
Grzegorz Kossakowski bda87c14f0 Compile-time constant dependency tracking moved to separate test.
The `final` modifier is not essential in `source-dependencies/export-jars`
and removing it eliminates the danger of running into Scala's bug SI-7173
where typer inlines constants and does not record any information about
dependency. In case we want to switch to dependency tracking based on
trees we would run into this problem in this test-case.

Testing for that scenario has been moved to separate test case
`source-dependencies/constants`.
2013-02-28 08:31:04 -05:00
Grzegorz Kossakowski d5228c592a Document why sleeps are needed in `export-jars` test.
Git blaming reveals the intent of sleeping after file modification
that was described in 02f666ec0e commit.
Let's put it straight into source code.

Also, added a new lines before each sleep command to better signal
the pause.
2013-02-28 08:31:03 -05:00
Grzegorz Kossakowski f9940fc430 Upgrade `source-depdencies/macro` test.
Switched to current version of Scala that sbt itself uses in
`source-dependencies/macro` test. Since sbt is on Scala 2.10 now
we can do that.

Adjusted test-case to current API for macros.
2013-02-28 08:31:03 -05:00
Grzegorz Kossakowski 3cc0c74862 Mark `source-dependencies/import` test as pending.
Instead of commenting out failing part of a test case just mark
the whole test case as pending.
2013-02-28 08:30:55 -05:00
Juan Manuel Caicedo Carvajal 0ca2ae5843 Updated the host name used for publishing artifacts to the community repository. 2013-02-28 08:30:45 -05:00
Mark Harrah 3e32c7d1f1 changes needed for tests for jline 2.10 2013-02-26 09:27:57 -05:00
Mark Harrah 45aae0cdc6 add Jline.createReader() back for source compatibility 2013-02-26 09:27:56 -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
Mark Harrah 1870edfd27 more deprecations 2013-02-26 07:39:23 -05:00
Mark Harrah 29a26a13ab Custom implementation of Streams can be bound to Keys.stateStreams in State. 2013-02-25 09:24:05 -05:00
Mark Harrah f30953ea4d ManagedStreams cannot be sealed if Streams is to be externally implemented 2013-02-25 09:24:05 -05:00
Mark Harrah 0cf702efd5 Move GlobalLogBacking.newLogger to GlobalLogging to make the role of GlobalLogBacking clearer. 2013-02-25 09:24:05 -05:00
Mark Harrah 6350a4b51d make GlobalLogging.backed less specific: AbstractLogger is fine 2013-02-25 09:24:05 -05:00
Mark Harrah e32f5fec1f hashCode for TestDefinition 2013-02-25 09:24:05 -05:00
Mark Harrah ca5b5aa796 test case to verify dependencies on unused but visited identifiers are tracked 2013-02-25 09:24:04 -05:00
Mark Harrah f6d73128fc deprecations 2013-02-25 09:24:04 -05:00
Mark Harrah a61421dcb8 Split ConsoleOut into its own file, track the global ConsoleOut and use it instead of StandardMain.console 2013-02-25 09:24:04 -05:00
Mark Harrah 9492a6b433 Docs: fix note about built-in support for test frameworks 2013-02-25 09:24:04 -05:00
Mark Harrah a1c70c7462 Include jars from java.ext.dirs in incremental classpath. Fixes #678.
Ideally, we wouldn't need to construct the classpath ourselves and instead
reuse the classpath construction code from a compiler (scalac or javac).
However, we need to ensure that we only call the compiler when needed.
Because we need to construct the classpath even when compilation might
not happen, we have to duplicate classpath construction.
2013-02-22 16:31:32 -05:00
Mark Harrah 010b9d1c10 test for #678 2013-02-22 16:31:32 -05:00
Mark Harrah 6e30bd7842 short-circuit the macro check in the incremental compiler if the source isn't a Scala source file 2013-02-22 16:31:32 -05:00
Mark Harrah 68443fc047 minor improvement to use stripSuffix in DotGraph 2013-02-22 16:31:32 -05:00
Grzegorz Kossakowski 4c261d360f Revert "Revert "Fix sbt/sbt#676: swapped declarations and members in `ClassToAPI`.""
This reverts commit 9dd5f076ea which was a revert
itself so we are back to the state before those two reverts.

The problem that caused revert that happened in 9dd5f076ea
has been fixed in 88061dd262.
2013-02-22 07:36:55 -05:00
Grzegorz Kossakowski 129df3e812 Fix problem with initialization order in `ClassToAPI.scala`.
In `ClassToAPI` both `Private` and `Protected` vals had forward
reference to `Unqualified` so they would get `null` as a result.
Fixed that by rearranging the order of vals being declared.

This fixes a problem described in 9dd5f076ea.
2013-02-22 07:36:55 -05:00
Mark Harrah 76ebc3a01d force test definition sequences to fix tests/order 2013-02-21 20:45:07 -05:00
Mark Harrah 0a912f32a6 fix project/source-plugins test 2013-02-21 20:45:07 -05:00
Mark Harrah 9dd5f076ea Revert "Fix sbt/sbt#676: swapped declarations and members in `ClassToAPI`."
This reverts commit beb87f2789.  It causes java/options to fail.

CC @gkossakowski
2013-02-21 20:44:54 -05:00
Mark Harrah 5b5577a187 Replace Scala jars in UpdateReport with ScalaProvider jars in more situations. Fixes #661.
Specifically, when the Scala version for sbt is the same as that for the project being built,
the jars in UpdateReport should be the same as those in ScalaProvider.  This is because the
loader will come from the ScalaProvider, which uses jars in the boot directory instead of the
cache.  The first part of the fix for #661 checks that loaded classes come from the classpath
and so they need to line up.
2013-02-21 20:44:26 -05:00
Mark Harrah bd0f208302 Class loader that restricts loading to a classpath. Ref #661.
It is now used for consoleProject, run, and test.  This loader verifies
that all classes loaded through it came from a particular classpath or
from the "root" loader.  Root loader here is the launcher loader so that
those classes with native bindings come from that shared loader.
2013-02-21 20:44:26 -05:00
Mark Harrah cdf61683df Remove unused class loader implementations 2013-02-21 20:44:26 -05:00
Mark Harrah 98b40b7885 Revert "outputStrategy does not apply to test tasks"
This reverts commit 6c6d86d5ce.

It does now.
2013-02-21 20:44:26 -05:00
Mark Harrah 98e2662bc4 Make full set of ForkOptions configurable for both run and test. Fixes #665.
Environment variables may be passed by configuring the envVars task.
2013-02-21 20:44:26 -05:00
Grzegorz Kossakowski 5119ea2574 Mark inherited definitions in `ShowAPI`.
Mark every inherited definition with `^inherited^` marker. This helps
understanding `ShowAPI`s output.
2013-02-20 10:52:28 -05:00
Grzegorz Kossakowski f101bcd3d0 Show some of inherited members of a structure in `ShowAPI.scala`
Showing inherited members of a structure was disabled so we would not
run into cycles. To best of my knowledge, we can run into cycles only
if inherited member is `ClassLike`. We filter out those and let
anything else to be shown.
2013-02-20 10:52:27 -05:00
Grzegorz Kossakowski beb87f2789 Fix sbt/sbt#676: swapped declarations and members in `ClassToAPI`.
As described in sbt/sbt#676, arguments to `mergeMap` and `merge` methods
were swapped causing wrong structures being created for Java compiled
class files.

This commit fixes sbt/sbt#676 and makes pending test to pass now.
2013-02-20 10:52:27 -05:00
Grzegorz Kossakowski 289d031466 Add a pending test-case for showing circular api structures.
This test should pass because `ShowAPI` skips inherited members but
due to sbt/sbt#676 it fails with StackOverflowError.

This makes it a decent test-case for both showing circular api structures
and for the aforementioned bug itself.
2013-02-20 10:52:27 -05:00
Grzegorz Kossakowski f885458f37 Do not minimize APIs if API debugging option is enabled.
That's foundation for API dumping and tests based on API representation contents.

Specific list of changes introduced by this commit:
  * `AnalysisCallback` class takes `IncOptions` as argument so it
    can determine if API should be minimized in `api` callback.
  * Introduce `Incremental.apiDebug` method that determines if api debugging
    is enabled. There are two ways to enable api debugging: through system
    property and through incremental compiler options. The system property
    method will be soon deprecated. We introduce it to make it easier to enable
    API debugging until tools (like zinc and ide) catch up with making incremental
    compiler configurable.

NOTE: The `apiDebug` method has been introduced in Incremental for two reasons:
  1. It's analogous to `incDebug` method that's already there.
  2. In other branch I need `apiDebug` to be defined in Incremental.

Once we deprecate and remove enabling debugging options through system properties
the code will be cleaned up.
2013-02-20 10:52:27 -05:00
Mark Harrah e06ada8fb7 Add help for ++ and + commands 2013-02-19 14:33:22 -05:00
Mark Harrah 2047849b50 remove deprecated command strings 2013-02-19 14:33:22 -05:00
Mark Harrah 824f10aa9a better error message when help search syntax isn't a valid java.util.regex 2013-02-19 14:33:22 -05:00
Mark Harrah cbaef8a6f8 Use Ivy's default name for the resolution report.
Ivy hardcodes the resolution report name in the stylesheet that renders the
HTML from the XML report.  This means that the links to other configurations
are broken when using a custom name.
2013-02-19 14:33:22 -05:00
Grzegorz Kossakowski f3d2df0f9c Use `IncOptions` for `transitiveStep` and `recompileAllFraction`
Recently introduced IncOptions allow us to make both transitiveStep
and recompileAllFraction configurable in incremental compiler.
2013-02-19 12:23:07 -05:00
Grzegorz Kossakowski 70036812ab Introduce incremental compiler options.
Introduce a way to configure incremental compiler itself instead
of underlying Java/Scala compiler.

Specific list of changes in this commit:
  * Add a method to `xsbti.compile.Setup` that returns incremental
    compiler options as a `java.util.Map<String, String>`. We considered
    statis interface instead of a `Map` but based on mailing
    list feedback we decided that it's not the best way to go because
    static interface is hard to evolve it by adding new options.
  * Since passing `java.util.Map<String, String>` not very convenient
    we convert it immediately to `sbt.inc.IncOptions`
  * Add options argument to various methods/classes that implement
    incremental compilation so in the end options reach
    `sbt.inc.IncOptions` object
  * Add `incOptions` task that allows users to configure incremental
    compiler options in their build files. Default implementation of
    that tasks returns just `IncOptions.DEFAULT`
  * Both system property `xsbt.inc.debug` and `IncOptions.relationsDebug`
    trigger debugging of relations now. In the near future, we should
    deprecate use of `xsbt.inc.debug`.
2013-02-19 12:23:07 -05:00
Grzegorz Kossakowski 4fe0c02536 Break long argument list into multiple lines.
Some methods take a lot of arguments and I'm about to add one more
which will make them too long for easy reading.

This change is changes code formatting only. That's done on purpose
to make it easier to review other changes.
2013-02-19 12:18:26 -05:00
Grzegorz Kossakowski d6f4c5ae4f Strip down trailing whitespace.
I have Eclipse configured to do that automatically when saving file.
I decided to finally commit those changes to files I touch a lot.
2013-02-19 12:18:26 -05:00
Jan Niehusmann f9059849df Fix link to sbt-git plugin
The old url https://github.com/sbt/sbt-git-plugin resulted in an 404 error. Changed to https://github.com/sbt/sbt-git which seems to be the correct url for that plugin.
2013-02-19 09:30:38 -05:00