UniFormal / MMT

The MMT Language and System
https://uniformal.github.io/
Other
68 stars 23 forks source link

Provide example on how to reference MMT in multi-project SBT #441

Open ComFreek opened 5 years ago

ComFreek commented 5 years ago

I tried the following built.sbt:

import sbt.Keys.libraryDependencies

// Path to cloned MMT repo
lazy val mmt = RootProject(file("../mmt/src/project"))

lazy val playground = Project(id = "playground", base = file(".")).settings(
    name := "playground",
    version := "0.1",
    scalaVersion := "2.12.8",
    scalacOptions in ThisBuild ++= Seq("-unchecked", "-deprecation")
).dependsOn(mmt)

At least sbt loads it without errors. (I spent hours reaching this state!) However sbt has problems when compiling, namely correctly resolving import statements inside mmt/src/project/project.sbt.

I would be very happy if someone with SBT experience could have a look at my set up. As far as I know @Jazzpirate is the only one with more experience in SBT, or am I mistaken? 😄

ComFreek commented 5 years ago

Thanks to #449, this is now possible. A draft documentation has been created on https://github.com/UniFormal/uniformal.github.io/wiki/Multiproject-build-setup. Refactor it into the official documentation on the next "documentation day".