Skip to content

Commit 09f92d2

Browse files
committed
Merge commit '7ba38a0' into merge/2.11.x-to-2.12.x-20150129
Conflicts: build.number src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala src/library/scala/collection/Iterator.scala versions.properties
2 parents af38816 + 7ba38a0 commit 09f92d2

File tree

463 files changed

+8975
-2516
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

463 files changed

+8975
-2516
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
# eclipse, intellij
4040
/.classpath
4141
/.project
42-
/src/intellij/*.iml
43-
/src/intellij/*.ipr
44-
/src/intellij/*.iws
42+
/src/intellij*/*.iml
43+
/src/intellij*/*.ipr
44+
/src/intellij*/*.iws
4545
**/.cache
4646
/.idea
4747
/.settings

bincompat-backward.whitelist.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,16 @@ filter {
207207
{
208208
matchName="scala.collection.immutable.Stream.scala$collection$immutable$Stream$$loop$4"
209209
problemName=MissingMethodProblem
210+
},
211+
// SI-8946
212+
{
213+
matchName="scala.reflect.runtime.ThreadLocalStorage#MyThreadLocalStorage.values"
214+
problemName=MissingMethodProblem
215+
},
216+
// the below method was the unused private (sic!) method but the compatibility checker was complaining about it
217+
{
218+
matchName="scala.reflect.io.ZipArchive.scala$reflect$io$ZipArchive$$walkIterator"
219+
problemName=MissingMethodProblem
210220
}
211221
]
212222
}

bincompat-forward.whitelist.conf

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,28 @@ filter {
389389
{
390390
matchName="scala.collection.immutable.Stream.scala$collection$immutable$Stream$$loop$2"
391391
problemName=MissingMethodProblem
392+
},
393+
// changes needed by ZipArchiveFileLookup (the flat classpath representation)
394+
{
395+
matchName="scala.reflect.io.FileZipArchive.allDirs"
396+
problemName=MissingMethodProblem
397+
},
398+
{
399+
matchName="scala.reflect.io.FileZipArchive.root"
400+
problemName=MissingMethodProblem
401+
},
402+
// introduced the harmless method (instead of the repeated code in several places)
403+
{
404+
matchName="scala.reflect.runtime.Settings#MultiStringSetting.valueSetByUser"
405+
problemName=MissingMethodProblem
406+
},
407+
{
408+
matchName="scala.reflect.runtime.Settings#BooleanSetting.valueSetByUser"
409+
problemName=MissingMethodProblem
410+
},
411+
{
412+
matchName="scala.reflect.runtime.Settings#IntSetting.valueSetByUser"
413+
problemName=MissingMethodProblem
392414
}
393415
]
394416
}

build.xml

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -272,28 +272,36 @@ TODO:
272272
</artifact:dependencies>
273273

274274
<!-- JUnit -->
275-
<property name="junit.version" value="4.10"/>
275+
<property name="junit.version" value="4.11"/>
276276
<artifact:dependencies pathId="junit.classpath" filesetId="junit.fileset">
277277
<dependency groupId="junit" artifactId="junit" version="${junit.version}"/>
278278
</artifact:dependencies>
279279
<copy-deps project="junit"/>
280280

