-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combine with mill-tpolecat #241
Comments
Hi Dave, this is already a thing, We have scalac-options which contains recommended scalac options across scala versions. |
Works like a charm, thanks @lenguyenthanh, example from my project for the curious: ...
import $ivy.`org.typelevel::scalac-options:0.1.7`, org.typelevel.scalacoptions._
trait ShaderModule extends MillIndigo {
def scalaVersion = "3.5.0"
def scalaJSVersion = "1.17.0"
override def scalacOptions = T {
super.scalacOptions() ++
ScalacOptions.defaultTokensForVersion(ScalaVersion.unsafeFromString(scalaVersion())) ++
Seq("-Xfatal-warnings")
}
.. I'll close this issue, but would it be worth updating the readme with a Mill example? |
glad that I could help and yes please 🙏 |
PR in ScalacOptions. |
PR in sbt-tpolecat |
PR in mill-tpolecat that I'm only 50% confident will work... but maybe someone will help me. 😅 |
A few years ago @DavidGregory084 heroically ported sbt-tpolecat to mill-tpolecat, but it seems to have been left behind.
There is some setup to do, but it is possible to cross publish plugins to both sbt and Mill. It would be great to keep the two in sync. One issue that I wouldn't know how to start tackling if anyone did such a thing, would be the repo name... 😉
An alternative approach, perhaps, would be to publish a canonical list of recommended flags as a separate library, cross published to Scala 2.12, 2.13, and 3, divorced from any one build tool, so that it could be used by tool specific projects. Then the Mill-tpolecat lib could consume
sbt-tpolecat-flags
, as could other build tools or even individuals on an ad-hoc basis if they prefer.The text was updated successfully, but these errors were encountered: