This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override def qlApply(invInit:Invocation):QValue = { | |
invInit.ifMatches(sig) { inv => | |
inv.contextAs[URLableType] { pt => | |
inv.context.collect(ParsedTextType) { elemContext => | |
val wikitextOpt = for ( | |
elemV <- elemContext.value.firstOpt; | |
url <- pt.getURL(elemContext)(elemV); | |
label = inv.oldProcessParam(0, elemContext).wikify(elemContext) | |
) | |
yield QWikitext("[") + label + QWikitext(s"]($url)") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override def qlApply(inv:Invocation):QValue = { | |
for ( | |
pt <- inv.contextTypeAs[URLableType]; | |
// Problem 1: List | |
elemContext <- inv.contextElements; | |
// Problem 2: Option | |
elemV <- elemContext.value.firstOpt; | |
// Problem 3: another Option | |
url <- pt.getURL(elemContext)(elemV); | |
paramVal <- inv.processParam(0, elemContext); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private[ql] case class InvocationValueImpl[T](inv:Invocation, vs:Iterable[T], errOpt:Option[PublicException] = None)(implicit val ecology:Ecology) | |
extends InvocationValue[T] with EcologyMember | |
{ | |
lazy val QL = interface[QL] | |
def map[R](f:T => R):InvocationValue[R] = { | |
errOpt match { | |
// If there has already been an error, just propagate that: | |
case Some(err) => InvocationValueImpl[R](inv, None, errOpt) | |
// Otherwise, actually call f: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override def qlApply(inv:Invocation):QValue = { | |
for ( | |
pt <- inv.contextTypeAs[URLableType]; | |
elemContext <- inv.contextElements; | |
elemV <- inv.opt(elemContext.value.firstOpt); | |
url <- inv.opt(pt.getURL(elemContext)(elemV)); | |
paramVal <- inv.processParam(0, elemContext); | |
label = paramVal.wikify(elemContext); | |
wikitext = QWikitext("[") + label + QWikitext(s"]($url)") | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
at scala.tools.nsc.Global.assert(Global.scala:262) | |
at org.scalajs.core.compiler.GenJSCode$JSCodePhase.genStatOrExpr(GenJSCode.scala:1011) | |
at org.scalajs.core.compiler.GenJSCode$JSCodePhase.genExpr(GenJSCode.scala:930) | |
at org.scalajs.core.compiler.GenJSCode$JSCodePhase$$anonfun$genActualArgs$3.apply(GenJSCode.scala:3274) | |
at org.scalajs.core.compiler.GenJSCode$JSCodePhase$$anonfun$genActualArgs$3.apply(GenJSCode.scala:3266) | |
at scala.collection.TraversableLike$WithFilter$$anonfun$map$2.apply(TraversableLike.scala:728) | |
at scala.collection.immutable.List.foreach(List.scala:381) | |
at scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:727) | |
at org.scalajs.core.compiler.GenJSCode$JSCodePhase.genActualArgs(GenJSCode.scala:3266) | |
at org.scalajs.core.compiler.GenJSCode$JSCodePhase.genApplyNew(GenJSCode.scala:1496) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[querkiServer] $ last querkiClient/test:compile | |
[debug] | |
[debug] Initial source changes: | |
[debug] removed:Set() | |
[debug] added: Set() | |
[debug] modified: Set(C:\Users\jducoeur\Documents\GitHub\Querki\querki\scalajs\src\test\scala\querki\test\FutureCrashTest.scala) | |
[debug] Removed products: Set() | |
[debug] External API changes: API Changes: Set() | |
[debug] Modified binary dependencies: Set() | |
[debug] Initial directly invalidated sources: Set(C:\Users\jducoeur\Documents\GitHub\Querki\querki\scalajs\src\test\scala\querki\test\FutureCrashTest.scala) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt.Project.projectToRef | |
lazy val clients = Seq(querkiClient) | |
lazy val scalaV = "2.11.6" | |
lazy val akkaV = "2.3.11" | |
lazy val appV = "1.2.1" | |
lazy val sharedSrcDir = "scala" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jducoeur@querki-dev2:~/GitHub/Querki/querki/scala$ ls -R jvm | |
jvm: | |
src target | |
jvm/src: | |
main | |
jvm/src/main: | |
scala |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jducoeur@querki-dev2:~/GitHub/Querki/querki/scala$ ls -R js | |
js: | |
src target | |
js/src: | |
main | |
js/src/main: | |
scala |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[info] Compiling 40 Scala sources to /home/jducoeur/GitHub/Querki/querki/scala/jvm/target/scala-2.11/classes... | |
[error] /home/jducoeur/GitHub/Querki/querki/scala/shared/src/main/scala/models/Wikitext.scala:5: object MainDecorator is not a member of package querki.qtext | |
[error] import querki.qtext.{MainDecorator, Transformer} | |
[error] ^ | |
[error] /home/jducoeur/GitHub/Querki/querki/scala/shared/src/main/scala/models/Wikitext.scala:6: object html is not a member of package querki | |
[error] import querki.html.Html | |
[error] ^ | |
[error] /home/jducoeur/GitHub/Querki/querki/scala/shared/src/main/scala/models/Wikitext.scala:10: object fleem is not a member of package querki | |
[error] import querki.fleem | |
[error] ^ |
OlderNewer