Commit Graph

4582 Commits

Author SHA1 Message Date
Eugene Yokota 081a9868ce Adds a scripted test that tests repo override 2016-04-24 14:24:05 -04:00
Eugene Yokota 411e5f6c69 Remove unnecessary warning message 2016-04-24 14:24:05 -04:00
Eugene Yokota 84e7244e4e Fix #2519. Fixes Maven Central getting included even with repo override 2016-04-24 14:24:05 -04:00
eugene yokota 6a0c5c6a3e Fixes #2573 (#2574) Fixes dependency-management /cached-resolution-configurations
Ref #2513, #2435
2016-04-24 13:28:28 -04:00
eugene yokota 265cbd78b1 Fixes #2480. Workaround for Jline regression (#2570)
Workaround jline/jline2#205
2016-04-23 23:56:25 -04:00
eugene yokota 40644aedab Merge pull request #2513 from Duhemm/wip/fix-2435
Fix for sbt/sbt#2435
2016-04-22 02:37:09 -04:00
eugene yokota b10414da73 Merge pull request #2564 from Duhemm/wip/fix-2518
Off-the-grid installation of sbt
2016-04-20 16:53:19 -04:00
eugene yokota ce611fbdca Merge pull request #2563 from eed3si9n/wip/macro-nonarg-dep
Fixes incremental compiler missing member ref from macro expansion sbt/sbt#2560
2016-04-19 10:57:25 -04:00
Eugene Yokota c971d7f45c Fix sbt/sbt#2560
traverse(tree: Tree) used to call super.traverse(tree) at the end.
sbt/sbt@0f616294c4 brought the traversing
call to inside of the pattern matching.
For the case of MacroExpansionOf(original), it amounts to not traveling
the macro-expanded code. See
sbt/src/sbt-test/source-dependencies/macro-nonarg-dep for the repro.
2016-04-18 14:12:36 -04:00
Eugene Yokota 8c819fea6d Reproduce sbt/sbt#2560
Unlike other scripted macro tests, the call site of this macro is
`Provider.tree(0)`, which does not introduce internal member reference.
Instead the macro itself calls `Bar.bar(0)`. Due to #2560, the expanded
tree is not traversed, and thus the reference to `Bar` is not caught
during incremental compilation.
2016-04-18 14:12:36 -04:00
Eugene Yokota 6b16ade94b Adding sleep in scripted test to make sure timestamp bumps
Fixes #2546. Ref #958
scripted compiler-project/error-in-invalidated has been failing
frequently on Travis CI. It seems like incremental compiler is not
catching the change in source occasionally for `changes/A2.scala`.
2016-04-18 12:15:54 -04:00
Martin Duhem 3b5ab05147 Don't hardcode sbt version in static launcher 2016-04-18 09:41:21 +02:00
Martin Duhem 03c02ec2e0 Add compiler bridge sources to fake resolver
This allows sbt to resolve the compiler bridge sources when using the
static launcher
2016-04-18 09:36:14 +02:00
Martin Duhem 81e350325e Fix NPE in FakeResolver 2016-04-15 16:25:52 +02:00
Martin Duhem 175ece4238 Remove `CompilerBridgeProvider` and `ResourceBridgeProvider`
It turns out that we can leverage the`FakeResolver` that has been
implemented to use with the static launcher, and resolve a "fake
compiler bridge" using it, rather than copying it from the resources.

