vegas-viz / Vegas

The missing MatPlotLib for Scala + Spark
MIT License
730 stars 98 forks source link

Vegas fails to work when circe 0.9.3 is imported in Zeppelin #156

Open dankolesnikov opened 6 years ago

dankolesnikov commented 6 years ago

Vegas doesn't graph if the user imports circe 0.9.3 in Zeppelin.

To reproduce in Zeppelin, import the following in the spark interpreter and run a sample Vegas example:

Throws exception:

java.lang.NoSuchMethodError: io.circe.Printer.copy(ZZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lio/circe/Printer;
  at vegas.spec.package$.<init>(package.scala:11)
  at vegas.spec.package$.<clinit>(package.scala)
  at vegas.DSL.ExtendedUnitSpecBuilder.toJson(SpecDSL.scala:55)
  at vegas.render.ShowHTML.apply(ShowRender.scala:19)
  at vegas.render.ShowHTML.apply(ShowRender.scala:18)
  at vegas.DSL.SpecBuilder$SpecBuilderRenderOps$.show$extension(SpecDSL.scala:99)

Attaching screenshots: Failure: circe 0.9.3 is imported vegaszeppelinfailure

Success: no circe library is imported vegaszeppelinsuccess

I am currently working on the fix for this. vegas.spec. Spec singleton seems to be the one that requires changes. I'd like to connect with contributors/founder who wrote that code. My suggestion is to reduce the number of lines in vegas.spec. Spec by modularizing it. There are more than 2000 lines in a single file. Any feedback?

dankolesnikov commented 6 years ago

@aishfenton @oshikiri

oshikiri commented 6 years ago

My suggestion is to reduce the number of lines in vegas.spec. Spec by modularizing it. There are more than 2000 lines in a single file.

core/src/main/scala/vegas/spec/Spec.scala is automatically generated by argus package (c.f. https://github.com/vegas-viz/Vegas/issues/93 and here).

dankolesnikov commented 6 years ago

@oshikiri Updates on this:

oshikiri commented 6 years ago

Assuming there is a breaking change in circe 0.7 - 0.9. Do you know of any?

I don't know about it. Could you send a pull request and check using travis-ci?