autodeployai / pmml4s

PMML scoring library for Scala
https://www.pmml4s.org/
Apache License 2.0
62 stars 10 forks source link

add support for scala 2.10 compilation #8

Closed markjunod closed 4 years ago

markjunod commented 4 years ago

I would love to use this library with some models we have in the PMML format, but unfortunately I'm dealing with some old code bases that still use Scala 2.10 in a couple of places. As a result, in order to use the library I needed to add support to build the PMML4S project for Scala 2.10.

This primarily just affects the build.sbt file. Since the scala-xml library was split from the standard library starting in Scala 2.11, I had to add a small branch in the dependencies to support just using the standard library in Scala 2.10.

Unfortunately, one other change was needed to support Scala 2.10. The contains method wasn't added to the Option class until 2.11. There was one usage of this in the library that I had to change to a match statement instead. Everything else compiled in Scala 2.10 without any issues, and the unit tests all still passed when running sbt test.

Let me know if you need any other details.

scorebot commented 4 years ago

@markjunod Good job. The pmml4s_2.10 has been published to the Maven central repository.

markjunod commented 4 years ago

Awesome, thank you so much @scorebot.

lou-k commented 4 years ago

Whoah fast turn around. Thanks!