Skip to content
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

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

Closed
davips opened this issue Aug 27, 2021 · 4 comments
Closed

Comments

@davips
Copy link

davips commented Aug 27, 2021

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"
    )
@johnynek
Copy link
Collaborator

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

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

@davips
Copy link
Author

davips commented Aug 28, 2021

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

@johnynek
Copy link
Collaborator

johnynek commented Aug 28, 2021

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.

@DenisNovac
Copy link
Contributor

@johnynek it works fine when you copy this file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants