summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #5005 from janekdb/2.11.x-man-page-scalacv2.11.8Seth Tisue2016-03-041-25/+26
|\ | | | | Document -Xxml:coalescing in scalac man page
| * Document -Xxml:coalescing in scalac man pageJanek Bogucki2016-03-031-25/+26
| | | | | | | | The formatting style is based on -g and -target.
* | Merge pull request #4994 from dk14/patch-1Seth Tisue2016-03-041-1/+1
|\ \ | | | | | | explicitly specify insertion-order feature in docs
| * | explicitly specify insertion-order feature in docsdk142016-02-231-1/+1
| | |
* | | Merge pull request #5006 from SethTisue/more-cowbell-more-lightbendSeth Tisue2016-03-045-6/+6
|\ \ \ | | | | | | | | Typesafe -> Lightbend in more places
| * | | Typesafe -> Lightbend in more placesSeth Tisue2016-03-045-6/+6
|/ / /
* | | Merge pull request #5002 from retronym/ticket/9546Lukas Rytz2016-03-046-29/+107
|\ \ \ | |_|/ |/| | SI-9546 Fix regression in rewrite of case apply to constructor call
| * | SI-9425 Fix a residual bug with multi-param-list case classesJason Zaugg2016-03-042-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | During code review for the fix for SI-9546, we found a corner case in the SI-9425 that remained broken. Using `finalResultType` peels off all the constructor param lists, and solves that problem.
| * | SI-9546 Fix regression in rewrite of case apply to constructor callJason Zaugg2016-03-022-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In SI-9425, I disabled the rewrite of `CaseClass.apply(x)` to `new CaseClass(x)` if the constructor was was less accessible than the apply method. This solved a problem with spurious "constructor cannot be accessed" errors during refchecks for case classes with non-public constructors. However, for polymorphic case classes, refchecks was persistent, and even after refusing to transform the `TypeApply` within: CaseClass.apply[String]("") It *would* try again to transform the enclosing `Select`, a code path only intended for monomorphic case classes. The tree has a `PolyType`, which foiled the newly added accessibility check. I've modified the call to `isSimpleCaseApply` from the transform of `Select` nodes to exclude polymorphic apply's from being considered twice.
| * | Refactor transform of case apply in refchecksJason Zaugg2016-03-024-28/+72
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've identified a dead call to `transformCaseApply` that seems to date back to Scala 2.6 vintages, in which case factory methods were a fictional companion method, rather than a real apply method in a companion module. This commit adds an abort in that code path to aide code review (if our test suite still passes, we know that I've removed dead code, rather than silently changing behaviour.) The following commit will remove it altogether I then inlined a slightly clunky abstraction in the two remaining calls to `transformCaseApply`. It was getting in the way of a clean fix to SI-9546, the topic of the next commit.
* | Merge pull request #5000 from felixmulder/patch-2Seth Tisue2016-03-011-1/+1
|\ \ | | | | | | Fix bold text in reflect API for 2.11.x
| * | Fix bold text in reflect API for 2.11.xFelix Mulder2016-02-271-1/+1
|/ / | | | | Same as #4999
* | Merge pull request #4993 from SethTisue/sbt-0.13.11Seth Tisue2016-02-263-48/+48
|\ \ | | | | | | upgrade to sbt 0.13.11
| * | upgrade to sbt 0.13.11Seth Tisue2016-02-223-48/+48
| | | | | | | | | | | | yum! delicious dogfood!
* | | Merge pull request #4995 from SethTisue/typesafe-is-now-lightbendSeth Tisue2016-02-2414-25/+25
|\ \ \ | | | | | | | | Typesafe is now Lightbend
| * | | Typesafe is now LightbendSeth Tisue2016-02-2414-25/+25
| | | |
* | | | Merge pull request #4975 from szeiger/wip/backport-partest-0.13-to-2.11.xSeth Tisue2016-02-239-20/+17
|\ \ \ \ | |/ / / |/| | | [nomerge] Backport partest 1.0.13 support to 2.11.x
| * | | Update to partest 1.0.13Jason Zaugg2016-02-173-18/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Which lets us remove the dependency on sbt-partest-interface, as this has been incorporated into scala-partest itself. Conflicts: scripts/jobs/integrate/bootstrap
| * | | Update partest to 1.0.12, test case for reporting invalid flagsLukas Rytz2016-02-177-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | Conflicts: test/files/pos/t3420.flags versions.properties
* | | | Merge pull request #4992 from joeratt/issue/9664Seth Tisue2016-02-221-2/+2
|\ \ \ \ | | | | | | | | | | [SI-9664] - Updating README.md's IntelliJ version reference.
| * | | | [SI-9664] - Updating README.md's IntelliJ version reference.JoeRatt2016-02-221-2/+2
| | | | |
* | | | | Merge pull request #4986 from janekdb/2.11.x-remove-GNU-Java-man-pages-helpSeth Tisue2016-02-223-15/+3
|\ \ \ \ \ | |/ / / / |/| | | | Remove GIJ memory configuration advice from man pages.
| * | | | Remove GIJ memory configuration advice from fsc, scala and scalac man pages.Janek Bogucki2016-02-203-15/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | GIJ is uncommonly used so general guidance on setting memory configuration in the fsc, scala and scalac man pages would only be of use to a highly select group of individuals. For 99.99999999999999% of users this info would be an historical curio at best and random noise at worst.
* | | | Merge pull request #4981 from retronym/topic/version-override-sbtStefan Zeiger2016-02-191-1/+3
|\ \ \ \ | |/ / / |/| | | [sbt] Allow system properties to override entries in verions.props
| * | | [sbt] Allow system properties to override entries in verions.propsJason Zaugg2016-02-191-1/+3
|/ / /
* | | Merge pull request #4967 from lrytz/smhasherUrlSeth Tisue2016-02-152-2/+2
|\ \ \ | | | | | | | | fix smhasher url
| * | | fix smhasher urlxuwei-k2016-02-152-2/+2
|/ / / | | | | | | | | | | | | google code is dead http://google-opensource.blogspot.jp/2015/03/farewell-to-google-code.html
* | | Merge pull request #4960 from janekdb/2.11.x-Scaladoc-ProductN-off-by-oneLukas Rytz2016-02-1523-24/+23
|\ \ \ | |/ / |/| | Fix off-by-one documentation error in Product<N>
| * | Fix off-by-one documentation error in Product<N>Janek Bogucki2016-02-1123-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sanity check: scala> case class P2(i: Int, j: Int) defined class P2 val p2 = P2(1, 3) p2.productElement(0) res0: Any = 1 p2.productElement(1) res1: Any = 3 p2.productElement(2) java.lang.IndexOutOfBoundsException: 2 at P2.productElement(<console>:10)
* | | Merge pull request #4956 from retronym/topic/sbt-tweaks-4Seth Tisue2016-02-113-18/+17
|\ \ \ | |/ / |/| | Fix SBT tab completion of scala command
| * | Fix SBT tab completion of scala commandJason Zaugg2016-02-113-18/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `scala -deprecation` (without a trailing script argument) wasn't allowed. Now it is. I also supported trailing whitespace on all commands. Also fixed: a bug with completion of `scalac ./san<TAB>`. It was completing as though the `./` had not been typed, which threw the suggestion off by a few characters.
* | | Merge pull request #4954 from retronym/topic/fullnameLukas Rytz2016-02-101-13/+25
|\ \ \ | | | | | | | | Micro optimise Symbol#fullName
| * | | Micro optimise Symbol#fullNameJason Zaugg2016-02-091-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old approach of recursively calling `fullNameAsName` creates a lot of garbage for intermediate results, in addition to needless interning of those results into the name table. This commit instead creates a string buffer of the correct capacity and writes the component names directly into this. I compared old and new approaches and this shows a 2x speedup. ``` scala> val th = ichi.bench.Thyme.warmed(verbose = print) th: ichi.bench.Thyme = ichi.bench.Thyme@1643e817 scala> val w_old = th.Warm(sym.fullNameAsNameOld('.')) w_old: th.Warm[$r.intp.global.Name] = ichi.bench.Thyme$Warm@7a8d001b scala> val w_new = th.Warm(sym.fullNameAsName('.')) w_new: th.Warm[$r.intp.global.Name] = ichi.bench.Thyme$Warm@1ec14586 scala> th.pbenchOffWarm("", x => println(x))(w_old, 10, "old")(w_new, 10, "new") Benchmark comparison (in 4.084 s) old vs new Significantly different (p ~= 0) Time ratio: 0.53572 95% CI 0.51618 - 0.55525 (n=20) old 64.54 ns 95% CI 62.41 ns - 66.67 ns new 34.57 ns 95% CI 34.04 ns - 35.11 ns res3: $r.intp.global.Name = scala.collection.parallel.mutable.ParSeq ``` It is still expensive enough that we should still consider caching. The call to full name in `classBTypeFromSymbol` in the new backed is a prime candidate for optimization.
* | | | Merge pull request #4939 from szeiger/issue/9624Lukas Rytz2016-02-103-15/+25
|\ \ \ \ | | | | | | | | | | SI-9624 Improve documentation for TraversableOnce
| * | | | SI-9624 Improve documentation for TraversableOnceStefan Zeiger2016-02-043-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move the doc comment for `hasDefiniteSize` up from TraversableLike to GenTraversableOnce and improve it. - Add a note to `GenTraversableOnce.isEmpty` that implementations must not consume elements. - Clarify alternatives to subclassing TraversableOnce.
* | | | | Merge pull request #4928 from szeiger/wip/document-e-ncLukas Rytz2016-02-102-1/+14
|\ \ \ \ \ | |_|_|/ / |/| | | | Document that `scala -e` starts/uses a compilation daemon
| * | | | Document when the `scala` command starts/uses a compilation daemonStefan Zeiger2016-02-012-1/+14
| | | | |
* | | | | Merge pull request #4950 from retronym/topic/sbt-tweaks-3Seth Tisue2016-02-096-4/+421
|\ \ \ \ \ | |_|_|/ / |/| | | | SBT build improvements
| * | | | Add SBT tab completion for scala{,c,doc}Jason Zaugg2016-02-094-18/+221
| | | | | | | | | | | | | | | | | | | | | | | | | Also refactor the partest parser to use the improved tab completion for test paths.
| * | | | Enable IntellIJ smarts while editing the buildJason Zaugg2016-02-072-1/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though our build can't be imported into IntelliJ automatically, we don't need to live in the dark ages of red squigglies when editing build.sbt. This commit hand-crafts the module defintion for the project, which has SBT and its dependendencies on the classpath. A screenshot of the code assist is worth the thousand expletives I uttered while writing the pictured code without this facility: https://www.dropbox.com/s/6mxv0iwxkhvnor7/Screenshot%202016-02-07%2022.09.12.png?dl=0 To download the sources for the SBT JARs that are referenced herein, run sbt> reload plugins sbt> updateClassifiers
| * | | | Add tab completion to the partest commandJason Zaugg2016-02-062-1/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can complete partest options (I've excluded some that aren't relevant in SBT), as well as test file names. If `--srcpath scaladoc` is included, completion of test paths will be based on `test/scaladoc` rather than the default `test/files`. Note that the `--srcpath` option is currently broken via scala partest interface, this change to scala-partest is needed to make it work: https://github.com/scala/scala-partest/pull/49 I've also hijacked the `--grep` option with logic in the SBT command itself, rather than passing this to `partest`. Just like `./bin/partest-ack`, this looks for either test file names or regex matches within the contents of test, check, or flag files. I tried for some time to make the tab completion of thousands of filenames more user friendly, but wasn't able to get something working. Ideally, it should only suggest to `test/files/{pos, neg, ...}` on the first <TAB>, and then offer files on another TAB. Files should also be offered if a full directory has been entered. Hopefully a SBT parser guru will step in and add some polish here.
| * | | | Convenient aliases for the SBT buildJason Zaugg2016-02-051-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea here is to avoid the need for switching between the SBT shell and Bash. - Add aliases for partest, scala{,c,p,doc} - Change working directory for these forked processes to the root project base directory, rather than the subprojects base directory. This lets us use relative paths to files in a more familar way. - Don't log the output of forked processes with the `[info] ` prefix, rather pass it through directly to stdout. Demo: ``` > partest --terse test/files/pos/t6231.scala [info] Packaging /Users/jason/code/scala2/build-sbt/pack/lib/scala-partest-javaagent.jar ... [info] Done packaging. Selected 1 tests drawn from specified tests . [info] Passed: Total 1, Failed 0, Errors 0, Passed 1 [success] Total time: 3 s, completed 05/02/2016 12:44:19 PM > scala sandbox/test.scala [info] Running scala.tools.nsc.MainGenericRunner -usejavacp sandbox/test.scala Hello, World! [success] Total time: 4 s, completed 05/02/2016 12:45:08 PM > scalac sandbox/test.scala [info] Running scala.tools.nsc.Main -usejavacp sandbox/test.scala [success] Total time: 3 s, completed 05/02/2016 12:45:15 PM > scala Test [info] Running scala.tools.nsc.MainGenericRunner -usejavacp Test Hello, World! [success] Total time: 1 s, completed 05/02/2016 12:45:20 PM > scala [info] Running scala.tools.nsc.MainGenericRunner -usejavacp Welcome to Scala 2.11.8-20160204-090931-42525ec (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_71). Type in expressions for evaluation. Or try :help. scala> 1.to to toBinaryString toByte toChar toDegrees toDouble toFloat toHexString toInt toLong toOctalString toRadians toShort toString scala> 1.toString res0: String = 1 scala> :quit [success] Total time: 8 s, completed 05/02/2016 12:45:48 PM > ```
* | | | | Merge pull request #4937 from szeiger/issue/9623-2.11Seth Tisue2016-02-082-6/+73
|\ \ \ \ \ | |/ / / / |/| | | | SI-9623 Avoid unnecessary hasNext calls in JoinIterator & ConcatIterator
| * | | | SI-9623 Avoid unnecessary hasNext calls in JoinIterator & ConcatIteratorStefan Zeiger2016-02-012-6/+73
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These iterator implementations are used to concatenate two (JoinIterator) or more (ConcatIterator) other iterators with `++`. They used to perform many unnecessary calls to the child iterators’ `hasNext` methods. This improved state machine-based implementation reduces that number to the bare minimum, i.e. iterating over concatenated iterators with `foreach` calls the children's `hasNext` methods a total of (number of children) + (number of elements) times, the same as when iterating over all children separately.
* | | | Merge pull request #4942 from SethTisue/copyright-2016Seth Tisue2016-02-047-9/+9
|\ \ \ \ | |_|/ / |/| | | bump copyright year to 2016
| * | | bump copyright year to 2016Seth Tisue2016-02-037-9/+9
|/ / /
* | | Merge pull request #4927 from szeiger/issue/9572Jason Zaugg2016-02-015-35/+71
|\ \ \ | | | | | | | | SI-9572 Check for illegal tuple sizes in the parser
| * | | SI-9572 Check for illegal tuple sizes in the parserStefan Zeiger2016-01-285-35/+71
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds explicit checks with syntax errors for tuple literals and types of more than 22 elements. An alternative approach to fixing SI-9572 would be to revert to the old failure mode of Scala 2.10 where references to arbitrary `scala.TupleXY` would be generated in the parser, which then leads to “type/object not found” errors in the typechecker. This fix here is more intrusive but arguably provides a better user experience. Methods `stripParens` and `makeBinop` are moved from `TreeBuilder` to `Parsers` because they can now generate syntax errors. New methods `makeSafeTupleType` and `makeSafeTupleTerm` implement the error checking on top of `makeTupleType` and `makeTupleTerm`. They are overridden with no-op versions in the quasiquotes parser because it also overrides `makeTupleType` and `makeTupleTerm` in a way that supports arbitrary tuple sizes.
* | | Merge pull request #4922 from SethTisue/fix-cla-linksJason Zaugg2016-02-012-2/+2
|\ \ \ | | | | | | | | fix broken links to Scala CLA
| * | | fix broken links to Scala CLASeth Tisue2016-01-272-2/+2
| | | |