Commit Graph

4599 Commits

Author SHA1 Message Date
Eugene Yokota 84f8cc447d Remove unnecessary val 2016-05-25 03:51:53 -04:00
Eugene Yokota f9b1583251 Cache based on the underlying URLs of the ClassLoader per review 2016-05-25 03:51:12 -04:00
Eugene Yokota c67b3881de Display log when sbt loading is going to pause
Def.make could take 10099ms for 100 subprojects. This would display
logs probably for projects with more than 10 subprojects, which might
pause for a few seconds during load.
2016-05-25 01:51:07 -04:00
Eugene Yokota 0f43d21e72 Improve structureIndex call by using Vector
This call takes around 8035ms for 100 subprojects. I don't think using
Vector here had any noticeable effect.
2016-05-25 01:49:23 -04:00
Eugene Yokota ed0c82de7f Cache global user settings 2016-05-25 01:12:49 -04:00
Eugene Yokota 511737c828 Add perf logs 2016-05-25 01:11:47 -04:00
eugene yokota 9849dff643 Merge pull request #2628 from Duhemm/wip/workaround-2620
Workaround for sbt/sbt#2620
2016-05-24 10:26:29 -04:00
Martin Duhem 2b9fd13096 Workaround for sbt/sbt#2620 2016-05-24 10:25:24 +02:00
eugene yokota 74510bc0a9 Merge pull request #2603 from ekrich/wip/native-script
Add Windows script support and native file extensions on Unix platforms
2016-05-10 23:15:59 -04:00
ekrich fd5f87e7b4 Add Windows script support and native file extensions on Unix platforms
When running a sbt script, this change lets the user on UNIX and
Windows platforms to use native file extensions like none/.sh or
.bat/.cmd. The code copies the file to the sbt boot/hash/src_managed
directory with a .scala extension.
2016-05-10 12:32:32 -07:00
ddworak b98fdf7cfa fix typos 2016-05-07 17:58:42 -04:00
eugene yokota 1880173c7c Merge pull request #2557 from smarter/simplify/value-class
[BPORT] Simplify value class API handling and fix #2497
2016-05-04 11:01:40 -04:00
eugene yokota 74d8a574d1 Merge pull request #2583 from eed3si9n/wip/2523
Disable scripted test for source-dependencies/as-seen-from-b
2016-05-04 10:20:50 -04:00
Eugene Yokota 4aaf658944 Disable #2523 testing for now 2016-05-03 22:48:21 -04:00
eugene yokota bc5451438e Merge pull request #2569 from eed3si9n/wip/mavenrepobug
Fixes Maven Central getting included even with repo override
2016-04-24 16:53:19 -04:00
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
Guillaume Martres aab822c595 Simplify value class API handling and fix #2497
This is a backport of sbt/zinc#95

The previous approach to value class API (introduced by #2261 and
refined by #2413 and #2414) was to store both unerased and
erased signatures so that changes to value classes forced
recompilations.
This is no longer necessary thanks to #2523: if a class type is
used, then it becomes a dependency of the current class and its name is
part of the used names of the current class. Since the name hash of a
class changes if it stops or start extending AnyVal, this is enough to
force recompilation of anything that uses a value class type. If the
underlying type of a value class change, its name hash doesn't change,
but the name hash of `<init>` changes and since every class uses the name
`<init>`, we don't need to do anything special to trigger recompilations
either.
2016-04-20 22:57:05 +02: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
Guillaume Martres cae569b313 Include used types in the set of used names
This is a backport of https://github.com/sbt/zinc/pull/87

When `B2.scala` replaces `B.scala` in the new test
`types-in-used-names-a`, the name hash of `listb` does not change because
the signature of `C.listb` is still `List[B]`, however users of
`C.listb` have to be recompiled since the subtyping relationships of its
type have changed.

This commit does this by extending the definition of "used names" to
also include the names of the types of trees, even if these types
do not appear in the source like `List[B]` in `D.scala` (since `B` has
been invalidated, this will force the recompilation of `D.scala`).

This commit does not fix every issue with used types as illustrated by
the pending test `types-in-used-names-b`, `B.scala` is not recompiled
because it uses the type `T` whose hash has not changed, but `T` is
bounded by `S` and `S` has changed, so it should be recompiled.
This should be fixable by including the type bounds underlying a
`TypeRef` in `symbolsInType`.

The test `as-seen-from-a` that did not work before shows that we may not
have to worry about tracking prefixes in `ExtractAPI` anymore, see the
discussion in sbt/zinc#87 for more information.
2016-04-20 18:27:21 +02: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