summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Optimize slice and take in ArrayOps, WrappedArray"Adriaan Moors2017-04-072-114/+11
| | | | This reverts commit d540bf01fe4d9e5c56a68b0d3bada9d97af77e3f.
* Revert "Optimised implementation of List.filter/filterNot"Adriaan Moors2017-04-073-107/+1
| | | | This reverts commit eb5c51383a63c5c3420e53ef021607ff5fd20296.
* Revert "Handle WrappedArray the same way as ArrayOps for binary compatibility"Adriaan Moors2017-04-071-23/+21
| | | | This reverts commit f24c2603d0acee5bcb6d5d80bf1e1a4645fa74f0.
* Merge 2.11.x into 2.12.xAdriaan Moors2017-04-071-19/+22
|\ | | | | | | Include 99f41a1 Merge pull request #5736
| * Merge pull request #5736 from adriaanm/t10206Adriaan Moors2017-03-211-19/+22
| |\ | | | | | | SI-10206 tighten fix for SI-6889
| | * SI-10206 tighten fix for SI-6889Adriaan Moors2017-02-231-19/+22
| | | | | | | | | | | | | | | There are more supertypes of `AnyRef` than you might think: `?{def clone: ?}` is one example...
| * | [backport] new repo, version numbers for integration buildsLukas Rytz2017-03-091-1/+1
| | | | | | | | | | | | | | | | | | | | | Integration builds now have version number like `2.12.2-bin-sha7` or `2.13.0-pre-sha7` and are published to scala-integration (no longer scala-release-temp). scala-release-temp is still used in the bootstrap script for publishing locker.
* | | Merge 2.11.x into 2.12.xAdriaan Moors2017-04-073-3/+3
|\| | | | | | | | | | | Include 828a892 Merge pull request #5753
| * | Merge pull request #5753 from Philippus/issue/copyright_yearSeth Tisue2017-03-063-3/+3
| |\ \ | | | | | | | | bump copyright year to 2017 [ci: last-only]
| | * | bump copyright year to 2017Philippus Baalman2017-03-023-3/+3
| | |/
| * | Improvements based on reviews by Lukas & JasonAdriaan Moors2017-03-022-17/+45
| | |
| * | Allow user-defined `[un]apply` in case companionAdriaan Moors2017-02-271-12/+69
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Don't emit a synthetic `apply` (or `unapply`) when it would clash with an existing one. This allows e.g., a `private apply`, along with a `case class` with a `private` constructor. We have to retract the synthetic method in a pretty roundabout way, as we need the other methods and the owner to be completed already. Unless we have to complete the synthetic `apply` while completing the user-defined one, this should not be a problem. If this does happen, this implies there's a cycle in computing the user-defined signature and the synthetic one, which is not allowed.
* | Merge pull request #5811 from milessabin/topic/implicitinfo-hashcodeJason Zaugg2017-04-051-1/+4
|\ \ | | | | | | Make ImplicitInfo hashCode consistent with equals.
| * | Make ImplicitInfo hashCode consistent with equals.Miles Sabin2017-04-031-1/+4
| | |
* | | Merge pull request #5773 from wpopielarski/2.12.xAdriaan Moors2017-04-042-1/+13
|\ \ \ | | | | | | | | Adds three Java 8 new Constant Pool structures to scalap.
| * | | Adds three Java 8 new Constant Pool structures to scalap.wpopielarski2017-03-132-1/+13
| | | |
* | | | Merge pull request #5813 from viktorklang/wip-improve-await-docs-√Seth Tisue2017-04-042-26/+59
|\ \ \ \ | | | | | | | | | | Improving ScalaDoc for ExecutionContexts
| * | | | Improving ScalaDoc for ExecutionContext and Await.Viktor Klang2017-03-292-26/+59
| | |/ / | |/| |
* | | | Merge pull request #5817 from ashawley/java-converters-typoSeth Tisue2017-03-311-6/+6
|\ \ \ \ | | | | | | | | | | Fix typo in JavaConverters doc
| * | | | Fix typo in JavaConverters docAaron S. Hawley2017-03-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no such thing as scala.collection.mutable.concurrent.Map error: object concurrent is not a member of package scala.collection.mutable Introduced in 2908236a
* | | | | Merge pull request #5802 from jrudolph/jr/w/ListBuffer-isEmpty-nonEmptyLukas Rytz2017-03-301-0/+4
|\ \ \ \ \ | |_|/ / / |/| | | | Implement ListBuffer.isEmpty / nonEmpty / head efficiently
| * | | | Implement ListBuffer.isEmpty / nonEmpty efficientlyJohannes Rudolph2017-03-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uses the extra length information to provide more efficient implementations. Evaluating these methods turns up with about 5-6% of akka-http message parsing.
* | | | | Merge pull request #5724 from jvican/stub-errors-2.12.xAdriaan Moors2017-03-275-12/+99
|\ \ \ \ \ | | | | | | | | | | | | SCP-009: Improve direct dependency experience
| * | | | | Improve stub error messages (SCP-009 proposal)jvican2017-03-245-12/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following commit message is a squash of several commit messages. - This is the 1st commit message: Add position to stub error messages Stub errors happen when we've started the initialization of a symbol but key information of this symbol is missing (the information cannot be found in any entry of the classpath not sources). When this error happens, we better have a good error message with a position to the place where the stub error came from. This commit goes into this direction by adding a `pos` value to `StubSymbol` and filling it in in all the use sites (especifically `UnPickler`). This commit also changes some tests that test stub errors-related issues. Concretely, `t6440` is using special Partest infrastructure and doens't pretty print the position, while `t5148` which uses the conventional infrastructure does. Hence the difference in the changes for both tests. - This is the commit message #2: Add partest infrastructure to test stub errors `StubErrorMessageTest` is the friend I introduce in this commit to help state stub errors. The strategy to test them is easy and builds upon previous concepts: we reuse `StoreReporterDirectTest` and add some methods that will compile the code and simulate a missing classpath entry by removing the class files from the class directory (the folder where Scalac compiles to). This first iteration allow us to programmatically check that stub errors are emitted under certain conditions. - This is the commit message #3: Improve contents of stub error message This commit does three things: * Keep track of completing symbol while unpickling First, it removes the previous `symbolOnCompletion` definition to be more restrictive/clear and use only positions, since only positions are used to report the error (the rest of the information comes from the context of the `UnPickler`). Second, it adds a new variable called `lazyCompletingSymbol` that is responsible for keeping a reference to the symbol that produces the stub error. This symbol will usually (always?) come from the classpath entries and therefore we don't have its position (that's why we keep track of `symbolOnCompletion` as well). This is the one that we have to explicitly use in the stub error message, the culprit so to speak. Aside from these two changes, this commit modifies the existing tests that are affected by the change in the error message, which is more precise now, and adds new tests for stub errors that happen in complex inner cases and in return type of `MethodType`. * Check that order of initialization is correct With the changes introduced previously to keep track of position of symbols coming from source files, we may ask ourselves: is this going to work always? What happens if two symbols the initialization of two symbols is intermingled and the stub error message gets the wrong position? This commit adds a test case and modifications to the test infrastructure to double check empirically that this does not happen. Usually, this interaction in symbol initialization won't happen because the `UnPickler` will lazily load all the buckets necessary for a symbol to be truly initialized, with the pertinent addresses from which this information has to be deserialized. This ensures that this operation is atomic and no other symbol initialization can happen in the meantime. Even though the previous paragraph is the feeling I got from reading the sources, this commit creates a test to double-check it. My attempt to be better safe than sorry. * Improve contents of the stub error message This commit modifies the format of the previous stub error message by being more precise in its formulation. It follows the structured format: ``` s"""|Symbol '${name.nameKind} ${owner.fullName}.$name' is missing from the classpath. |This symbol is required by '${lazyCompletingSymbol.kindString} ${lazyCompletingSymbol.fullName}'. ``` This format has the advantage that is more readable and explicit on what's happening. First, we report what is missing. Then, why it was required. Hopefully, people working on direct dependencies will find the new message friendlier. Having a good test suite to check the previously added code is important. This commit checks that stub errors happen in presence of well-known and widely used Scala features. These include: * Higher kinded types. * Type definitions. * Inheritance and subclasses. * Typeclasses and implicits. - This is the commit message #4: Use `lastTreeToTyper` to get better positions The previous strategy to get the last user-defined position for knowing what was the root cause (the trigger) of stub errors relied on instrumenting `def info`. This instrumentation, while easy to implement, is inefficient since we register the positions for symbols that are already completed. However, we cannot do it only for uncompleted symbols (!hasCompleteInfo) because the positions won't be correct anymore -- definitions using stub symbols (val b = new B) are for the compiler completed, but their use throws stub errors. This means that if we initialize symbols between a definition and its use, we'll use their positions instead of the position of `b`. To work around this we use `lastTreeToTyper`. We assume that stub errors will be thrown by Typer at soonest. The benefit of this approach is better error messages. The positions used in them are now as concrete as possible since they point to the exact tree that **uses** a symbol, instead of the one that **defines** it. Have a look at `StubErrorComplexInnerClass` for an example. This commit removes the previous infrastructure and replaces it by the new one. It also removes the fields positions from the subclasses of `StubSymbol`s. - This is the commit message #5: Keep track of completing symbols Make sure that cycles don't happen by keeping track of all the symbols that are being completed by `completeInternal`. Stub errors only need the last completing symbols, but the whole stack of symbols may be useful to reporting other error like cyclic initialization issues. I've added this per Jason's suggestion. I've implemented with a list because `remove` in an array buffer is linear. Array was not an option because I would need to resize it myself. I think that even though list is not as efficient memory-wise, it probably doesn't matter since the stack will usually be small. - This is the commit message #6: Remove `isPackage` from `newStubSymbol` Remove `isPackage` since in 2.12.x its value is not used.
* | | | | | `def run(log: ProcessLogger, connectInput: Boolean): Process` doesn't block ↵Pablo Fco. Pérez Hidalgo2017-03-241-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | until the spawned process exits neither does it return its exit code.
* | | | | | Merge pull request #5778 from som-snytt/issue/10225som-snytt2017-03-231-331/+283
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | SI-10225 Either docs compile
| * | | | | SI-10225 Either evinces good styleSom Snytt2017-03-211-58/+54
| | | | | | | | | | | | | | | | | | | | | | | | Per Seth.
| * | | | | SI-10225 Either docs compileSom Snytt2017-03-141-317/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | But without tut support, who knows. Boy scout aligns stars and updates several examples that didn't infer types in a way that compiles.
* | | | | | Merge pull request #5797 from jrudolph/patch-1Lukas Rytz2017-03-231-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Improve List creation in BatchingExecutor
| * | | | | | Improve List creation in BatchingExecutorJohannes Rudolph2017-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | It turned up in play profiling.
* | | | | | | Merge pull request #5783 from lrytz/t10231Adriaan Moors2017-03-221-7/+17
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-10231 Skip outer parameter when classfile parsing java param names
| * | | | | | | SI-10231 Skip outer parameter when classfile parsing java param namesLukas Rytz2017-03-171-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nested java classes have a synthetic outer parameter, which the classfile parser skips for the constructor symbol. When assigning parameter names from the MethodParameters classfile attribute, we also need to skip the first name in this case.
* | | | | | | | Merge pull request #5643 from som-snytt/issue/8417Adriaan Moors2017-03-222-18/+20
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | SI-8417 Check adapts of each param section
| * | | | | | | SI-8417 Check adapts of each param sectionSom Snytt2017-02-202-18/+20
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, adaptations like auto-tupling were checked only on the last param section of an application. This commit runs the sanity check always.
* | | | | | | Merge pull request #5592 from fommil/jar-open-closeJason Zaugg2017-03-221-18/+58
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-9632 don't keep JarFile open in ZipArchive
| * | | | | | | SI-9632 don't keep JarFile open in ZipArchiveSam Halliday2017-02-221-18/+58
| | | | | | | |
* | | | | | | | Merge pull request #5771 from som-snytt/issue/regex-doc-errSeth Tisue2017-03-211-16/+30
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix and improve Regex doc
| * | | | | | | | Fix and improve Regex docSom Snytt2017-03-101-16/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by @djvulee, there was an error in the example explaining the confusing behavior of `MatchIterator`. It's really confusing.
* | | | | | | | | remove two empty source filesSeth Tisue2017-03-202-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | noticed by the sharp-eyed @smarter
* | | | | | | | | fix typosSeth Tisue2017-03-201-1/+1
| |_|_|/ / / / / |/| | | | | | |
* | | | | | | | SI-10226 REPL handles paste when colorizedSom Snytt2017-03-142-5/+4
| |_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Colorization or Colourisation tripped up REPL on paste. Prompt detection should use the plain text prompt, not the ansified prompt. Manual test since .flags doesn't like it: ``` $ ./build/pack/bin/scala -Dscala.repl.prompt="%nhello > " Welcome to Scala 2.12.2-20170314-033334-d0c2620 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111). Type in expressions for evaluation. Or try :help. hello > 42 res0: Int = 42 hello > hello > 42 // Detected repl transcript. Paste more, or ctrl-D to finish. hello > "wtf?" // Replaying 2 commands from transcript. hello > 42 res1: Int = 42 hello > "wtf?" res2: String = wtf? hello > ```
* | | | | | | Merge pull request #5756 from rorygraves/2.12.x_depthboxingJason Zaugg2017-03-141-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Reduce boxing of scala.reflect.internal.Depth
| * | | | | | | Reduce boxing of scala.reflect.internal.DepthRory Graves2017-03-041-1/+1
| | | | | | | |
* | | | | | | | Merge pull request #5755 from rorygraves/2.12.x_map4Jason Zaugg2017-03-142-2/+2
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | | Improve the performance of Map4 to HashMap and Set4 to HashSet transitions
| * | | | | | | Performance improvements for Map4 to HashMap nad Set4 to HashSet transitionsRory Graves2017-03-042-2/+2
| | | | | | | |
* | | | | | | | Merge pull request #5675 from piyush-jaiswal/issue/9729som-snytt2017-03-101-2/+2
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | Add tests for ConsoleReporter.
| * | | | | | | Add tests for ConsoleReporter.piyush-jaiswal2017-03-111-2/+2
| | | | | | | |
* | | | | | | | Merge pull request #5761 from lrytz/sd329Adriaan Moors2017-03-101-5/+13
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Don't use `equals` for comparing java.lang.Double/Float
| * | | | | | | | Don't use `equals` for comparing java.lang.Double/FloatLukas Rytz2017-03-091-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/scala/scala-dev/issues/329 The `equals` method for java.lang.Double/Float behaves differently than comparing the `doubleValue`s / `floatValues` for `-0.0`/`0.0`/`NaN`.
* | | | | | | | | Merge pull request #5719 from retronym/ticket/10187Adriaan Moors2017-03-101-2/+10
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | SI-10187 Support mutation of mutable.HashMap in getOrElseUpdate