281281
<!-- Pax runner -->
282-
<property name="pax.exam.version" value="2.6.0"/>
282+
<property name="pax.exam.version" value="3.5.0"/><!-- Last version which supports Java 6 -->
283+
<property name="osgi.felix.version" value="4.0.3"/>
284+
<property name="osgi.equinox.version" value="3.7.1"/>
283285
<artifact:dependencies pathId="pax.exam.classpath" filesetId="pax.exam.fileset">
284-
<dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-container-native" version="${pax.exam.version}"/>
286+
<dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-container-native" version="${pax.exam.version}">
287+
<exclusion groupId="org.osgi" artifactId="org.osgi.core"/><!-- Avoid dragging in a dependency which requires Java >6 -->
288+
</dependency>
285289
<dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-junit4" version="${pax.exam.version}"/>
286290
<dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-link-assembly" version="${pax.exam.version}"/>
287-
<!-- upgraded to 1.6.0 to get fix for https://ops4j1.jira.com/browse/PAXURL-217
288-
https://ops4j1.jira.com/browse/PAXURL-138 is still unresolved... -->
289-
<dependency groupId="org.ops4j.pax.url" artifactId="pax-url-aether" version="1.6.0"/>
290-
<dependency groupId="org.ops4j.pax.swissbox" artifactId="pax-swissbox-framework" version="1.5.1"/>
291-
<dependency groupId="ch.qos.logback" artifactId="logback-core" version="0.9.20"/>
292-
<dependency groupId="ch.qos.logback" artifactId="logback-classic" version="0.9.20"/>
291+
<dependency groupId="org.ops4j.pax.url" artifactId="pax-url-aether" version="2.2.0"/>
292+
<dependency groupId="org.ops4j.pax.swissbox" artifactId="pax-swissbox-tracker" version="1.8.0"/>
293+
<dependency groupId="ch.qos.logback" artifactId="logback-core" version="1.1.2"/>
294+
<dependency groupId="ch.qos.logback" artifactId="logback-classic" version="1.1.2"/>
293295
<dependency groupId="junit" artifactId="junit" version="${junit.version}"/>
294-
<dependency groupId="org.apache.felix" artifactId="org.apache.felix.framework" version="3.2.2"/>
295296
</artifact:dependencies>
296297

298+
<artifact:dependencies pathId="osgi.framework.felix">
299+
<dependency groupId="org.apache.felix" artifactId="org.apache.felix.framework" version="${osgi.felix.version}"/>
300+
</artifact:dependencies>
301+
302+
<artifact:dependencies pathId="osgi.framework.equinox">
303+
<dependency groupId="org.eclipse.osgi" artifactId="org.eclipse.osgi" version="${osgi.equinox.version}"/>
304+
</artifact:dependencies>
297305

298306
<artifact:remoteRepository id="sonatype-release" url="https://oss.sonatype.org/content/repositories/releases"/>
299307
<artifact:remoteRepository id="extra-repo" url="${extra.repo.url}"/>
@@ -840,8 +848,7 @@ TODO:
840848
-->
841849

842850
<path id="pack.reflect.files"> <fileset dir="${build-quick.dir}/classes/reflect"/> </path>
843-
<path id="pack.scalap.files"> <fileset dir="${build-quick.dir}/classes/scalap"/>
844-
<fileset file="${src.dir}/scalap/decoder.properties"/> </path>
851+
<path id="pack.scalap.files"> <fileset dir="${build-quick.dir}/classes/scalap"/> </path>
845852

846853
<path id="pack.partest-extras.files"> <fileset dir="${build-quick.dir}/classes/partest-extras"/> </path>
847854
<path id="pack.partest-javaagent.files"> <fileset dir="${build-quick.dir}/classes/partest-javaagent"/> </path>
@@ -984,6 +991,16 @@ TODO:
984991
<path refid="forkjoin.classpath"/>
985992
</path>
986993

994+
<path id="test.osgi.compiler.build.path.felix">
995+
<path refid="test.osgi.compiler.build.path"/>
996+
<path refid="osgi.framework.felix"/>
997+
</path>
998+
999+
<path id="test.osgi.compiler.build.path.equinox">
1000+
<path refid="test.osgi.compiler.build.path"/>
1001+
<path refid="osgi.framework.equinox"/>
1002+
</path>
1003+
9871004
<path id="test.positions.sub.build.path" path="${build-quick.dir}/classes/library"/>
9881005

9891006
<!-- TODO: consolidate *.includes -->
@@ -1351,7 +1368,7 @@ TODO:
13511368
srcdir="${test.osgi.src}"
13521369
jvmargs="${scalacfork.jvmargs}">
13531370
<include name="**/*.scala"/>
1354-
<compilationpath refid="test.osgi.compiler.build.path"/>
1371+
<compilationpath refid="test.osgi.compiler.build.path.felix"/>
13551372
</scalacfork>
13561373
<touch file="${build-osgi.dir}/test-compile.complete" verbose="no"/>
13571374
<stopwatch name="test.osgi.compiler.timer" action="total"/>
@@ -1365,8 +1382,22 @@ TODO:
13651382
<stopwatch name="test.osgi.timer"/>
13661383
<mkdir dir="${test.osgi.classes}"/>
13671384

