summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2505 from scalamacros/topic/macrosPaul Phillips2013-05-115-31/+67
|\ | | | | some fixes for macros: one esoteric, and one quite critical
| * pull request feedbackEugene Burmako2013-05-112-6/+9
| |
| * replaces inferBootClasspath with a simple lookup at sun.boot.class.pathEugene Burmako2013-05-091-12/+1
| | | | | | | | | | | | It's not like we're achieving any generality by iterating through all keys in System.getProperties and looking for ones which resemble "boot.class.path", so let's be simpler.
| * removes the traces of always on debug diagnosticsEugene Burmako2013-05-092-21/+21
| | | | | | | | pun intended
| * fixes a crash in ReflectionUtils.systemPropertiesEugene Burmako2013-05-093-2/+46
| | | | | | | | | | | | Due to SI-7465 we were erroneously assuming that System.getProperties only contains string key and string values. This led to a CCE when there was something else.
* | Merge pull request #2513 from scalamacros/topic/210x-breakageGrzegorz Kossakowski2013-05-111-1/+1
|\ \ | | | | | | fixes a checkfile breakage in 2.10.x
| * | fixes a checkfile breakage in 2.10.xEugene Burmako2013-05-111-1/+1
|/ / | | | | | | | | | | The breakage is caused by https://github.com/scala/scala/commit/fbb13630d3 and https://github.com/scala/scala/commit/a8edefcef8 having been merged independently from each other.
* | Merge pull request #2481 from martinmcnulty/socket-timeoutGrzegorz Kossakowski2013-05-111-2/+27
|\ \ | | | | | | SI-5734 Allow setting of socket timeout for remote actors
| * | SI-5734 Allow setting of socket timeout for remote actorsMartin McNulty2013-05-031-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TcpService is locked while connections are being established, preventing messages being sent to remote nodes. There was no way to specify a connect timeout, so the service was waiting for a ConnectException to be thrown if the remote node was unavailable (which can take several minutes). Added a system property to allow setting a socket connect timeout to prevent the TcpService from being locked for minutes at a time. Default behaviour is unchanged, all tests pass and the patch has been running in production without issue.
* | | Merge pull request #2456 from paulp/pr/jdk8-210xGrzegorz Kossakowski2013-05-1116-23/+84
|\ \ \ | | | | | | | | SI-7398 Add support for java8 default methods
| * | | SI-7398 Add support for java8 default methodsPaul Phillips2013-04-266-7/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In classfile parser: mark symbols which represent interface methods yet have code attributes with new flag DEFAULTMETHOD. These must be kept distinct from regular method bodies so that an error can be issued when a regular concrete method is overridden without the override keyword, but not when the overridden method is a default. In java source parser: mark Modifiers of interface default methods with DEFAULTMETHOD flag. Writing the test was everything I dreamed, and more! However, % test/partest --debug test/files/run/t7398.scala Skipping java8-specific test under java version 1.7.0_21 testing: [...]/files/run/t7398.scala [ OK ] All of 1 tests were successful (elapsed time: 00:00:04) % test/partest --debug test/files/run/t7398.scala Attempting java8-specific test under java version 1.8.0-ea testing: [...]/files/run/t7398.scala [ OK ] All of 1 tests were successful (elapsed time: 00:00:13)
| * | | Refactor DirectTest so java can be tested.Paul Phillips2013-04-2610-16/+30
| | | | | | | | | | | | | | | | | | | | There was no way to make a java compilation unit. Now there is.
* | | | Merge pull request #2461 from scalamacros/ticket/7325Paul Phillips2013-05-1015-66/+223
|\ \ \ \ | | | | | | | | | | Some fixes for string interpolation
| * | | | literal() now assigns a position to the tree it producesEugene Burmako2013-05-041-31/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At all its callsites except for a single one, the results of literal() were wrapped in atPos(in.offset), so the simplification was pretty much warranted. Thanks @paulp
| * | | | SI-7325 cleans up corner cases of percent handling in StringContext.fEugene Burmako2013-05-049-33/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See comments in code for the exhaustive list of the cases handled. Also note that treatment of non-formatting percents has been changed. Embedding literal %'s now requires escaping. Moreover, this commit also features exact error positions for string interpolation, something that has been impossible until the fix for SI-7271, also included in this patch.
| * | | | SI-7271 fixes positions of string interpolation partsEugene Burmako2013-04-276-6/+54
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Positions of static parts are now set explicitly during parsing rather than filled in wholesale during subsequent atPos after parsing. I also had to change the offsets that scanner uses for initial static parts of string interpolations so that they no longer point to the opening double quote, but rather to the actual beginning of the part.
* | | | Merge pull request #2458 from paulp/issue/7426-210Grzegorz Kossakowski2013-05-102-1/+3
|\ \ \ \ | | | | | | | | | | SI-7426 Crash in pickler.
| * | | | SI-7426 Crash in pickler.Paul Phillips2013-04-262-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I wonder if the supply of copy-pasted code, and the bugs which always accompany it, will ever run low. Here we have a couple hundred lines of tree traversal which appears roughly identical in structure to a different couple hundred lines of tree traversal, except one calls methods called putXXX and the other calls methods called writeXXX. Except there was one call to writeXXX among all the putXXX calls. Guess where it was crashing. This entire file should be expunged.
* | | | | Merge pull request #2473 from paulp/pr/2.10.2/5634Paul Phillips2013-05-101-32/+21
|\ \ \ \ \ | | | | | | | | | | | | SI-5634 eliminate overly verbose error message
| * | | | | SI-5634 eliminate overly verbose error messagePaul Phillips2013-04-301-32/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In fact I couldn't see where the error message described in the ticket is being produced, and I'm supposing it has already vacated the premises. I went through ClassfileParser and UnPickler, the two enclaves most likely to harbor the spewer, and hardened the output. No printlns, tighter assertion messages, and string interpolation for aesthetics. We're not savages.
* | | | | | Merge pull request #2488 from paulp/issue/7441Paul Phillips2013-05-103-6/+28
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | SI-7441 Don't ramble on about inapplicable implicits.
| * | | | | SI-7441 Don't ramble on about inapplicable implicits.Paul Phillips2013-05-023-6/+28
| | | | | |
* | | | | | Merge pull request #2472 from paulp/pr/2.10.2/7385Paul Phillips2013-05-074-4/+25
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7385 crash in erroneous code
| * | | | | | SI-7385 crash in erroneous codePaul Phillips2013-04-304-4/+25
| | |/ / / / | |/| | | | | | | | | | | | | | | | Less crashing, more emitting errors.
* | | | | | Merge pull request #2487 from paulp/issue/6091Paul Phillips2013-05-073-2/+17
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6091 overeager warning for reference equality
| * | | | | | SI-6091 overeager warning for reference equalityPaul Phillips2013-05-023-2/+17
| | |/ / / / | |/| | | | | | | | | | | | | | | | Don't warn on eq and ne unless they're the real eq or ne.
* | | | | | Merge pull request #2440 from retronym/ticket/6771Adriaan Moors2013-05-035-1/+35
|\ \ \ \ \ \ | |/ / / / / |/| | | | | SI-6771 Alias awareness for checkableType in match analysis.
| * | | | | SI-6771 Alias awareness for checkableType in match analysis.Jason Zaugg2013-04-245-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Failure to dealias the type of the scrutinee led the pattern matcher to incorrectly reason about the type test in: type Id[X] = X; (null: Id[Option[Int]]) match { case Some(_) => } Before, `checkableType` returned `Id[?]`, now it returns `Some[?]`.
* | | | | | Merge pull request #2475 from adriaanm/build-relative-symlinkAdriaan Moors2013-05-021-1/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | use relative symlink in distpack
| * | | | | | use relative symlink in distpackAdriaan Moors2013-04-301-1/+3
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To simplify building a release on jenkins, we run distpack-opt in one job, store the `dists/` directory in a tar ball, archive that artifact and copy it to the downstream jobs that package on windows and unix. To make the tarball portable between machines, it must not use absolute symlinks.
* | | | | | Merge pull request #2471 from paulp/pr/2.10.2/6532Paul Phillips2013-04-301-0/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6532 emit debug info in compiled java.
| * | | | | | SI-6532 emit debug info in compiled java.Paul Phillips2013-04-301-0/+2
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our handful of java source files weren't being compiled with line numbers, sourcefile, and other debugger aids. I don't really know how to test this so I'll enclose an excerpt of the bytecode diff of scala.runtime.IntRef to show that this change results in debug information. 2,3c2,4 > Compiled from "IntRef.java" 4a6 > SourceFile: "IntRef.java" 53a62,67 > LineNumberTable: > line 18: 0 > LocalVariableTable: > Start Length Slot Name Signature > 0 10 0 this Lscala/runtime/IntRef; > 0 10 1 elem I 62a77,81 > LineNumberTable: > line 19: 0 > LocalVariableTable: > Start Length Slot Name Signature > 0 8 0 this Lscala/runtime/IntRef;
* | | | | | Merge pull request #2432 from retronym/ticket/delayed-init-refPaul Phillips2013-04-304-0/+64
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Warn on selection of vals from DelayedInit subclasses.
| * | | | | Warn on selection of vals from DelayedInit subclasses.Jason Zaugg2013-04-234-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Which are likely to yield null, if the program didn't start. This is a common source of confusion for people new to the language, as was seen during the Coursera course. The test case shows that the usage pattern within Specs2 won't generate these warnings.
* | | | | | Merge pull request #2439 from retronym/ticket/7369Adriaan Moors2013-04-276-11/+123
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | SI-7369 Avoid spurious unreachable warnings in patterns
| * | | | | SI-7369 Avoid spurious unreachable warnings in patternsJason Zaugg2013-04-246-11/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unreachability analysis draws on the enumerated domain of types (e.g sealed subclasses + null, or true/false), and also looks at all stable identifier patterns tested for equality against the same 'slot' in a pattern. It was drawing the wrong conclusions about stable identifier patterns. Unlike the domain constants, two such values may hold the same value, so we can't assume that matching X precludes matching Y in the same slot in a subsequent case. For example: val X: Boolean = true; val Y: Boolean = true def m1(t1: Tuple1[Boolean]) = t1 match { case Tuple1(true) => case Tuple1(false) => case Tuple1(false) => // correctly unreachable } def m2(t1: Tuple1[Boolean]) = t1 match { case Tuple1(X) => case Tuple1(Y) => // spurious unreachable warning } // // Before // reachability, vars: V2: Boolean ::= true | false// Set(false, Y, X, true) // = x1._1 V1: (Boolean,) ::= null | ... // = x1 equality axioms: V2=true#4 \/ V2=false#5 /\ -V2=false#5 \/ -V2=Y#3 /\ -V2=false#5 \/ -V2=X#2 /\ -V2=false#5 \/ -V2=true#4 /\ -V2=Y#3 \/ -V2=X#2 /\ -V2=Y#3 \/ -V2=true#4 /\ -V2=X#2 \/ -V2=true#4 // // After // reachability, vars: V2: Boolean ::= true | false// Set(false, Y, X, true) // = x1._1 V1: (Boolean,) ::= null | ... // = x1 equality axioms: V2=true#4 \/ V2=false#5 /\ -V2=false#5 \/ -V2=true#4
* | | | | | Merge pull request #2392 from vigdorchik/ticket/si-7367Paul Phillips2013-04-264-27/+55
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | SI-7367 scaladoc crash on constructing the model for annotations.
| * | | | | SI-7367 scaladoc crash on constructing the model for annotations.Eugene Vigdorchik2013-04-254-27/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scaladoc only checks primary constructor when building annotation model. Here we instead find the constructor matching the annotation's symbol. Also change TreeFactory.makeTree to return TreeEntity rather than Option[TreeEntity] and force the caller check for EmptyTree.
* | | | | | Merge pull request #2449 from heathermiller/readmefixAdriaan Moors2013-04-251-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Corrects link in README.rst
| * | | | | | Corrects link in README.rstHeather Miller2013-04-251-1/+1
|/ / / / / /
* | | | | | Merge pull request #2448 from namin/update-linksHeather Miller2013-04-252-11/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | Update links to old website, in preparation for launch.
| * | | | | | Update links to old website, in preparation for launch.Nada Amin2013-04-252-11/+6
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Removed the contact form, since it's redundant with mailing lists and issue tracker.
* | | | | | Merge pull request #2444 from paulp/pr/value-class-cmp-warningPaul Phillips2013-04-253-17/+67
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6943 warn on value class miscomparison.
| * | | | | | SI-6943 warn on value class miscomparison.Paul Phillips2013-04-243-17/+67
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a very dangerous situation running around when you combine universal equality with value classes: // All over your code val x = "abc" if (x == "abc") ... // Hey let's make x a value class val x = new ValueClass("abc") // Uh-oh There was until now no warning when comparing a value class with something else. Now there is.
* | | | | | Merge pull request #2420 from retronym/ticket/6675-2Jason Zaugg2013-04-239-11/+57
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-6675 Avoid spurious warning about pattern bind arity.
| * | | | | | SI-6675 Avoid spurious warning about pattern bind arity.Jason Zaugg2013-04-219-11/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 692372ce, we added a warning (under -Xlint) when binding a `TupleN` in to a single pattern binder, which wasn't allowed before 2.10.0, and more often than not represents a bug. However, that warning overstretched, and warned even when using a Tuple Pattern to bind to the elements of such a value. This commit checks for this case, and avoids the spurious warnings. A new test case is added for this case to go with the existing test for SI-6675: $ ./tools/partest-ack 6675 % tests-with-matching-paths ... 3 % tests-with-matching-code ... 2 # 3 tests to run. test/partest --show-diff --show-log \ test/files/neg/t6675-old-patmat.scala \ test/files/neg/t6675.scala \ test/files/pos/t6675.scala \ "" Testing individual files testing: [...]/files/pos/t6675.scala [ OK ] Testing individual files testing: [...]/files/neg/t6675-old-patmat.scala [ OK ] testing: [...]/files/neg/t6675.scala [ OK ] All of 3 tests were successful (elapsed time: 00:00:03)
* | | | | | | Merge pull request #2435 from retronym/ticket/7355Jason Zaugg2013-04-231-2/+3
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | SI-7355 Handle spaces in paths in Windows batch files.
| * | | | | | SI-7355 Handle spaces in paths in Windows batch files.Bjorn Regnell2013-04-231-2/+3
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed "%1%" and %2% to "%~1" and %~2 to allow spaces in paths by surrounding quotes according to advice at: http://stackoverflow.com/questions/473117/pass-path-with-spaces-as-parameter-to-bat-file http://ss64.com/nt/syntax-args.html
* | | | | | Merge pull request #2387 from vigdorchik/interactive_scaladocAdriaan Moors2013-04-221-2/+4
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Interactive scaladoc: demand new typer run when done.
| * | | | | Interactive scaladoc: mark new typer run when done.Eugene Vigdorchik2013-04-171-2/+4
| | |/ / / | |/| | | | | | | | | | | | | | | | | | As of now, when backgroundCompile is in the same typer run as scaladoc-fetching logic, typer is confused with stale symbols.