typelevel/cats-parse

Which are the expected sbt dependencies to run the JSON example at the README?

davips opened this issue · 4 comments

I cannot import bench:
import cats.parse.bench.self.JsonStringUtil

My sbt is as folllows:

val scala3Version = "3.0.1"

//lazy val cats = RootProject(uri("https://github.com/typelevel/cats-parse"))

lazy val root = project
  .in(file("."))
//  .dependsOn(cats)
  .settings(
    name := "tupi",
    version := "0.1.0",

    scalaVersion := scala3Version,

    libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test",

    libraryDependencies += "org.typelevel" %% "cats-parse" % "0.3.4",

    libraryDependencies += "org.typelevel" %% "jawn-ast" % "1.2.0"
    )

Like many scala projects we don't publish a jar of the benchmarks.

You can check the code out and run them that way.

Ok, thanks.
The issue is actually about the README not providing a self-contained example, probably not a priority at this stage though.

oh, sorry.

If you want to play with that example:

copy this file:

https://github.com/typelevel/cats-parse/blob/main/bench/src/main/scala/cats/parse/bench/self.scala

and add the jawn dependency:

lazy val jawnAst = "org.typelevel" %% "jawn-ast" % "1.2.0"

Let me know if that doesn't work.

@johnynek it works fine when you copy this file.