diff --git a/build.sbt b/build.sbt index 013873cf0..9efc50531 100644 --- a/build.sbt +++ b/build.sbt @@ -91,6 +91,8 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform) exclude[MissingTypesProblem]("scala.xml.Unparsed"), exclude[DirectMissingMethodProblem]("scala.xml.Elem.this"), exclude[DirectMissingMethodProblem]("scala.xml.Elem.apply"), + exclude[DirectMissingMethodProblem]("scala.xml.Elem.processXml"), + exclude[DirectMissingMethodProblem]("scala.xml.Elem.xmlToProcess"), // Scala 2.12 deprecated mutable.Stack, so we broke // binary compatibility for 2.0.0 in the following way: exclude[IncompatibleMethTypeProblem]("scala.xml.parsing.FactoryAdapter.scopeStack_="), diff --git a/shared/src/main/scala/scala/xml/Elem.scala b/shared/src/main/scala/scala/xml/Elem.scala index c111393ff..2b1f895c2 100755 --- a/shared/src/main/scala/scala/xml/Elem.scala +++ b/shared/src/main/scala/scala/xml/Elem.scala @@ -28,32 +28,6 @@ object Elem { case _: SpecialNode | _: Group => None case _ => Some((n.prefix, n.label, n.attributes, n.scope, n.child.toSeq)) } - - import scala.sys.process._ - import scala.language.implicitConversions - - /** - * Implicitly convert a [[scala.xml.Elem]] into a - * [[scala.sys.process.ProcessBuilder]]. This is done by obtaining the text - * elements of the element, trimming spaces, and then converting the result - * from string to a process. Importantly, tags are completely ignored, so - * they cannot be used to separate parameters. - */ - @deprecated("To create a scala.sys.process.Process from an xml.Elem, please use Process(elem.text.trim).", "2.11.0") - implicit def xmlToProcess(command: scala.xml.Elem): ProcessBuilder = Process(command.text.trim) - - @deprecated("To create a scala.sys.process.Process from an xml.Elem, please use Process(elem.text.trim).", "2.11.0") - implicit def processXml(p: Process.type): { def apply(command: Elem): ProcessBuilder } = new { - /** - * Creates a [[scala.sys.process.ProcessBuilder]] from a Scala XML Element. - * This can be used as a way to template strings. - * - * @example {{{ - * apply( {dxPath.absolutePath} --dex --output={classesDexPath.absolutePath} {classesMinJarPath.absolutePath}) - * }}} - */ - def apply(command: Elem): ProcessBuilder = Process(command.text.trim) - } } /**