tek / splain

better implicit errors for scala
MIT License
370 stars 29 forks source link

Can it be used in maven or gradle? #38

Closed tribbloid closed 3 years ago

tribbloid commented 3 years ago

If they are possible, should these examples be included in the documentation?

I intend to use it in a gradle project, please let me know if I can help

tek commented 3 years ago

I have no experience with those, but I'd be happy to add your findings to the docs!

tribbloid commented 3 years ago

Figured it out (in gradle kotlin script):


    dependencies {

         ....
        scalaCompilerPlugins("io.tryp:splain_${vs.scalaV}:0.5.8")
         ....
    }

    scalaCompileOptions.apply {

       additionalParameters = listOf(
             ....
            //splain
            "-P:splain:tree",
            "-P:splain:breakinfix:80",
            "-P:splain:bounds:true",
            "-P:splain:boundsimplicits:true",
            "-P:splain:keepmodules:2"
        )
   }

That sums it up. Ping me if you think this part deserves its own doc so I'll submit a PR

tek commented 3 years ago

absolutely!

tribbloid commented 3 years ago

done