1385+
<echo message="Test pass 1 of 2 using Apache Felix ${osgi.felix.version}"/>
1386+
<junit fork="yes" haltonfailure="yes">
1387+
<classpath refid="test.osgi.compiler.build.path.felix"/>
1388+
<jvmarg value="-Duser.home=${user.home}"/>
1389+
<batchtest fork="yes" todir="${build-osgi.dir}">
1390+
<fileset dir="${test.osgi.classes}">
1391+
<include name="**/*Test.class"/>
1392+
</fileset>
1393+
</batchtest>
1394+
<formatter type="xml" />
1395+
</junit>
1396+
1397+
<echo message="Test pass 2 of 2 using Eclipse Equinox ${osgi.equinox.version}"/>
13681398
<junit fork="yes" haltonfailure="yes">
1369-
<classpath refid="test.osgi.compiler.build.path"/>
1399+
<classpath refid="test.osgi.compiler.build.path.equinox"/>
1400+
<jvmarg value="-Duser.home=${user.home}"/>
13701401
<batchtest fork="yes" todir="${build-osgi.dir}">
13711402
<fileset dir="${test.osgi.classes}">
13721403
<include name="**/*Test.class"/>

docs/development/scala.tools.nsc/zipfile-bug.txt

Lines changed: 0 additions & 93 deletions
This file was deleted.

spec/01-lexical-syntax.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,14 +323,12 @@ Literal ::= [‘-’] integerLiteral
323323
### Integer Literals
324324

325325
```ebnf
326-
integerLiteral ::= (decimalNumeral | hexNumeral | octalNumeral)
326+
integerLiteral ::= (decimalNumeral | hexNumeral)
327327
[‘L’ | ‘l’]
328328
decimalNumeral ::= ‘0’ | nonZeroDigit {digit}
329-
hexNumeral ::= ‘0’ ‘x’ hexDigit {hexDigit}
330-
octalNumeral ::= ‘0’ octalDigit {octalDigit}
329+
hexNumeral ::= ‘0’ (‘x’ | ‘X’) hexDigit {hexDigit}
331330
digit ::= ‘0’ | nonZeroDigit
332331
nonZeroDigit ::= ‘1’ | … | ‘9’
333-
octalDigit ::= ‘0’ | … | ‘7’
334332
```
335333

336334
Integer literals are usually of type `Int`, or of type