This also has the advantage of not requiring to change the build
definition.
2016-04-15 08:35:27 +02:00
Martin Duhem bcb11cc4a7 Restarting the build... 2016-04-13 13:21:35 +02:00
Martin Duhem 2165c347c1 Re-enable caching and updating minigraph in cached resolution 2016-04-11 10:06:13 +02:00
Martin Duhem 1d44420c91 Comply to Ivy's specification in `FakeResolver` 2016-04-11 09:48:42 +02:00
Martin Duhem fab20c73bf Add `scala-reflect.jar` to JARs of `StaticScalaProvider`
It turns out we need to have `scala-reflect.jar` on classpath to compile
the compiler bridge for the static scala instance of the launcher.
2016-04-11 09:14:37 +02:00
Martin Duhem 6beb8f2c85 Tests for FakeResolver 2016-04-11 09:14:35 +02:00
eugene yokota c35cb7f54e Merge pull request #2542 from eed3si9n/wip/ivypath
Add toString to IvyPaths for debugging purpose
2016-04-06 15:16:10 -04:00
eugene yokota ba72faab35 Merge pull request #2540 from eed3si9n/wip/synthetic
Adds withIncludeSynthToNameHashing.
2016-04-06 13:48:57 -04:00
Eugene Yokota e065df9610 Add toString to IvyPaths for debugging purpose 2016-04-06 12:29:37 -04:00
Eugene Yokota 9458eb6428 Fixes test 2016-04-06 11:26:17 -04:00
Martin Duhem 88dd987d5f Fix classpath issues in static launcher
The launcher defines a top classloader that willbe used by all
`ScalaInstance`s. Previously, this top classloader had a parent that
contained the scala library 2.10, which prevented the correct
compilation of the compiler bridge for scala 2.11.

Also, we no longer need the scala-reflect JAR.
2016-04-06 15:21:01 +02:00
Martin Duhem b8472668ff Static launcher, get bridge sources from resources
This commit introduces a new "static" launcher that does not use Ivy to
gather all the artifacts that it requires, but rather expect them to be
immediately available.

To be able to use sbt without Internet access, we add a new
`ComponentCompiler` that is able to retrieve the bridge sources from the
resources on classpath and compile it.
2016-04-06 12:01:34 +02:00
Eugene Yokota c75a386a82 Adds withIncludeSynthToNameHashing. Ref #2537
Provides a workaround flag `incOptions :=
incOptions.value.withIncludeSynthToNameHashing(true)` for name hashing
not including synthetic methods. This will not be enabled by default in
sbt 0.13. It can also enabled by passing `sbt.inc.include_synth=true`
to JVM.
2016-04-05 22:57:59 -04:00
Eugene Yokota 36293f7400 scalariform changed this. 2016-04-05 22:52:05 -04:00
eugene yokota bc70ec0492 Merge pull request #2169 from Duhemm/scripted-local-repo
Publish compiler interface to an alternate local repository for Scripted tests
2016-04-05 13:16:34 -04:00
Martin Duhem 5b0c9aa938 Add alternative resolver to scripted test using a plugin 2016-04-05 17:33:51 +02:00
Martin Duhem 8318ff9b63 Publish compiler interface to alternate repo for Scripted
Some scripted tests override the default local repository, which
produces errors with the compiler because sbt cannot find the sources
for the compiler interface.

This fix proposes to publish the compiler interface sources to an
alternate local repository before running the scripted tests. This
alternate repository is added to the scripted sbt's configuration, so
that sbt is finally able to find the compiler interface sources.
2016-04-05 17:33:51 +02:00
Martin Duhem cb4500f085 Auto format `Tracked.scala` 2016-04-04 13:35:06 +02:00
eugene yokota 6125cf596c Merge pull request #2530 from dwijnand/deprecate-Build
Deprecate the Build trait
2016-04-01 10:14:08 -04:00
Dale Wijnand f2f12022a5 Deprecate the Build trait 2016-03-31 16:47:12 +01:00
eugene yokota 9d666c5ad0 Merge pull request #2507 from gkossakowski/self-variable-unstable
Fix instability of self variable API representation
2016-03-18 12:50:01 -04:00
Martin Duhem b95b0e5628 Use configuration of evicted nodes with cached resolution
Consider a configuration where we have two projects, A and B.

A has a library dependency on "a" % "b" % "1.0.0" % "compile->runtime"
and "a" % "b" % "1.0.0" % "compile->runtime2"

B depends on project A, and has a library dependency on
"a" % "b" % "1.0.1" % "compile->runtime".

Note that project B depends on a more recent version of "a" % "b" than
project A, and that it depends ONLY on it's "runtime" configuration.

However, when compiling project B, we expect to have on the classpath
project A, and "a" % "b" % "1.0.1" % "compile->runtime" AND
"a" % "b" % "1.0.1" % "compile->runtime2" because it is part of the
compile configuration of project A.

