summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * | Merge pull request #4765 from janekdb/2.11.x-scaladoc-diffSeth Tisue2015-12-181-0/+117
| | | |\ \ | | | | | | | | | | | | Script to compare the current scaladoc with the parent commit's doc
| | | | * | Enhance scaladoc-diff tool for Ubuntu.Janek Bogucki2015-10-031-27/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested on Ubuntu 14.04.3 LTS. SUMMARY 1. Use `set -e` to ensure ant failure bails script. 2. Make best effort to display scaladoc build diff. 3. Quiet output from git checkout. 4. Prefer plumbing over porcelain when getting hashes. 5. Use short hashes to enhance output readability. 6. Use branch name when available. 7. Ensure scaladoc copies are clean. 8. Remove redundant use of scaladoc-compare. 9. Improve message formatting. 10. Use $(...) instead of backticks for more legible code. 11. Pause after reporting missing old file. 12. Report missing new files. DETAILS 1. Use `set -e` to ensure an ant failure bails the script. Turn off before diff because diff returns an error code when the compared files differ, which is expected to be seen. 2. Make best effort to display scaladoc build diff preferring graphical clients. opendiff is a Mac OS X command that opens a graphical diff display, meld is a graphical client for Ubuntu and other distros. On Ubuntu fallback to gvimdiff which will display graphically if possible otherwise in the console. Ultimately default to diff. Command detection taken from, http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script 3. Quiet output from git checkout to avoid detached head warning. The user does not need to see the detached head warning when running this. 4. Prefer plumbing over porcelain to avoid 'not found' error when getting SHA1s. Calling get-scala-commit-sha errors out on Ubuntu 14.04.3 with Bash 4.3.11 with these messages, tools/get-scala-commit-sha: 11: tools/get-scala-commit-sha: [[: not found tools/get-scala-commit-sha: 17: tools/get-scala-commit-sha: Bad substitution 5. Use short hashes to enhance output readability. 6. Use branch name when available. If the branch name is not used when the working directory is restored after checkout out the parent commit we will be in a detached HEAD state. Make a best effort to avoid that. 7. Ensure scaladoc copies are clean. Remove previous copy of scaladoc to ensure consistent behaviour on runs past the first. 8. Remove use of scaladoc-compare because the equivalent functionality is provided when iterating the new files. 9. Improve message formatting. 10. Use $(...) instead of backticks for more legible code. 11. Pause after reporting missing old file. Without this pause it was easy to miss the message when we had this sequence of differences, * differing files * missing file * differing files 12. Report missing new files. Along with reporting new files with no corresponding old file report the complementary scenario.
| | | | * | Script to compare the current scaladoc with the parent commit's docJanek Bogucki2015-09-301-0/+71
| | | | | |
| | | * | | Merge pull request #4862 from retronym/ticket/9567Lukas Rytz2015-12-185-4/+82
| | | |\ \ \ | | | | | | | | | | | | | | SI-9567 Fix pattern match on 23+ param, method local case class
| | | | * | | SI-9567 Fix pattern match on 23+ param, method local case classJason Zaugg2015-11-253-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Typechecking constructor patterns of method local case classes was only working because of the existence of the unapply method in the companion, which is used if navigation to the case class companion object fails. We now support defintion of, and pattern matching on, case classes with more than 22 parameters. These have no `unapply` method in the companion, as we don't have a large enough tuple type to return. So for such case classes, the fallback that we inadvertently relied on would no longer save us, and we'd end up with a compile error advising that the identifier in the constructor pattern was neither a case class nor an extractor. This is due to the propensity of `Symbol#companionXxx` to return `NoSymbol` when in the midst of typechecking. That method should only be relied upon after typechecking. During typechecking, `Namers#companionSymbolOf` should be used instead, which looks in the scopes of enclosing contexts for symbol companionship. That's what I've done in this commit.
| | | | * | | SI-9567 Fix latent bugs in patmat's reasoning about mutabilityJason Zaugg2015-11-252-3/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under -optimize, the pattern matcher tries to avoid local variables in favour of directly accessing to non-var case class accessors. However, the code that analysed the patterns failed to account properly for repeated parameters, which could either lead to a compiler crash (when assuming that the n-th subpattern must have a corresponding param accessor), or could lead to a correctness problem (when failing to eagerly the bound elements from the sequence.) The test case that tried to cover seems only to have been working because of a separate bug (the primary subject of SI-9567) related to method-local case classes: they were treated during typechecking as extractors, rather than native case classes. The subsequent commit will fix that problem, but first we must pave the way with this commit that emits local vals for bound elements of case class repeated params.
| | | * | | | Merge pull request #4882 from janekdb/2.11.x-scaladoc-tables-1Lukas Rytz2015-12-182-6/+11
| | | |\ \ \ \ | | | | | | | | | | | | | | | | Document JavaConverters conversion from java.util.Properties to Map
| | | | * | | | Document JavaConverters conversion from java.util.Properties to MapJanek Bogucki2015-12-122-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also - Fix grammar on duplicated DecorateAsJava comment by copying over from JavaConverters - Remove author tags
| | | * | | | | Merge pull request #4831 from martijnhoekstra/patch-4Seth Tisue2015-12-171-0/+12
| | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | add doc for log, sqrt
| | | | * | | | | change phrasing around eulers number for `log(x)`martijnhoekstra2015-12-111-3/+1
| | | | | | | | |
| | | | * | | | | add doc for log, sqrtmartijnhoekstra2015-10-301-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's useful to know that log is the natural logarithm, not 10log or 2log or so. Also did sqrt "while I was at it"
| | | * | | | | | Merge pull request #4883 from janekdb/2.11-x-scaladoc-ui-capitalizationSeth Tisue2015-12-161-2/+2
| | | |\ \ \ \ \ \ | | | | |_|_|_|_|/ | | | |/| | | | | Apply title case to Scaladoc buttons: By Inheritance & Show All
| | | | * | | | | Apply title case to Scaladoc buttons: By Inheritance & Show AllJanek Bogucki2015-12-151-2/+2
| | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The alternative choice was to change "Hide All" to "Hide all" to match existing capitalization but title case fits for this UI.
| | | * | | | | Merge pull request #4876 from ruippeixotog/issue/9581Seth Tisue2015-12-152-2/+32
| | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-9581 Fix overflow on Vector take and drop methods
| | | | * | | | | SI-9581 Fix overflow on Vector take and drop methodsRui Gonçalves2015-12-062-2/+32
| | | | | |/ / / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the index/length comparison in `Vector#take` and `Vector#drop` so that they handle all possible integer values. Given the collection's invariants `startIndex >= endIndex` and `0 >= startIndex, endIndex`, it is sufficient to change the arithmetic in the comparison as done in this commit to avoid overflows. As cases when `n <= 0` are handled beforehand, `endIndex - n` cannot overflow, contrary to `startIndex + n`. If without the danger of overflows the condition yields true, on the other hand, `startIndex + n` cannot overflow as it is smaller than `endIndex` (as the previous formulation of the condition shows).
| | | * | | | | Merge pull request #4881 from szeiger/wip/sbt-partestSeth Tisue2015-12-134-11/+20
| | | |\ \ \ \ \ | | | | |/ / / / | | | |/| | | | Bug fixes for the sbt build and partest
| | | | * | | | Create partest.properties from the sbt buildStefan Zeiger2015-12-041-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows partest to be run from the command line on the artifacts produced by the sbt build. The actual location for partest.properties is hardcoded in the partest script as build/pack/partest.properties. This will have to be changed when we make sbt the default build tool. To test this now you can manually copy the generated file from build-sbt/quick/partest.properties to build/pack/partest.properties.
| | | | * | | | Make all of partest work in the sbt buildStefan Zeiger2015-12-043-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix the scoping of files/lib/*.jar. These files were not on the classpath when running partest from sbt. - Pass the same standard Java options to partest as from the command line. This requires new versions of scala-partest and scala-partest-interface. - Fix the classpath scanning in jvm/innerClassEnclMethodJavaReflection. It only worked for JARs and relative directories but not for absolute directory paths (which are produced by sbt).
| | | | * | | | Fix dependency problems in the sbt buildStefan Zeiger2015-11-302-2/+3
| | | | | |/ / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Create the directory for the output file when building an OSGi bundle. Otherwise a publishing command would fail if dist/mkPack had not been run before. - Depend only on “packagedArtifact” in “mkPack”, not on “packageBin”. The latter is sbt’s standard packaging task but some of the required dependencies need to be packaged as OSGi bundles.
* | | | | | | Merge pull request #4926 from lrytz/scalaTreeMapJason Zaugg2016-02-011-6/+4
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | mutable.TreeMap instead of java.util.TreeMap in closure optimizer
| * | | | | | mutable.TreeMap instead of java.util.TreeMap in closure optimizerLukas Rytz2016-01-281-6/+4
| | | | | | |
* | | | | | | Merge pull request #4915 from petermz/ticket/9599Vlad Ureche2016-01-293-1/+14
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-9599 Multiple @todo formatted with comma on separate line
| * | | | | | | SI-9599 Multiple @todo formatted with comma on separate linepeterz2016-01-293-1/+14
|/ / / / / / /
* | | | | | | Merge pull request #4917 from retronym/ticket/9629Jason Zaugg2016-01-293-4/+33
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-9629 Emit missing 'pattern must be a value' error
| * | | | | | | SI-9629 Emit missing 'pattern must be a value' errorJason Zaugg2016-01-253-4/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error used to only be emitted for top-level patterns. This commit moves it into `typedInternal` so it works for nested patterns. It uses the typer mode to know when to fire.
* | | | | | | | Merge pull request #4919 from retronym/ticket/9630Jason Zaugg2016-01-2927-21/+150
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | Pattern Matching analysis improvements
| * | | | | | | Avoid exhaustivity warning in typedTemplateJason Zaugg2016-01-291-1/+1
| | | | | | | |
| * | | | | | | Fix non-exhaustive match in macro code parsingJason Zaugg2016-01-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: ``` ⚡ qscala -deprecation Welcome to Scala 2.12.0-20160126-000825-1e302b76aa (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_66). Type in expressions for evaluation. Or try :help. scala> import reflect.macros.blackbox.Context; import language.experimental.macros import reflect.macros.blackbox.Context import language.experimental.macros scala> def impl(c: Context) = {println(c.universe.showRaw(c.parse("val then = 0"))); c.literalUnit}; def m: Unit = macro impl; <console>:13: warning: method literalUnit in trait ExprUtils is deprecated: Use quasiquotes instead def impl(c: Context) = {println(c.universe.showRaw(c.parse("val then = 0"))); c.literalUnit}; def m: Unit = macro impl; ^ impl: (c: scala.reflect.macros.blackbox.Context)c.Expr[Unit] defined term macro m: Unit scala> m <console>:16: error: exception during macro expansion: scala.MatchError: pos: source-<macro>,line-1,offset=4 then is now a reserved word; usage as an identifier is deprecated WARNING (of class scala.tools.nsc.reporters.StoreReporter$Info) at scala.reflect.macros.contexts.Parsers$class.scala$reflect$macros$contexts$Parsers$class$$$anonfun$1(Parsers.scala:17) ```
| * | | | | | | SI-9398 Treat case classes as one-element ADTs for analysisJason Zaugg2016-01-2915-12/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, exhaustivity analysis only runs for scrutinees with a sealed type. This commit treats any case class as a one-element, sealed type to enable additional analysis, such as in the new test case.
| * | | | | | | SI-9630 Fix spurious warning related to same-named case accessorsJason Zaugg2016-01-2911-7/+112
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hash consing of trees within pattern match analysis was broken, and considered `x1.foo#1` to be the same tree as `x1.foo#2`, even though the two `foo`-s referred to different symbols. The hash consing was based on `Tree#correspondsStructure`, but the predicate in that function cannot veto correspondance, it can only supplement the default structural comparison. I've instead created a custom tree comparison method for use in the pattern matcher that handles the tree shapes that we use.
* | | | | | | Merge pull request #4923 from lrytz/closureOptimizerStabilityLukas Rytz2016-01-281-38/+33
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Ensure bytecode stability in the closure optimizer
| * | | | | | Ensure bytecode stability in the closure optimizerLukas Rytz2016-01-271-38/+33
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/scala/scala-dev/issues/77 Previously, the order in which closure invocations were re-written depended on the callGraph's closureInstantiations map, which is not sorted / linked.
* | | | | | Merge pull request #4735 from soc/SI-9437Lukas Rytz2016-01-2611-6/+194
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-9437 Emit and support parameter names in class files
| * | | | | | SI-9437 Emit and support parameter names in class filesSimon Ochsenreither2016-01-2511-6/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JEP 118 added a MethodParameters attribute to the class file spec which holds the parameter names of methods when compiling Java code with `javac -parameters`. We emit parameter names by default now.
* | | | | | | Merge pull request #4916 from lrytz/restoreASMTestsLukas Rytz2016-01-2634-655/+374
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Restore backend tests that were removed together with GenASM
| * | | | | | | Rename junit tests to end in *Test to make them run in ANTLukas Rytz2016-01-254-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our ANT script only runs junit tests that match *Test.class. https://github.com/scala/scala/blob/1081e718f8f8e174dbf615e42b157e187d3d3886/build.xml#L1467
| * | | | | | | Rewrite test: no local for underscoreLukas Rytz2016-01-255-49/+19
| | | | | | | |
| * | | | | | | Rewrite test: no null in patmatLukas Rytz2016-01-255-40/+13
| | | | | | | |
| * | | | | | | Rewrite test: no type test on primitives in patmatLukas Rytz2016-01-255-34/+19
| | | | | | | |
| * | | | | | | Rewrite test for SI-7006Lukas Rytz2016-01-255-61/+24
| | | | | | | |
| * | | | | | | Rewrite test for inlining higher-order functionsLukas Rytz2016-01-253-92/+20
| | | | | | | |
| * | | | | | | Rewrite test for inlining from sealed classLukas Rytz2016-01-254-56/+29
| | | | | | | |
| * | | | | | | Rewrite copy propagation testLukas Rytz2016-01-253-191/+73
| | | | | | | |
| * | | | | | | Rewrite test for SI-5313Lukas Rytz2016-01-253-67/+92
| | | | | | | |
| * | | | | | | Rewrite test for SI-6955Lukas Rytz2016-01-252-33/+28
| | | | | | | |
| * | | | | | | Rewrite test for SI-6956Lukas Rytz2016-01-252-31/+58
| | | | | | | |
* | | | | | | | Merge pull request #4858 from lrytz/opt/elimBoxesLukas Rytz2016-01-2536-858/+3833
|\| | | | | | | | |_|/ / / / / |/| | | | | | Eliminate non-escaping boxes, tuples and refs
| * | | | | | -YoptTrace takes a package/Class.method parameterLukas Rytz2016-01-252-2/+3
| | | | | | |
| * | | | | | Merge remote-tracking branch 'upstream/2.12.x' into opt/elimBoxesLukas Rytz2016-01-24572-24515/+5443
| |\ \ \ \ \ \ | |/ / / / / / |/| | | | | |
* | | | | | | Merge pull request #4914 from felixmulder/topic/scaladoc-update-diagramsVlad Ureche2016-01-2319-5681/+89
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | Add partial appearance update of inheritence graphs in scaladoc