So, i'm using Scala 2.13.12 on ubuntu, installed via coursier. Recently i installed via sudo apt-get install the package for parser combinators, but can't import it.
In the official github page, it says to modify a build file, but where can i find it?
It's very common for Scala projects to be built with a tool called sbt, an alternative to other JVM build tools like Maven and Gradle which is written in Scala and uses Scala as a language to define your build.
As you mentioned, the library itself says to add the dependency to your
build.sbthere.If you want to follow this approach, you should first install sbt (here are a few options on how to it).
Once you have that installed, here is a very brief example of how to get started:
In a new directory, create the file
build.sbtwith the following contentIn the same directory, create the directory following the standard structure followed by sbt
Create the file
src/main/scala/SimpleParser.scalawith the example provided by the library documentation:run
sbt run, at this point you should see Coursier download the library and its dependency, followed by the output of running the command (downloading the dependency will only happen on the first run)