summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #3597 from som-snytt/issue/5905-feature-helpJason Zaugg2014-05-097-6/+80
|\ | | | | SI-5905 Sanity check -language options
| * SI-5905 Clarify test caseSom Snytt2014-05-082-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | The language feature options are discovered reflectively, but it is nice to enforce that expected options are supplied. Short of that, the code string includes a rowdy postfix operator. It still does enforce that at least one option was discovered. Delete -nowarn flags file. Let's see if that was to suppress a warning in the standard build.
| * SI-5905 Restore -language:_Som Snytt2014-03-023-2/+6
| | | | | | | | | | | | | | | | | | | | | | Underscore means all. -x:c,b,a,_ results in value c,b,a,a,b,c,d,... Currently, -Xprint does not present phases as a closed set of choices; there is ad hoc checking in Global. That would be a nice unification. (You don't know the list of choices until after global is constructed.)
| * SI-5905 Sanity check -language optionsSom Snytt2014-02-287-5/+74
| | | | | | | | | | | | | | | | | | | | The option names are hardcoded, but checked by a test. There are no hooks to verify options after the compiler is constructed. Introduced a `MultiChoiceSetting` required for the setting creation framework.
* | Merge pull request #3704 from gourlaysama/wip/t8504Jason Zaugg2014-05-082-1/+11
|\ \ | | | | | | SI-8504 fix NPE in the Java wrapper for a Scala Map.
| * | SI-8504 fix NPE in the Java wrapper for a Scala Map.Antoine Gourlay2014-04-292-1/+11
| | | | | | | | | | | | MapWrapper blindly calls .hashCode on keys that can very well be null.
* | | Merge pull request #3689 from xeno-by/ticket/8523Jason Zaugg2014-05-083-1/+12
|\ \ \ | | | | | | | | makes bundles friendly to -Ywarn-dead-code
| * | | makes bundles friendly to -Ywarn-dead-codeEugene Burmako2014-04-213-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, the `new Bundle(???).impl` synthetic tree generated as a macro impl ref for bundles evokes -Ywarn-dead-code warnings. This pull requests changes `???` to `null` in order not to stress out the checker. What's in the argument doesn't actually make any difference anyway.
* | | | Merge pull request #3706 from gourlaysama/wip/t8550Jason Zaugg2014-05-081-1/+1
|\ \ \ \ | | | | | | | | | | SI-8550 fix scaladoc for the default s.c.LinearSeq.
| * | | | SI-8550 fix scaladoc for the default s.c.LinearSeq.Antoine Gourlay2014-04-301-1/+1
| | |/ / | |/| | | | | | | | | | | | | | The default LinearSeq is a List (LinearSeq.newBuilder delegates to immutable.LinearSeq.newBuilder, whose default is List).
* | | | Merge pull request #3711 from retronym/ticket/8549-2Jason Zaugg2014-05-0810-10/+231
|\ \ \ \ | | | | | | | | | | SI-8549 Serialization: fix regression with @SerialVersionUID / start enforcing backwards compatibility
| * | | | SI-6988 Test case for non-literal / non-constant SerialVersionUIDJason Zaugg2014-05-054-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `neg` test was already working since `SerialVersionUID` was changed to a `ClassFileAnnotation`; the `run` test only started working since the recently preceding commit that made a compensatory test in the backend.
| * | | | SI-8549 Enforce serialization stability for selected collectionsJason Zaugg2014-05-053-0/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To date, we've been hesidant to offer any guarantees about Java serialization of standard library types among heteregenous Scala versions. Nonetheless, we have added `SerialVersionUID` annotations to parts of the standard library, to offer some stability. This protects against two winds of change: automatic calculation of this UID might differ between JVM versions, or it might differ due to otherwise immaterial changes to the library in Scala releases. With this commit, we strengthen the guarantees. Classes marked with `SerialVersionUID` will be serialization compatible within minor releases of Scala. This is backed up by the enclosed test. After major releases, we reserve the right to break this. But the test will serve to avoid *accidental* changes. Specifically, the test case checks: - deserialize(serialize(x)) == x - serialize(x) is stable over time I have included values of all types marked with `@SerialVersionUID` in the library. For some types, I've added variations in the values to exercise different subclasses, such as `Set1` / `Set2`. This found that that the serialized form of predefined `ClassTags` included the cached identity hash code and failed the stability test. This wasn't an issue for correctness as they also provide `readResolve`, but I marked those fields as `@transient` in any case to comply with the test expectations. That whole area is good example of a serialization worst-practice: using anonymous classes in code like: val Object: Manifest[java.lang.Object] = new PhantomManifest[...](...) { private def readResolve(): Any = Manifest.AnyVal } ... will lead to instability if these declarations are shifted around in the file. Named classes would be preferred. I've noted this in a TODO comment for 2.12.
| * | | | SI-8549 Honour the @SerialVersionUID annotatationJason Zaugg2014-05-053-10/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In PR #1673 / 4267444, the annotation `SerialVersionId` was changed from a `StaticAnnotation` to `ClassFileAnnotation` in order to avoid silently ignoring non-literal UIDs like: @SerialVersionUID(0 - 12345L) class C And to flag non-constant UIDs: @SerialVersionUID("!!!".length) While this indeed was fold constants, the change was incomplete. The compiler API for reading the argument from a `ClassFileAnnoation` is different, on must look for a `LiteralAnnotArg`, rather than a `Literal`. This commit: - amends the backend accordingly - removes relevant duplication between `GenASM` and `GenBCode` - tests that the static field is generated accordingly This will mean that we will break deserialization of objects from Scalal 2.11.0 that use this annotation.
* | | | | Merge pull request #3703 from huitseeker/issue/SI-8537Jason Zaugg2014-05-073-1/+16
|\ \ \ \ \ | | | | | | | | | | | | SI-8537 Puts SI-8157 fix under Xsource
| * | | | | SI-8537 Puts SI-8157 fix under XsourceFrançois Garillot2014-04-253-1/+16
| | | | | |
* | | | | | Merge pull request #3576 from som-snytt/issue/8325Jason Zaugg2014-05-078-9/+81
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-8325 Accept infix star type outside patterns
| * | | | | | SI-8325 Accept infix star type outside patternsSom Snytt2014-05-058-9/+81
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to SI-5702 which enabled use of `*` in infix notation in patterns. Most of the work is in distinguishing infix from a sequence pattern. Also, do not take backticked star as the repeated parameter marker in postfix position. That is, `Int``*``` is not `Int*` -- I hope double-tick renders as tick. There is not a special use case except that backticks mean "I am an identifier, as is, and not a keyword."
* | | | | | Merge pull request #3686 from densh/topic/re-enabled-typechecked-typesJason Zaugg2014-05-021-5/+4
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Re-enable typechecked types part of quasiquote test suite
| * | | | | Re-enable typechecked types part of quasiquote test suiteDenys Shabalin2014-04-201-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | It was accidentally disabled.
* | | | | | Merge pull request #3708 from lrytz/intellijJason Zaugg2014-05-0218-72/+188
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | IntelliJ project files
| * | | | | IntelliJ project filesLukas Rytz2014-05-0218-72/+188
| | | | | | | | | | | | | | | | | | | | | | | | Fixes compilation within IDEA. Allows compiling and running JUnit tests directly withing the IDE.
* | | | | | Merge pull request #3702 from gkossakowski/undoPairsGrzegorz Kossakowski2014-04-271-3/+10
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Use named class for UndoPair.
| * | | | | Use named class for UndoPair.Grzegorz Kossakowski2014-04-251-3/+10
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use specific, named class for UndoPair instead of generic Tuple2. This makes analysis of heap dumps much easier because profilers let you inspect memory consumption on per-class basis. The UndoPair case class is defined in companion object to not hold an outer pointer reference.
* | | | | Merge pull request #3698 from adriaanm/scaladoc-sourcelinkGrzegorz Kossakowski2014-04-251-2/+34
|\ \ \ \ \ | | | | | | | | | | | | Restore linking to source from scaladoc.
| * | | | | Restore linking to source from scaladoc.Adriaan Moors2014-04-241-2/+34
|/ / / / / | | | | | | | | | | | | | | | Somehow the `docsourceurl` param got dropped in the build refactor.
* | | | | Merge pull request #3694 from retronym/ticket/8478-2Jason Zaugg2014-04-241-2/+2
|\ \ \ \ \ | |_|/ / / |/| | | | SI-8478 Fix a performance regression in subtyping
| * | | | SI-8478 Fix a performance regression in subtypingJason Zaugg2014-04-231-2/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When checking `M[X] <:< M[Y]` for an `M` with an invariant parameter, we have to check that `X <:< Y && Y <:< X`. This is done in `isSubArgs`. The compile time of that program in the ticket jumps from 20s in 2.10.4 to too-long-to-measure in 2.11.0. This commit reverts the a subtle change to `isSubArgs` in ea93654 that was ultimately responsible. The search for this was unusually circuitious, even for scalac. It appeared in 9c09c1709 due a tiny error that has since been reverted in 58bfa19. But 58bfa19 still exhibited abysmal performance, due to an intervening regression that I'm targeting here. I haven't managed to extract a performance test from Slick. Using the test that @cvogt provided, however, with this patch: % time qbin/scalac -J-Xmx4G -classpath /Users/jason/code/slick-presentation/target/scala-2.10/classes:/Users/jason/.sbt/0.13/staging/b64b71d1228cdfe7b6d8/slick/target/scala-2.10/classes:/Users/jason/.ivy2/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.6.4.jar /Users/jason/code/slick-presentation/src/main/scala/SlickPresentation.scala real 0m21.853s user 0m33.625s sys 0m0.878s Which is back to 2.10.x style performance.
* | | | Merge pull request #3688 from ↵Jason Zaugg2014-04-221-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | retronym/topic/continuations-cross-version-strikes-back Another spot to fully cross version continuations plugin
| * | | | Another spot to fully cross version continuations pluginJason Zaugg2014-04-211-0/+1
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The continuations plugin is fully cross versioned, as it dependes on the non-BC compiler API. I had to make the same change externally releasing 2.11.0: https://github.com/scala/jenkins-scripts/pull/99/files This fix addresses the problem in scala/scala. Without it, we can't resolve dependencies in development.
* | | | Merge pull request #3635 from retronym/ticket/8329Jason Zaugg2014-04-212-13/+41
|\ \ \ \ | | | | | | | | | | SI-8329 Better hygiene for patmat partial functions
| * | | | SI-8329 Better hygiene for patmat partial functionsJason Zaugg2014-03-152-13/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't enter synthetic parameters of `applyOrElse` et al into scope when typechecking the user-code; instead reference those symbolically. There is an exception to this principle. Currently we allow: val x: PartialFunction[A, B] = x => x match { ... } For this pattern of code, we use the given name `x` for the corresponding method parameter of `applyOrElse` and `isDefinedAt` and we actually need this to be in scope when we typecheck the scrutinee. This construct is tested in `run/virtpatmat_partial.scala`. A new parameter, `paramSynthetic`, differentiates this case from the more typical `val x: PF[A, B] = { case ... => ... ; ... } case, which uses a fresh name need not be in scope. (We could get away with it, as it is fresh, but I thought it better to exclude it.)
* | | | | Merge pull request #3670 from retronym/ticket/8463Jason Zaugg2014-04-213-1/+52
|\ \ \ \ \ | |_|/ / / |/| | | | SI-8463 Avoid unpositioned errors from search for views
| * | | | SI-8463 Avoid unpositioned errors from search for viewsJason Zaugg2014-04-023-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ideally, I'd like to fix this using `saveErrors = false` here to firewall the enclosing context from the ambiguiouty error encountered during implicit search. I originally proposed that patch as a fix for SI-8419 in https://github.com/scala/scala/pull/3460 but withdrew from that approach as I uncovered a deeper bug that meant that we actually shouldn't have even been looking for views in that case. But, this runs into SI-8230 and these failures: test/partest --update-check \ /Users/jason/code/scala/test/files/pos/t2504.scala \ /Users/jason/code/scala/test/files/pos/t4457_1.scala \ /Users/jason/code/scala/test/files/neg/t4457_2.scala Turns out that typechecking the ostensible straight forward application, `Array("abc")`, hinges on us leaking an ambiguity error from `viewExists` to find a path through overload resolution! This commit takes a tiny step forward by using `context.tree` rather than `EmptyTree` as the argument to `inferImplicit`. This avoids unpositioned type errors.
* | | | | Merge pull request #3685 from VladUreche/issue/8514-masterJason Zaugg2014-04-213-3/+24
|\ \ \ \ \ | | | | | | | | | | | | SI-8514 Remove scaladoc html inconsistencies
| * | | | | SI-8514 Remove scaladoc html inconsistenciesVlad Ureche2014-04-183-3/+24
| | |_|/ / | |/| | | | | | | | | | | | | Some classes only got inline comments instead of getting the full comment.
* | | | | Merge pull request #3687 from smarter/fix_analysisBudget_offJason Zaugg2014-04-211-2/+9
|\ \ \ \ \ | | | | | | | | | | | | SI-8520 Fix -Dscalac.patmat.analysisBudget=off
| * | | | | SI-8520 Fix -Dscalac.patmat.analysisBudget=offGuillaume Martres2014-04-211-2/+9
| |/ / / / | | | | | | | | | | | | | | | Correctly parse "off" instead of throwing java.lang.NumberFormatException
* | | | | Merge pull request #3682 from retronym/ticket/8497Jason Zaugg2014-04-213-15/+30
|\ \ \ \ \ | | | | | | | | | | | | SI-8497 Fix regression in pickling of AnnotatedTypes
| * | | | | SI-8497 Fix regression in pickling of AnnotatedTypesJason Zaugg2014-04-143-15/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes an inconsistency introduced in these two spots: https://github.com/scala/scala/pull/3033/files#diff-6ce1a17ebee31068f41c36a8a2b3bc9aR79 https://github.com/scala/scala/pull/3033/files#diff-c455cb229f5227b1bcaa1544478fe3acR452 The bug shows up when pickling then unpickling an AnnotatedType that has only non-static annotations.
* | | | | | Merge pull request #3618 from mkubala/SI-8144Jason Zaugg2014-04-219-53/+247
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-8144 permalinks in scaladoc
| * | | | | | SI-8144 permalinks in scaladocMarcin Kubala2014-03-149-53/+247
| | | | | | |
* | | | | | | Merge pull request #3645 from retronym/ticket/8430Jason Zaugg2014-04-214-6/+66
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-8430 Less non-determinism in patmat exhautiveness warnings
| * | | | | | | SI-8430 Less non-determinism in patmat exhautiveness warningsJason Zaugg2014-03-244-6/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another mole whacked on the head by using `LinkedHashMap`. Caution: `LinkedHashMap` doesn't preserve its runtime type if you map through the generic interface. I've noted this gotcha as SI-8434. I've structured this patch to enforce that concrete collection with types, which is a good idea anyway. My method to track this down was to place breakpoints in `Hash{Map,Set}`.{foreach,iterator}` to see where that was used from within pattern match translation. This approach was drastically faster than my previous rounds of whack-a-mole. The counter-examples are still a bit off; I'm going to merge that aspect of this ticket with SI-7746, in which we've pinpointed the culpable part of the implementation, but haven't had success in fixing the bug.
* | | | | | | | Merge pull request #3633 from som-snytt/issue/repl-needs-typerJason Zaugg2014-04-213-4/+15
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-8415 Exception handling in REPL init
| * | | | | | | | SI-8415 Exception handling in REPL initSom Snytt2014-03-153-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Incremental robustness, and probe for typer phase. The probe would be unnecessary if repl contributed a terminal phase that "requires" whatever it needs; that is checked when the Run is built.
* | | | | | | | | Merge pull request #3683 from retronym/release/2.11.0-bump-versionsJason Zaugg2014-04-212-5/+5
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Bump versions after release of 2.11.0-final
| * | | | | | | | | master now targets 2.11.1-SNAPSHOTJason Zaugg2014-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike in previous major releases, we haven't branched for 2.12 yet. So for the time being, master will continue to host 2.11.x, and we'll focus on BC changes in 2.11.1 for the next month before branching.
| * | | | | | | | | Bump versions after release of 2.11.0-finalJason Zaugg2014-04-161-4/+4
| | |_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New versions.properties generated by: https://scala-webapps.epfl.ch/jenkins/view/scala-release-2.11.x/job/scala-release-2.11.x/57/
* | | | | | | | | Merge pull request #3634 from retronym/ticket/7992Jason Zaugg2014-04-213-0/+40
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-7992 Fix super-accessor generation after a local class