Skip to content

Comments

Remove scalalogging-slf4j from dependencies#297

Merged
felixcheung merged 2 commits intographframes:masterfrom
tartakynov:drop-scalalogging
Sep 3, 2018
Merged

Remove scalalogging-slf4j from dependencies#297
felixcheung merged 2 commits intographframes:masterfrom
tartakynov:drop-scalalogging

Conversation

@tartakynov
Copy link
Contributor

@tartakynov tartakynov commented Aug 23, 2018

In this PR I've removed scala-logging-slf4j in favor of bare slf4j-api.

GraphFrames depends on scala-logging v.2.1.2 which is incompatible with later scala-logging 3.x. Thus if other dependencies introduce scala-logging 3.x you get java.lang.IncompatibleClassChangeError. So you have to use shading to overcome this issue.

Simply upgrading scala-logging to 3.x will break Scala 2.10 cross-compilation for GraphFrames because 3.x is not available for Scala 2.10. So maybe it's better to remove scala-logging dependency in favor of bare slf4j-api, just like in Spark (see this commit in Spark)

@tartakynov tartakynov changed the title Removed dependency from old scala-logging Removed old scala-logging from dependencies Aug 23, 2018
@codecov-io
Copy link

codecov-io commented Aug 23, 2018

Codecov Report

Merging #297 into master will decrease coverage by 0.07%.
The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #297      +/-   ##
==========================================
- Coverage    90.9%   90.83%   -0.08%     
==========================================
  Files          18       19       +1     
  Lines         803      818      +15     
  Branches       69       69              
==========================================
+ Hits          730      743      +13     
- Misses         73       75       +2
Impacted Files Coverage Δ
src/main/scala/org/graphframes/GraphFrame.scala 89.13% <100%> (+0.04%) ⬆️
...cala/org/graphframes/lib/ConnectedComponents.scala 94.44% <100%> (-0.51%) ⬇️
src/main/scala/org/graphframes/Logging.scala 80% <80%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cb0d837...5da7544. Read the comment docs.

@tartakynov tartakynov force-pushed the drop-scalalogging branch 2 times, most recently from d76c37d to b95df05 Compare August 23, 2018 13:58
@tartakynov tartakynov changed the title Removed old scala-logging from dependencies Remove scalalogging-slf4j from dependencies Aug 23, 2018
build.sbt Outdated
// e.g. spDependencies += "databricks/spark-avro:0.1"

libraryDependencies += "org.scalatest" %% "scalatest" % defaultScalaTestVer % "test"
libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.21"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@tartakynov tartakynov Aug 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@felixcheung thanks, I totally missed that part, which is checking which version Spark is running. I've just picked up the version which I've always used

Use slf4j-api 1.7.16
@tartakynov tartakynov closed this Aug 31, 2018
@tartakynov tartakynov reopened this Aug 31, 2018
@tartakynov
Copy link
Contributor Author

tartakynov commented Sep 2, 2018

I don't know why Travis build failed. It failed 2 times one the same commit for different reasons

  • first time, failed job python 2, spark 2.3.1: unresolved dependency slf4j-api 1.7.16,
  • second time, failed job python 3, spark 2.2.2: unresolved dependency spark-graphx 2.2.2

I will close and reopen this PR one more time to trigger Travis build to run

@tartakynov tartakynov closed this Sep 2, 2018
@tartakynov tartakynov reopened this Sep 2, 2018
@tartakynov
Copy link
Contributor Author

Okay, it passed

@felixcheung felixcheung merged commit dc11c4a into graphframes:master Sep 3, 2018
@felixcheung
Copy link
Member

thanks!

@tmoschou
Copy link

Great to see this change. Unfortunately shading scala-logging 2.x didn't work for us, I presume because 2.x hardcodes package paths in in macros / quasi-quotes.

https://github.com/lightbend/scala-logging/blob/v2.1.2/scala-logging-slf4j/src/main/scala_2.11/com/typesafe/scalalogging/slf4j/LoggerMacro.scala#L45

It would be great to see a new release of graphframes with this change. Is there a snapshots repository?

@tartakynov
Copy link
Contributor Author

@tmoschou @felixcheung perhaps it can be cherry-picked to 0.6.x release branch?

@felixcheung
Copy link
Member

I don't think we would do a 0.6.1 release?

@tartakynov
Copy link
Contributor Author

Why not? To me it looks like a legit minor release. Otherwise we would have to wait for months till the next major. I found a few open issues related to this fix #261 #240 #113

amuraru pushed a commit to hstack/graphframes that referenced this pull request Nov 12, 2018
* Remove scalalogging-slf4j from dependencies

* Update build.sbt

Use slf4j-api 1.7.16
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

Successfully merging this pull request may close these issues.

4 participants