Closed ComFreek closed 5 years ago
This has been discussed countless times in our group already. Suffice it to say that all advantages and disadvantages have been brought up and the current way of doing things has been decided to be the most feasible one.
The project setup section in the tutorial will need to be rewritten entirely accordingly. Notably
Open IntelliJ IDEA and create a new "Scala, SBT-based" project
This is already wrong.
For almost all jars in deploy/lib (except xz.jar, I guess) there is an official artifact available, e.g. on Maven Central. Drop the jars and specify these dependencies in
src/build.sbt
.Reasoning: Usage of MMT via SBT breaks
If one doesn't use the MMT jar, but instead MMT published locally via SBT (see #442 for my setup), then these dependencies are simply not known to SBT. Hence, any usage of them at runtime will lead to errors. E.g. a simple
ctrl.handleLine("log+ matcher")
caused aNoClassDefFound
exception related toscala.util.parsing.Reader
. The latter is in thescala-parser-combinators.jar
. The fix for my project was to add a (managed!) dependency to it in mybuild.sbt
:Also I advertized this usage in the "getting started with the MMT API" tutorial, so this also affects end users.