Skip to content

[0.13.7] Natural whitespace parsing breaks XML #1666

@eed3si9n

Description

@eed3si9n

Found using community-build - https://jenkins-dbuild.typesafe.com:8499/job/Community-2.11.x-manual/56/console

steps

[scala-stm] [error] name := "scala-stm"
[scala-stm] [error] 
[scala-stm] [error] organization := "org.scala-stm"
[scala-stm] [error] 
[scala-stm] [error] version := "0.7"
[scala-stm] [error] 
[scala-stm] [error] scalaVersion := "2.11.0"
[scala-stm] [error] 
[scala-stm] [error] //scalaBinaryVersion := "2.11.0-M8"
[scala-stm] [error] 
[scala-stm] [error] //crossScalaVersions := Seq("2.10.1-RC2", "2.10.0", "2.9.3", "2.9.2")
[scala-stm] [error] 
[scala-stm] [error] //libraryDependencies += ("org.scalatest" % "scalatest_2.10.0-RC5" % "[1.5,)" % "test")
[scala-stm] [error] libraryDependencies += ("org.scalatest" %% "scalatest" % "[1.5,)" % "test")
[scala-stm] [error] 
[scala-stm] [error] libraryDependencies += ("junit" % "junit" % "4.5" % "test")
[scala-stm] [error] 
[scala-stm] [error] // skip exhaustive tests
[scala-stm] [error] testOptions += Tests.Argument("-l", "slow")
[scala-stm] [error] 
[scala-stm] [error] // test of TxnExecutor.transformDefault must be run by itself
[scala-stm] [error] parallelExecution in Test := false
[scala-stm] [error] 
[scala-stm] [error] // make sure Java classes use 1.6 file format
[scala-stm] [error] javacOptions in (Compile, compile) ++= Seq("-source", "1.6", "-target", "1.6")
[scala-stm] [error] 
[scala-stm] [error] ////////////////////
[scala-stm] [error] // publishing
[scala-stm] [error] 
[scala-stm] [error] pomExtra :=
[scala-stm] [error]   <url>http://nbronson.github.com/scala-stm/</url>
[scala-stm] [error]   <licenses>
[scala-stm] [error]     <license>
[scala-stm] [error]       <name>BSD</name>
[scala-stm] [error]       <url>https://github.com/nbronson/scala-stm/blob/master/LICENSE.txt</url>
[scala-stm] [error]       <distribution>repo</distribution>
[scala-stm] [error]     </license>
[scala-stm] [error]   </licenses>
[scala-stm] [error]   <scm>
[scala-stm] [error]     <connection>scm:git:git@github.com:nbronson/scala-stm.git</connection>
[scala-stm] [error]     <url>git@github.com:nbronson/scala-stm.git</url>
[scala-stm] [error]   </scm>
[scala-stm] [error]   <developers>
[scala-stm] [error]     <developer>
[scala-stm] [error]       <id>nbronson</id>
[scala-stm] [error]       <name>Nathan Bronson</name>
[scala-stm] [error]       <email>ngbronson@gmail.com</email>
[scala-stm] [error]     </developer>
[scala-stm] [error]   </developers>
[scala-stm] [error] 
[scala-stm] [error] publishMavenStyle := true
[scala-stm] [error] 
[scala-stm] [error] publishTo <<= (version) { v: String =>
[scala-stm] [error]     val base = "https://oss.sonatype.org/"
[scala-stm] [error]     if (v.trim.endsWith("SNAPSHOT"))
[scala-stm] [error]       Some("snapshots" at base + "content/repositories/snapshots/")
[scala-stm] [error]     else
[scala-stm] [error]       Some("releases" at base + "service/local/staging/deploy/maven2/")
[scala-stm] [error]   }
[scala-stm] [error] 
[scala-stm] [error] // exclude scalatest from the Maven POM
[scala-stm] [error] pomPostProcess := { xi: scala.xml.Node =>
[scala-stm] [error]     import scala.xml._
[scala-stm] [error]     val badDeps = (xi \\ "dependency") filter {
[scala-stm] [error]       x => (x \ "artifactId").text != "scala-library"
[scala-stm] [error]     } toSet
[scala-stm] [error]     def filt(root: Node): Node = root match {
[scala-stm] [error]       case x: Elem => {
[scala-stm] [error]         val ch = x.child filter { !badDeps(_) } map { filt(_) }
[scala-stm] [error]         Elem(x.prefix, x.label, x.attributes, x.scope, ch: _*)
[scala-stm] [error]       }
[scala-stm] [error]       case x => x
[scala-stm] [error]     }
[scala-stm] [error]     filt(xi)
[scala-stm] [error]   }
[scala-stm] [error] 
[scala-stm] [error] credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")

problem

[scala-stm] [error] [/localhome/jenkinsdbuild3/workspace/Community-2.11.x-manual/target-0.9.1/extraction/cdcab9835c609aecf7d943156d53fb28dbd9eb58/projects/e700e61574afb95ee447d356e119d5985ade471b/build.sbt]:52: ';' expected but 'true' found.
[scala-stm] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 
[scala-stm:error] java.lang.RuntimeException: 
[scala-stm:error]   at scala.sys.package$.error(package.scala:27)
[scala-stm:error]   at distributed.support.sbt.SbtRunner.distributed$support$sbt$SbtRunner$$processCommand(SbtRunner.scala:93)
[scala-stm:error]   at distributed.support.sbt.SbtRunner$$anonfun$run$1$$anonfun$apply$2$$anonfun$apply$3.apply(SbtRunner.scala:74)
[scala-stm:error]   at distributed.support.sbt.SbtRunner$$anonfun$run$1$$anonfun$apply$2$$anonfun$apply$3.apply(SbtRunner.scala:74)
[scala-stm:error]   at distributed.support.sbt.SbtRunner$$anonfun$run$1.apply(SbtRunner.scala:74)
[scala-stm:error]   at distributed.support.sbt.SbtRunner$$anonfun$run$1.apply(SbtRunner.scala:64)
[scala-stm:error]   at sbt.IO$.withTemporaryFile(IO.scala:311)
[scala-stm:error]   at distributed.support.sbt.SbtRunner.run(SbtRunner.scala:64)
[scala-stm:error]   at distributed.support.sbt.SbtExtractor$.extractMetaData(DependencyExtractor.scala:99)
[scala-stm:error]   at distributed.support.sbt.SbtBuildSystem.extractDependencies(SbtBuildSystem.scala:58)
[scala-stm:error]   at distributed.support.sbt.SbtBuildSystem.extractDependencies(SbtBuildSystem.scala:18)

notes

Scala allows series of XML nodes as NodeSeq.

scala> val x = <x/><y/>
x: scala.xml.NodeBuffer = ArrayBuffer(<x/>, <y/>)

/cc @ajozwik

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions