object contrib is not a member of package meta

108 views Asked by At

I am trying to use the isEqual method in ScalaMeta.

import scala.meta.contrib._  

q"true".isEqual(q"true")

The import does not work:

object contrib is not a member of package meta

I am using sbt and I have the following in my build.sbt

libraryDependencies += "org.scalameta" %% "scalameta" % "4.0.0"

Where can I find the isEqual method for ScalaMeta? It appears to have been deprecated. I am following this tutorial

1

There are 1 answers

0
Duelist On BEST ANSWER

To get access to Scalameta Contrib you can add the following dependency:

libraryDependencies += "org.scalameta" %% "contrib" % "4.0.0"

isEqual will be accessible, but q isn't. You can import it from scala.meta._.

The corrected example:

import scala.meta._
import scala.meta.contrib._

q"true".isEqual(q"true")