spec/13-syntax-summary.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ idrest ::= {letter | digit} [‘_’ op]
4141
4242
integerLiteral ::= (decimalNumeral | hexNumeral) [‘L’ | ‘l’]
4343
decimalNumeral ::= ‘0’ | nonZeroDigit {digit}
44-
hexNumeral ::= ‘0’ ‘x’ hexDigit {hexDigit}
44+
hexNumeral ::= ‘0’ (‘x’ | ‘X’) hexDigit {hexDigit}
4545
digit ::= ‘0’ | nonZeroDigit
4646
nonZeroDigit ::= ‘1’ | … | ‘9’
4747
@@ -210,7 +210,7 @@ grammar.
210210
ClassParams ::= ClassParam {‘,’ ClassParam}
211211
ClassParam ::= {Annotation} {Modifier} [(`val' | `var')]
212212
id ‘:’ ParamType [‘=’ Expr]
213-
Bindings ::= ‘(’ Binding {‘,’ Binding ‘)’
213+
Bindings ::= ‘(’ Binding {‘,’ Binding} ‘)’
214214
Binding ::= (id | ‘_’) [‘:’ Type]
215215
216216
Modifier ::= LocalModifier

spec/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ layout: toc
66
# The Scala Language Specification
77
# Version 2.11
88

9+
### Maintained online at [https://github.com/scala/scala/tree/2.11.x/spec](https://github.com/scala/scala/tree/2.11.x/spec)
10+
911
### Martin Odersky, Philippe Altherr, Vincent Cremet, Gilles Dubochet, Burak Emir, Philipp Haller, Stéphane Micheloud, Nikolay Mihaylov, Adriaan Moors, Lukas Rytz, Michel Schinz, Erik Stenman, Matthias Zenger
1012

1113
### Markdown Conversion by Iain McGinniss.

src/compiler/scala/reflect/macros/compiler/DefaultMacroCompiler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ abstract class DefaultMacroCompiler extends Resolvers
1212
import treeInfo._
1313
import definitions._
1414
val runDefinitions = currentRun.runDefinitions
15-
import runDefinitions.{Predef_???, _}
15+
import runDefinitions.Predef_???
1616

1717
val typer: global.analyzer.Typer
1818
val context = typer.context

src/compiler/scala/reflect/macros/compiler/Errors.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ trait Errors extends Traces {
1111
import analyzer._
1212
import definitions._
1313
import treeInfo._
14-
import typer.TyperErrorGen._
1514
import typer.infer.InferErrorGen._
1615
import runDefinitions._
1716
def globalSettings = global.settings

src/compiler/scala/reflect/macros/compiler/Resolvers.scala

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
package scala.reflect.macros
22
package compiler
33

4-
import scala.reflect.internal.Flags._
5-
import scala.reflect.macros.TypecheckException
6-
74
trait Resolvers {
85
self: DefaultMacroCompiler =>
96

107
import global._
118
import analyzer._
12-
import definitions._
139
import treeInfo._
14-
import gen._
15-
import runDefinitions._
1610

1711
trait Resolver {
1812
self: MacroImplRefCompiler =>

src/compiler/scala/reflect/macros/compiler/Validators.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ trait Validators {
99
import global._
1010
import analyzer._
1111
import definitions._
12-
import runDefinitions.{Predef_???, _}
12+
import runDefinitions.Predef_???
1313

1414
trait Validator {
1515
self: MacroImplRefCompiler =>

src/compiler/scala/reflect/macros/contexts/Infrastructure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ trait Infrastructure {
1212

1313
def compilerSettings: List[String] = universe.settings.recreateArgs
1414

15-
def classPath: List[java.net.URL] = global.classPath.asURLs
15+
def classPath: List[java.net.URL] = global.classPath.asURLs.toList
1616
}

src/compiler/scala/reflect/macros/util/Helpers.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,10 @@ trait Helpers {
5454
*
5555
* @see Metalevels.scala for more information and examples about metalevels
5656
*/
57-
def increaseMetalevel(pre: Type, tp: Type): Type = {
58-
val runDefinitions = currentRun.runDefinitions
59-
import runDefinitions._
60-
57+
def increaseMetalevel(pre: Type, tp: Type): Type =
6158
transparentShallowTransform(RepeatedParamClass, tp) {
6259
case tp => typeRef(pre, MacroContextExprClass, List(tp))
6360
}
64-
}
6561

6662
/** Transforms c.Expr[T] types into c.Tree and leaves the rest unchanged.
6763
*/

src/compiler/scala/reflect/quasiquotes/Parsers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ trait Parsers { self: Quasiquotes =>
9090
case _ => super.makePatDef(mods, pat, rhs)
9191
}
9292
}
93-
import treeBuilder.{global => _, unit => _, _}
93+
import treeBuilder.{global => _, unit => _}
9494

9595
// q"def foo($x)"
9696
override def param(owner: Name, implicitmod: Int, caseParam: Boolean): ValDef =

src/compiler/scala/reflect/quasiquotes/Reifiers.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import scala.reflect.internal.Flags._
88
trait Reifiers { self: Quasiquotes =>
99
import global._
1010
import global.build._
11-
import global.treeInfo._
1211
import global.definitions._
1312
import Rank._
1413
import universeTypes._

src/compiler/scala/reflect/reify/Reifier.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ abstract class Reifier extends States
2121
import global._
2222
import definitions._
2323
private val runDefinitions = currentRun.runDefinitions
24-
import runDefinitions._
2524

2625
val typer: global.analyzer.Typer
2726
val universe: Tree

0 commit comments

Comments
 (0)