Skip to content

Commit a9729d3

Browse files
committed
support Scala 2.13.0-M5 (drop M4 support)
1 parent 7fca8d7 commit a9729d3

File tree

5 files changed

+139
-5
lines changed

5 files changed

+139
-5
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ env:
3131
- SCALA_VERSION=2.12.4
3232
- SCALA_VERSION=2.12.5
3333
- SCALA_VERSION=2.12.6
34-
- SCALA_VERSION=2.13.0-M4
34+
- SCALA_VERSION=2.13.0-M5
3535

3636
# there's no better way it seems.. https://github.com/travis-ci/travis-ci/issues/1519
3737
matrix:
@@ -52,7 +52,7 @@ matrix:
5252
- jdk: openjdk6
5353
env: SCALA_VERSION=2.12.6
5454
- jdk: openjdk6
55-
env: SCALA_VERSION=2.13.0-M4
55+
env: SCALA_VERSION=2.13.0-M5
5656

5757
# Increasing ReservedCodeCacheSize minimizes scala compiler-interface compile times
5858
script:

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ lazy val defaults = Seq(
5656
val earliest211 = 6
5757
val latest211 = 12
5858
val latest212 = 6
59-
val pre213 = List("M4")
59+
val pre213 = List("M5")
6060
val skipVersions = Set("2.11.9", "2.11.10")
6161
val scala211Versions =
6262
(earliest211 to latest211)

plugin/src/main/scala/com/typesafe/genjavadoc/JavaSig.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ trait JavaSig { this: TransformCake ⇒
3737
def boundsSig(bounds: List[Type]) = {
3838
bounds.headOption map (" extends " + boxedSig(_)) getOrElse ""
3939
}
40-
def paramSig(tsym: Symbol) = tsym.name + boundsSig(hiBounds(tsym.info.bounds))
40+
def paramSig(tsym: Symbol) = tsym.name.toString + boundsSig(hiBounds(tsym.info.bounds))
4141
def polyParamSig(tparams: List[Symbol]) = (
4242
if (tparams.isEmpty) ""
4343
else tparams map paramSig mkString ("<", ", ", ">"))

plugin/src/test/resources/patches/2.13.0.patch

+131
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,134 @@
6868
- */
6969
- public akka.rk.buh.is.it.A.D$ D () { throw new RuntimeException(); }
7070
}
71+
diff --git a/plugin/src/test/resources/expected_output/basic/akka/rk/buh/is/it/Blarb.java b/plugin/src/test/resources/expected_output/basic/akka/rk/buh/is/it/Blarb.java
72+
index b0dd497..4950950 100644
73+
--- target/expected_output/basic/akka/rk/buh/is/it/Blarb.java
74+
+++ target/expected_output/basic/akka/rk/buh/is/it/Blarb.java
75+
@@ -1,52 +1,51 @@
76+
package akka.rk.buh.is.it;
77+
-// no position
78+
/**
79+
* I am an object. I have no class.
80+
*/
81+
public class Blarb {
82+
- // no position
83+
static public class A$ implements akka.rk.buh.is.it.Blarb.Fuz, scala.Product, scala.Serializable {
84+
/**
85+
* Static reference to the singleton instance of this Scala object.
86+
*/
87+
public static final A$ MODULE$ = null;
88+
- public A$ () { throw new RuntimeException(); }
89+
- public java.lang.String productPrefix () { throw new RuntimeException(); }
90+
- public int productArity () { throw new RuntimeException(); }
91+
- public Object productElement (int x$1) { throw new RuntimeException(); }
92+
- public scala.collection.Iterator<java.lang.Object> productIterator () { throw new RuntimeException(); }
93+
- public boolean canEqual (Object x$1) { throw new RuntimeException(); }
94+
- public int hashCode () { throw new RuntimeException(); }
95+
- public java.lang.String toString () { throw new RuntimeException(); }
96+
- private java.lang.Object readResolve () { throw new RuntimeException(); }
97+
+ public A$ () { throw new RuntimeException(); }
98+
+ public java.lang.String productPrefix () { throw new RuntimeException(); }
99+
+ public int productArity () { throw new RuntimeException(); }
100+
+ public Object productElement (int x$1) { throw new RuntimeException(); }
101+
+ public java.lang.String productElementName (int x$1) { throw new RuntimeException(); }
102+
+ public scala.collection.Iterator<java.lang.Object> productIterator () { throw new RuntimeException(); }
103+
+ public boolean canEqual (Object x$1) { throw new RuntimeException(); }
104+
+ public int hashCode () { throw new RuntimeException(); }
105+
+ public java.lang.String toString () { throw new RuntimeException(); }
106+
+ private java.lang.Object readResolve () { throw new RuntimeException(); }
107+
}
108+
static public class B implements akka.rk.buh.is.it.Blarb.Fuz, scala.Product, scala.Serializable {
109+
- public java.lang.String x () { throw new RuntimeException(); }
110+
+ public java.lang.String x () { throw new RuntimeException(); }
111+
// not preceding
112+
- public B (java.lang.String x) { throw new RuntimeException(); }
113+
- public akka.rk.buh.is.it.Blarb.B copy (java.lang.String x) { throw new RuntimeException(); }
114+
- public java.lang.String copy$default$1 () { throw new RuntimeException(); }
115+
+ public B (java.lang.String x) { throw new RuntimeException(); }
116+
+ public akka.rk.buh.is.it.Blarb.B copy (java.lang.String x) { throw new RuntimeException(); }
117+
+ public java.lang.String copy$default$1 () { throw new RuntimeException(); }
118+
// not preceding
119+
- public java.lang.String productPrefix () { throw new RuntimeException(); }
120+
- public int productArity () { throw new RuntimeException(); }
121+
- public Object productElement (int x$1) { throw new RuntimeException(); }
122+
- public scala.collection.Iterator<java.lang.Object> productIterator () { throw new RuntimeException(); }
123+
- public boolean canEqual (Object x$1) { throw new RuntimeException(); }
124+
- public int hashCode () { throw new RuntimeException(); }
125+
- public java.lang.String toString () { throw new RuntimeException(); }
126+
- public boolean equals (Object x$1) { throw new RuntimeException(); }
127+
+ public java.lang.String productPrefix () { throw new RuntimeException(); }
128+
+ public int productArity () { throw new RuntimeException(); }
129+
+ public Object productElement (int x$1) { throw new RuntimeException(); }
130+
+ public java.lang.String productElementName (int x$1) { throw new RuntimeException(); }
131+
+ public scala.collection.Iterator<java.lang.Object> productIterator () { throw new RuntimeException(); }
132+
+ public boolean canEqual (Object x$1) { throw new RuntimeException(); }
133+
+ public int hashCode () { throw new RuntimeException(); }
134+
+ public java.lang.String toString () { throw new RuntimeException(); }
135+
+ public boolean equals (Object x$1) { throw new RuntimeException(); }
136+
}
137+
- // no position
138+
static public class B$ extends scala.runtime.AbstractFunction1<java.lang.String, akka.rk.buh.is.it.Blarb.B> implements scala.Serializable {
139+
/**
140+
* Static reference to the singleton instance of this Scala object.
141+
*/
142+
public static final B$ MODULE$ = null;
143+
- public B$ () { throw new RuntimeException(); }
144+
- public final java.lang.String toString () { throw new RuntimeException(); }
145+
- public akka.rk.buh.is.it.Blarb.B apply (java.lang.String x) { throw new RuntimeException(); }
146+
- public scala.Option<java.lang.String> unapply (akka.rk.buh.is.it.Blarb.B x$0) { throw new RuntimeException(); }
147+
- private java.lang.Object readResolve () { throw new RuntimeException(); }
148+
+ public B$ () { throw new RuntimeException(); }
149+
+ public final java.lang.String toString () { throw new RuntimeException(); }
150+
+ public akka.rk.buh.is.it.Blarb.B apply (java.lang.String x) { throw new RuntimeException(); }
151+
+ public scala.Option<java.lang.String> unapply (akka.rk.buh.is.it.Blarb.B x$0) { throw new RuntimeException(); }
152+
+ private java.lang.Object readResolve () { throw new RuntimeException(); }
153+
}
154+
static public interface Fuz {
155+
}
156+
--- target/expected_output/basic/akka/rk/buh/is/it/CompressionProtocol.java
157+
+++ target/expected_output/basic/akka/rk/buh/is/it/CompressionProtocol.java
158+
@@ -9,6 +9,7 @@
159+
static public akka.rk.buh.is.it.CompressionProtocol.Events.HeavyHitterDetected apply (Object key, int id, long count) { throw new RuntimeException(); }
160+
static public scala.Option<scala.Tuple3<java.lang.Object, java.lang.Object, java.lang.Object>> unapply (akka.rk.buh.is.it.CompressionProtocol.Events.HeavyHitterDetected x$0) { throw new RuntimeException(); }
161+
static private java.lang.Object readResolve () { throw new RuntimeException(); }
162+
+ static public scala.collection.Iterator<java.lang.String> productElementNames () { throw new RuntimeException(); }
163+
public Object key () { throw new RuntimeException(); }
164+
public int id () { throw new RuntimeException(); }
165+
public long count () { throw new RuntimeException(); }
166+
@@ -23,6 +24,7 @@
167+
public java.lang.String productPrefix () { throw new RuntimeException(); }
168+
public int productArity () { throw new RuntimeException(); }
169+
public Object productElement (int x$1) { throw new RuntimeException(); }
170+
+ public java.lang.String productElementName (int x$1) { throw new RuntimeException(); }
171+
public scala.collection.Iterator<java.lang.Object> productIterator () { throw new RuntimeException(); }
172+
public boolean canEqual (Object x$1) { throw new RuntimeException(); }
173+
public int hashCode () { throw new RuntimeException(); }
174+
--- target/expected_output/basic/akka/rk/buh/is/it/EWMA.java
175+
+++ target/expected_output/basic/akka/rk/buh/is/it/EWMA.java
176+
@@ -28,6 +28,7 @@
177+
static public akka.rk.buh.is.it.EWMA apply (double value, double alpha) { throw new RuntimeException(); }
178+
static public scala.Option<scala.Tuple2<java.lang.Object, java.lang.Object>> unapply (akka.rk.buh.is.it.EWMA x$0) { throw new RuntimeException(); }
179+
static private java.lang.Object readResolve () { throw new RuntimeException(); }
180+
+ static public scala.collection.Iterator<java.lang.String> productElementNames () { throw new RuntimeException(); }
181+
public double value () { throw new RuntimeException(); }
182+
public double alpha () { throw new RuntimeException(); }
183+
// not preceding
184+
@@ -48,6 +49,7 @@
185+
public java.lang.String productPrefix () { throw new RuntimeException(); }
186+
public int productArity () { throw new RuntimeException(); }
187+
public Object productElement (int x$1) { throw new RuntimeException(); }
188+
+ public java.lang.String productElementName (int x$1) { throw new RuntimeException(); }
189+
public scala.collection.Iterator<java.lang.Object> productIterator () { throw new RuntimeException(); }
190+
public boolean canEqual (Object x$1) { throw new RuntimeException(); }
191+
public int hashCode () { throw new RuntimeException(); }
192+
--- target/expected_output/basic/akka/rk/buh/is/it/Trait.java
193+
+++ target/expected_output/basic/akka/rk/buh/is/it/Trait.java
194+
@@ -6,6 +6,7 @@
195+
public java.lang.String productPrefix () { throw new RuntimeException(); }
196+
public int productArity () { throw new RuntimeException(); }
197+
public Object productElement (int x$1) { throw new RuntimeException(); }
198+
+ public java.lang.String productElementName (int x$1) { throw new RuntimeException(); }
199+
public scala.collection.Iterator<java.lang.Object> productIterator () { throw new RuntimeException(); }
200+
public boolean canEqual (Object x$1) { throw new RuntimeException(); }
201+
public int hashCode () { throw new RuntimeException(); }

plugin/src/test/scala/com/typesafe/genjavadoc/SignatureSpec.scala

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ object SignatureSpec {
1818

1919
// this should match up against the definition in GenJavadocPlugin
2020
// with the addition of "$lzycompute", which is special
21-
val defaultFilteredStrings = Set("$$", "$lzycompute")
21+
val defaultFilteredStrings = Set("$$", "$lzycompute",
22+
// and this one's a known issue, https://github.com/lightbend/genjavadoc/issues/143
23+
"productElementNames"
24+
)
2225

2326
// they can't start with numbers either
2427
val startsWithNumber = "^\\d".r

0 commit comments

Comments
 (0)