@@ -11,7 +11,7 @@ trait RpcMappings { this: RpcMacroCommons with RpcSymbols =>
11
11
import c .universe ._
12
12
13
13
def collectMethodMappings [Raw <: TagMatchingSymbol with AritySymbol , M ](
14
- rawSymbols : List [Raw ], rawShortDesc : String , realMethods : List [RealMethod ])(
14
+ rawSymbols : List [Raw ], errorBase : String , realMethods : List [RealMethod ])(
15
15
createMapping : (Raw , MatchedMethod ) => Res [M ]): List [M ] = {
16
16
17
17
val failedReals = new ListBuffer [String ]
@@ -31,7 +31,7 @@ trait RpcMappings { this: RpcMacroCommons with RpcSymbols =>
31
31
val unmatchedReport = errors.map { case (raw, err) =>
32
32
s " * ${raw.shortDescription} ${raw.nameStr} did not match: ${indent(err, " " )}"
33
33
}.mkString(" \n " )
34
- s " it has no matching $rawShortDesc : \n $unmatchedReport"
34
+ s " $errorBase : \n $unmatchedReport"
35
35
} match {
36
36
case Ok (v) => Some (v)
37
37
case Fail (msg) =>
@@ -40,10 +40,6 @@ trait RpcMappings { this: RpcMacroCommons with RpcSymbols =>
40
40
}
41
41
}
42
42
43
- if (failedReals.nonEmpty) {
44
- abort(s " Following real methods could not be mapped to $rawShortDesc: ${failedReals.mkString(" ," )}" )
45
- }
46
-
47
43
result
48
44
}
49
45
@@ -307,8 +303,10 @@ trait RpcMappings { this: RpcMacroCommons with RpcSymbols =>
307
303
} yield MethodMapping (matchedMethod, rawMethod, paramMappings, resultConv)
308
304
}
309
305
310
- lazy val methodMappings : List [MethodMapping ] =
311
- collectMethodMappings(raw.rawMethods, " raw methods" , real.realMethods)(mappingRes)
306
+ lazy val methodMappings : List [MethodMapping ] = {
307
+ val errorBase = s " it has no matching raw methods in ${raw.description}"
308
+ collectMethodMappings(raw.rawMethods, errorBase, real.realMethods)(mappingRes)
309
+ }
312
310
313
311
def ensureUniqueRpcNames (): Unit =
314
312
methodMappings.groupBy(_.matchedMethod.rpcName).foreach {
0 commit comments