This commit changes the cached resolution engine so that it behaves like
that, by first resolving dependencies on other project and then ensuring
that the dependent project specifies dependencies on the same
configurations.

Mark test dependency-management/cached-resolution-configurations as
passing.
2016-03-14 15:59:14 +01:00
Martin Duhem c338e87d0a Pending test for sbt/sbt#2435 2016-03-14 15:58:27 +01:00
eugene yokota 575bc12e00 Merge pull request #2500 from Duhemm/wip/fix-2431
Fix sbt/sbt#2431
2016-03-14 10:18:19 -04:00
Martin Duhem 1e96936c08 Create default artifact for deps from POM files
Dependency descriptors that are created from POM files do not specify
their artifacts. In those cases, it is correct to create a default
artifact.
2016-03-14 08:51:25 +01:00
Grzegorz Kossakowski f848b69534 Add more test cases for self type and self variables.
Per review request, add two more test cases for self variable (no self
type).
2016-03-09 00:58:28 +01:00
Grzegorz Kossakowski a6ae339515 Fix instability of self variable API representation
The reason for instability is a bit tricky so let's unpack what the
previous code checking if there's self type declared was doing. It would
check if `thisSym` of a class is equal to a symbol representing the class.
If that's true, we know that there's no self type. If it's false, then
`thisSym` represents either a self type or a self variable. The second
(type test) was supposed to check whether the type of `thisSym` is
different from a type of the class. However, it would always yield false
because TypeRef of `thisSym` was compared to ClassInfoType of a class.
So if you had a self variable the logic would see a self type (and that's
what API representation would give you).

Now the tricky bit: `thisSym` is not pickled when it's representing just
a self variable because self variable doesn't affect other classes
referring to a class. If you looked at a type after unpickling, the
symbol equality test would yield true and we would not see self type when
just a self variable was declared.

The fix is to check equality of type refs on both side of the type equality
check. This makes the pending test passing.

Also, I added another test that checks if self types are represented in
various combinations of declaring a self variable or/and self type.

Fixes #2504.
2016-03-08 22:24:26 +01:00
Grzegorz Kossakowski d7eee101d0 Add a pending test for self variable bug (#2504)
Add a pending test that shows a problem with instability of representing
self variables. This test covers the bug described in #2504.

In order to test API representation of a class declared either in source
file or unpickled from a class file, ScalaCompilerForUnitTesting has been
extended to extract APIs from multiple compiler instances sharing a
classpath.
2016-03-08 20:42:11 +01:00
Grzegorz Kossakowski abc525a23d Compiler instances handling in ScalaCompilerForUnitTesting
This commit enables control of whether a compiler instance should be reused
between compiling groups of Scala source files. Check comments in the code
for why this can be useful to control.
2016-03-08 20:32:16 +01:00
Martin Duhem fed478cc6b Check that default artifact exists when trying to retrieve it.
When concatenating the artifacts coming from two modules, we sometimes
attempted to create a default artifact from the organization and name of
the module.

However, this may fail because a module a % b "1.0" may not have an
artifact named "b.jar" (see sbt/sbt#2431).

Fixes sbt/sbt#2431.
2016-03-07 11:44:34 +01:00
Martin Duhem 2986a3bcbb Pending test for sbt/sbt#2431 2016-03-07 11:37:39 +01:00
Dale Wijnand 884da06170 Merge pull request #2469 from Duhemm/wip/fix-2460
Completion for build-level keys
2016-02-25 19:11:36 +00:00
Martin Duhem 791358abb0 Notes for #2469 2016-02-25 16:09:17 +01:00
eugene yokota 65201a578b Merge pull request #2474 from dwijnand/bump-versions
Bump to 0.13.12-SNAPSHOT & 0.13.11
2016-02-23 10:28:25 -05:00
Martin Duhem 1bda41fc31 Address problems reported by Codacy 2016-02-23 15:19:04 +01:00
Martin Duhem 4fea604759 Unspecified project axis means current project or its build 2016-02-23 15:11:16 +01:00