tpolecat / tut

doc/tutorial generator for scala
MIT License
579 stars 63 forks source link

Tut doesn't play nice with scalaVersion #230

Open wsargent opened 6 years ago

wsargent commented 6 years ago

If I have a project which has a default scala version of 2.11 (so IntelliJ will show me the worst case cross compile) and I want to set the slides and documentation to 2.12 (like god intended), then doing the following should work:

scalaVersion in Tut := "2.12.6",

However, this doesn't seem to do anything -- tut still runs in 2.12.6.

tpolecat commented 6 years ago

I think sbt treats scalaVersion specially somehow … it's using (runner in Tut) to construct the REPL so one would think it would pick the version up. Which version of sbt are you using?

wsargent commented 6 years ago

1.1.6: https://github.com/wsargent/ocaps/blob/master/build.sbt and https://github.com/wsargent/ocaps/blob/master/project/OcapsPlugin.scala

tpolecat commented 6 years ago

While I'm pondering this … a common solution is to create a new sub-project just for doc, and you can set the scalaVersion there. That's what I do for all my cross-compiled projects.