The scala-io library is not available for Scala 2.13 (I had custom-built the Scala 2.12 version, but it was too much effort to get it to 2.13). scala-io was providing several useful features:
streaming reading of character data with line-splitting that preserves line-breaks (because I don't want the BFG to change the line-breaks in your files while doing --replace-text). Finding a replacement library to do this wasn't easy - so much code seems to be based on java.io.BufferedReader, which throws line-breaks away. java.util.Scanner can maybe do it, but I couldn't get it to work! In the end, I implemented my own solution, a tiny library with a fairly decent set of tests: https://github.com/rtyley/line-break-preserving-line-splitting
resource management - mostly replaced by using Scala 2.13's Using.
File-path types and operations - mostly now performed by java.nio & Guava functions.
Key challenges with the upgrade:
scala-io
library is not available for Scala 2.13 (I had custom-built the Scala 2.12 version, but it was too much effort to get it to 2.13).scala-io
was providing several useful features:--replace-text
). Finding a replacement library to do this wasn't easy - so much code seems to be based onjava.io.BufferedReader
, which throws line-breaks away.java.util.Scanner
can maybe do it, but I couldn't get it to work! In the end, I implemented my own solution, a tiny library with a fairly decent set of tests: https://github.com/rtyley/line-break-preserving-line-splittingUsing
.ConcurrentSet
which needs to be implemented in the new fashionTraversable
becomesIterable
, etc