-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge 1.0.x into 1.x #455
Merge 1.0.x into 1.x #455
Commits on Sep 5, 2017
-
Fix ConsoleInterface binding things properly^2
Follow-up on sbt#314 - I _still_ misinterpreted.. Turns out the ".asInstanceOf[AnyRef].getClass.getName" implementation was the _original_ implementation. Then Mark switched to using bindValue in sbt/sbt@4b8f0f3. Since Scala 2.11.0 (scala/scala#1648 in particular) bindValue was removed. So we'll use NamedParam and quietBind, both which exist since Scala 2.9.0. Fixes sbt/sbt#2884, tested with local releases.
Configuration menu - View commit details
-
Copy full SHA for 33d2e68 - Browse repository at this point
Copy the full SHA 33d2e68View commit details
Commits on Sep 8, 2017
-
Merge pull request sbt#386 from dwijnand/consoleProject
Fix ConsoleInterface binding things properly^2
Configuration menu - View commit details
-
Copy full SHA for 25ad019 - Browse repository at this point
Copy the full SHA 25ad019View commit details
Commits on Sep 25, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 372d32f - Browse repository at this point
Copy the full SHA 372d32fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 50b00c7 - Browse repository at this point
Copy the full SHA 50b00c7View commit details -
make LoggedReporter fields lazy
I get NPE when I extend ManagedLoggedReporter if I don't do this.
Configuration menu - View commit details
-
Copy full SHA for 264ffc5 - Browse repository at this point
Copy the full SHA 264ffc5View commit details -
Merge pull request sbt#413 from eed3si9n/wip/LoggedReporter
neo-sbt-scalafmt and making LoggedReporter extensible
Configuration menu - View commit details
-
Copy full SHA for 30c9bb4 - Browse repository at this point
Copy the full SHA 30c9bb4View commit details
Commits on Oct 9, 2017
-
Move REPL related xsbti Java to correct module
xsbti Java classes were ported into compiler bridge, instead of the compiler interface by mistake. Since there's not code utilizing this interface yet, this was never caught.
Configuration menu - View commit details
-
Copy full SHA for e2896e1 - Browse repository at this point
Copy the full SHA e2896e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 505ac2e - Browse repository at this point
Copy the full SHA 505ac2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f2e2bf2 - Browse repository at this point
Copy the full SHA f2e2bf2View commit details
Commits on Oct 10, 2017
-
Merge pull request sbt#425 from eed3si9n/wip/repl
Move REPL related xsbti Java classes to the correct module
Configuration menu - View commit details
-
Copy full SHA for 291cefa - Browse repository at this point
Copy the full SHA 291cefaView commit details
Commits on Oct 12, 2017
-
Fix source-dependencies/sealed
sealed test used to be implemented with `-> compile` in sbt/sbt but was marked pending in 8e65c00. This changes back to the original state.
Configuration menu - View commit details
-
Copy full SHA for 456e071 - Browse repository at this point
Copy the full SHA 456e071View commit details -
Add trait-trait-212 for Scala 2.12.3
This commit proves that the error only exists with 2.11.x.
Configuration menu - View commit details
-
Copy full SHA for 6a829c2 - Browse repository at this point
Copy the full SHA 6a829c2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 91c0a69 - Browse repository at this point
Copy the full SHA 91c0a69View commit details -
Fixes undercompilation on inheritance on same source
### background In sbt 0.13 days, we could ignore the relationship between two classes defined in the same `*.scala` source file, because they will be compiled anyway, and the invalidation was done at the source file level. With class-based namehashing, the invalidation is done at the class level, so we can no longer ignore inheritance relationship coming from the same source, but we still have old assumptions scattered around the xsbt-dependency implementation. ### what we see without the fix ``` [info] Compiling 1 Scala source to ... .... [debug] [inv] internalDependencies: [debug] [inv] DependencyByInheritance Relation [ [debug] [inv] xx.B -> gg.table.A [debug] [inv] xx.Foo -> xx.C [debug] [inv] ] [debug] [inv] DependencyByMemberRef Relation [ [debug] [inv] xx.B -> gg.table.A [debug] [inv] xx.Hello -> gg.table.A [debug] [inv] xx.Foo -> xx.C [debug] [inv] ] .... Caused by: java.lang.AbstractMethodError: xx.Foo.buildNonemptyObjects(II)V ``` First, we see that `xx.C -> xx.B DependencyByInheritance` relationship is missing. Second, the error message seen is `java.lang.AbstractMethodError` happening on `xx.Foo`. ### what this changes This change changes two if expressions that was used to filter out dependency info coming from the same source. One might wonder why it's necessary to keep the local inheritance info, if two classes involved are compiled together anyways. The answer is transitive dependencies. Here's likely what was happening: 1. `gg.table.A` was changed, 2. causing `xx.B` to invalidate. 3. However, because of the missing same-source inheritance, it did not invalidate `xx.C`. 4. This meant that neither `xx.Foo` was invalidated. 5. Calling transform method on a new `xx.Foo` causes runtime error. By tracking same-source inheritance, we will now correctly invalidate `xx.C` and `xx.Foo`. I think the assumption that's broken here is that "we don't need to track inheritance that is happening between two classes in a same source." ### Is this 2.11 only issue? No. The simple trait-trait inheritance reproduction alone will not cause problem in Scala 2.12 because of the [compile-to-interface](http://www.scala-lang.org/news/2.12.0/#traits-compile-to-interfaces) traits. However, not all traits will compile to interface. This means that if we want to take advantage of the compile-to-interface traits, we still should keep track of the same-source inheritance, but introduce some more logic to determine whether recompilation is necessary. Fixes sbt#417
Configuration menu - View commit details
-
Copy full SHA for 05482d1 - Browse repository at this point
Copy the full SHA 05482d1View commit details -
source-dependencies / patMat-scope workaround
`source-dependencies / patMat-scope` passes locally for me. The invalidation on the CI is likely caused by: ``` [debug] Recompiling all 3 sources: invalidated sources (2) exceeded 50.0% of all sources ``` This attempts to workaround that by adding more source. This does not affect the fidelity of the original test.
Configuration menu - View commit details
-
Copy full SHA for 9403160 - Browse repository at this point
Copy the full SHA 9403160View commit details -
Merge pull request sbt#424 from eed3si9n/wip/417
Fixes undercompilation on inheritance on same source
Configuration menu - View commit details
-
Copy full SHA for 1a7dc5d - Browse repository at this point
Copy the full SHA 1a7dc5dView commit details
Commits on Oct 13, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 03e4119 - Browse repository at this point
Copy the full SHA 03e4119View commit details -
Fix sbt#127: Use
unexpanded
name instead ofname
It looks like scalac encodes access rights of objects in their names. To make sure that we get the right simple names, we need to use `unexpandedName` instead of `name` which will decipher these access rights and return their simple names insted (with all the previous `$$` prefixes stripped out).
Configuration menu - View commit details
-
Copy full SHA for 6dc7586 - Browse repository at this point
Copy the full SHA 6dc7586View commit details
Commits on Oct 16, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 797855f - Browse repository at this point
Copy the full SHA 797855fView commit details -
Merge pull request sbt#431 from scalacenter/issue-127
Fix sbt#127: Use unexpanded names
Configuration menu - View commit details
-
Copy full SHA for aa1a628 - Browse repository at this point
Copy the full SHA aa1a628View commit details
Commits on Oct 22, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 045f194 - Browse repository at this point
Copy the full SHA 045f194View commit details -
Improve and make scripted parallel
These are the improvements that I've added to scripted: 1. Scripted is now parallel and does batch execution. 2. Scripted logs to both a file and the console (if `bufferLog == true`). All the logs can be inspected locally by going to a directory in `/tmp`. This directory is shown to the user at the end of the execution. 3. Scripted UI has been improved. 3.1. Colors are used for `+` and `x`. 3.1. It shows the command that actually failed, not `Command failed {line 1}`. 3.2. It trims the stack traces of the wrapping exceptions (corresponding to the scripted infrastructure). Only the stack traces of the causing exceptions are shown (which are the ones we're interested in and are usually assertion errors). I think these improvements enhance the current dev workflow considerably. I invite you to give them a try. This change combined with sbt#429, gives a really fast execution of scripted. Testing just one test is under 7 seconds in my machine (note that in those 7 seconds we have to fetch the bridge, etc).
Configuration menu - View commit details
-
Copy full SHA for 6c2c325 - Browse repository at this point
Copy the full SHA 6c2c325View commit details
Commits on Oct 25, 2017
-
Merge pull request sbt#441 from scalacenter/issue-436
Fix sbt#436: Remove annoying log4j scripted exception
Configuration menu - View commit details
-
Copy full SHA for ee74feb - Browse repository at this point
Copy the full SHA ee74febView commit details
Commits on Oct 26, 2017
-
Ignore null in generic lambda tparams
`Method.getGenericParameterType` may sometimes return `null` for the return types when the method's return type is indeed generic. It's not clear yet where this "sometimes" happens, but it looks like the JDK is not able to tell the return type of a lambda returning the generic class. This can be seen in the `java-lambda-typeparams` scripted test. In this context, lambda metafactory synthesizes a lambda class that returns a class that is parameterized in its return type. In that context, when `ClassToAPI` inspects the synthesized lambda and tries to figure out the full return type of it, the `null` is returned. It looks like the Java reflection API sparingly returns `null`s. We can see that in `ClassToAPI` where we guard against `null`s in lots of other places. So the guard added by this commit is not a novelty, but rather the norm. Fixes sbt#389.
Configuration menu - View commit details
-
Copy full SHA for 573c4bd - Browse repository at this point
Copy the full SHA 573c4bdView commit details -
Merge pull request sbt#446 from eed3si9n/wip/389
Ignore null in generic lambda tparams
Configuration menu - View commit details
-
Copy full SHA for 73d0585 - Browse repository at this point
Copy the full SHA 73d0585View commit details
Commits on Nov 8, 2017
-
source-dependencies/value-class-underlying: fix test
We were not testing what we thought we were testing before, because C used the name "x" which is also the name of the parameter we change in A, so when we changed A we were invalidating C too. Fixed by using a different name than "x" in C, which reveals that there is a bug somewhere since the test doesn't pass anymore.
Configuration menu - View commit details
-
Copy full SHA for 5a986a4 - Browse repository at this point
Copy the full SHA 5a986a4View commit details -
Fix sbt#442: Name hash of value class should include underlying type
Quoting from 1e7e99e: If the underlying type of a value class change, its name hash doesn't change, but the name hash of <init> change and since every class uses the name <init>, we don't need to do anything special to trigger recompilations either This was true until aca8dfa where we started giving unique names to constructors. This broke the value-class-underlying type but this wasn't noticed because the test was broken in the same commit (and has now been fixed in the previous commit in this PR).
Configuration menu - View commit details
-
Copy full SHA for 0215c84 - Browse repository at this point
Copy the full SHA 0215c84View commit details -
Merge pull request sbt#444 from smarter/fix-value-classes
Fix sbt#442: Name hash of value class should include underlying type
Configuration menu - View commit details
-
Copy full SHA for 8050289 - Browse repository at this point
Copy the full SHA 8050289View commit details
Commits on Nov 10, 2017
-
Make classpath hashing more lightweight
And make it parallel! This patch adds a cache that relies on filesystem metadata to cache hashes for jars that have the same last modified time across different compiler iterations. This is important because until now there was a significant overhead when running `compile` on multi-module builds that have gigantic classpaths. In this scenario, the previous algorithm computed hashes for all jars transitively across all these projects. This patch is conservative; there are several things that are wrong with the status quo of classpath hashing. The most important one is the fact that Zinc has been doing `hashCode` on a SHA-1 checksum, which doesn't make sense. The second one is that we don't need a SHA-1 checksum for the kind of checks we want to do. sbt#371 explains why. The third limitation with this check is that file hashes are implemented internally as `int`s, which is not enough to represent the richness of the checksum. My previous PR also tackles this problem, which will be solved in the long term. Therefore, this pull request only tackles these two things: * Caching of classpath entry hashes. * Parallelize this IO-bound task. Results, on my local machine: - No parallel hashing of the first 500 jars in my ivy cache: 1330ms. - Parallel hashing of the first 500 jars in my ivy cache: 770ms. - Second parallel hashing of the first 500 jars in my ivy cache: 1ms. Fixes sbt#433.
Configuration menu - View commit details
-
Copy full SHA for a90a0e9 - Browse repository at this point
Copy the full SHA a90a0e9View commit details
Commits on Nov 14, 2017
-
Merge pull request sbt#452 from scalacenter/issue-433
Fix sbt#433: Make classpath hashing more lightweight
Configuration menu - View commit details
-
Copy full SHA for 5dcf3e6 - Browse repository at this point
Copy the full SHA 5dcf3e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for e334903 - Browse repository at this point
Copy the full SHA e334903View commit details -
Configuration menu - View commit details
-
Copy full SHA for 90da1fb - Browse repository at this point
Copy the full SHA 90da1fbView commit details -
This also proves that our sbt-header configuration works.
Configuration menu - View commit details
-
Copy full SHA for 0816162 - Browse repository at this point
Copy the full SHA 0816162View commit details -
Configuration menu - View commit details
-
Copy full SHA for d361251 - Browse repository at this point
Copy the full SHA d361251View commit details
Commits on Nov 16, 2017
-
Merge pull request sbt#438 from scalacenter/add-headers-restructure-dir
Add headers and move compiler interface
Configuration menu - View commit details
-
Copy full SHA for f3d2b73 - Browse repository at this point
Copy the full SHA f3d2b73View commit details -
"sbt '++ 2.13.0-M2!' compile" does not work with sbt 1.0.0
* add new compiler bridge
Configuration menu - View commit details
-
Copy full SHA for af6e535 - Browse repository at this point
Copy the full SHA af6e535View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c9dbb7 - Browse repository at this point
Copy the full SHA 2c9dbb7View commit details -
Merge pull request sbt#440 from scalacenter/independent-scripted-para…
…llel Improve and make scripted parallel
Configuration menu - View commit details
-
Copy full SHA for 67cb2eb - Browse repository at this point
Copy the full SHA 67cb2ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fddbb7 - Browse repository at this point
Copy the full SHA 6fddbb7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 62339c9 - Browse repository at this point
Copy the full SHA 62339c9View commit details -
Merge pull request sbt#454 from scalacenter/yourkit
Add yourkit acknoledgement in the README
Configuration menu - View commit details
-
Copy full SHA for f7e45b4 - Browse repository at this point
Copy the full SHA f7e45b4View commit details
Commits on Nov 21, 2017
-
Implement compiler bridge for 2.13.0-M2
Fixes sbt#395, sbt/sbt#3427 In scala/scala#5903 Scala compiler's REPL-related classes went through some changes, including move to a different package. This implements a new compiler bridge tracking the changes. To verify that the new bridge compiles under 2.13, we need to compile it using sbt 1.0.3, which in turn requires a bridge compatible with Scala 2.13.0-M2. To work around this chicken-egg, I've manually created a bridge and published it to Maven Central as "org.scala-sbt" % "compiler-bridge_2.13.0-M2" % "1.1.0-M1-bootstrap2".
Configuration menu - View commit details
-
Copy full SHA for c60ff23 - Browse repository at this point
Copy the full SHA c60ff23View commit details -
Split compiler bridge tests to another subproject
Splitting compiler bridge tests to another subproject because while the bridge itself can be compiled with just compiler-interface, util-interface, and Scala Compiler as dependencies, the testing introduces more (such as IO). This creates problem for new Scala versions where IO or test libraries do not exist yet (e.g. Scala 2.13.0-M2). This also removes the Mima test due to the lack of 2.13 bridge for Zinc 1.0.0. Compiler bridge just needs to compile itself against the interface and Scala compiler, so there's no need to run Mima test.
Configuration menu - View commit details
-
Copy full SHA for 91cb532 - Browse repository at this point
Copy the full SHA 91cb532View commit details
Commits on Nov 23, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 9d6dfd7 - Browse repository at this point
Copy the full SHA 9d6dfd7View commit details -
Merge pull request sbt#453 from eed3si9n/wip/213-compiler-bridge
"sbt '++ 2.13.0-M2!' compile" does not work with sbt 1.0.0
Configuration menu - View commit details
-
Copy full SHA for d6d6988 - Browse repository at this point
Copy the full SHA d6d6988View commit details -
Merge branch '1.0.x' into merge-1.0.x-into-1.x
* 1.0.x: (28 commits) Split compiler bridge tests to another subproject Implement compiler bridge for 2.13.0-M2 Add yourkit acknoledgement in the README "sbt '++ 2.13.0-M2!' compile" does not work with sbt 1.0.0 Add header to cached hashing spec Add headers to missing files Fix sbt#332: Add sbt-header back to the build Update sbt-scalafmt to 1.12 Make classpath hashing more lightweight Fix sbt#442: Name hash of value class should include underlying type source-dependencies/value-class-underlying: fix test Ignore null in generic lambda tparams Improve and make scripted parallel Fix sbt#436: Remove annoying log4j scripted exception Fix sbt#127: Use `unexpanded` name instead of `name` Add pending test case for issue/127 source-dependencies / patMat-scope workaround Fixes undercompilation on inheritance on same source Add real reproduction case for sbt#417 Add trait-trait-212 for Scala 2.12.3 ... Conflicts: internal/zinc-apiinfo/src/main/scala/sbt/internal/inc/ClassToAPI.scala project/build.properties zinc/src/main/scala/sbt/internal/inc/MixedAnalyzingCompiler.scala The ClassToAPI conflict is due to: * sbt#393 (a 1.x PR), conflicting with * sbt#446 (a 1.0.x PR). The build.properties conflict is due to different PRs bumping sbt.version from 1.0.0 to 1.0.2 to 1.0.3. (sbt#413, sbt#418, sbt#453). The MixedAnalyzingCompiler conflict is due to: * sbt#427 (a 1.x PR), conflicting with * sbt#452 (a 1.0.x PR).
Configuration menu - View commit details
-
Copy full SHA for e245d95 - Browse repository at this point
Copy the full SHA e245d95View commit details