vickumar1981 / stringdistance

A fuzzy matching string distance library for Scala and Java that includes Levenshtein distance, Jaro distance, Jaro-Winkler distance, Dice coefficient, N-Gram similarity, Cosine similarity, Jaccard similarity, Longest common subsequence, Hamming distance, and more..
https://vickumar1981.github.io/stringdistance/api/com/github/vickumar1981/stringdistance/index.html
Other
78 stars 15 forks source link

Published JAR contains Scala Standard Library #40

Closed mlangc closed 5 years ago

mlangc commented 5 years ago

The published JAR of the library (see https://mvnrepository.com/artifact/com.github.vickumar1981/stringdistance_2.12/1.1.1) should not contain the Scala Standard Library. Clients using the library will now have two, not necessarily identical Standard Libraries on the classpath. While this might work just fine 95% of the time, it might cause serious headaches in the remaining 5%. See https://mlangc.wordpress.com/2013/07/04/good-objects-breaking-bad/ and https://github.com/sbt/sbt-assembly#publishing-not-recommended for further details.

vickumar1981 commented 5 years ago

:+1: to this. I think the only reason that the scala library was originally included was b/c I couldn't get it working in Java otherwise for some reason. Will try w/o the library dependency and see if it breaks.

vickumar1981 commented 5 years ago

@mlangc Published a 1.1.3-SNAPSHOT using the sbt-gpg (https://github.com/jodersky/sbt-gpg) plugin, and set the options according to the recommendations in the link.

https://github.com/vickumar1981/stringdistance/commit/1ac6b0e465438cac5f530135ec759f7c6fa1a5f3

The pom file: https://oss.sonatype.org/content/repositories/snapshots/com/github/vickumar1981/stringdistance_2.12/1.1.3-SNAPSHOT/stringdistance_2.12-1.1.3-SNAPSHOT.pom

however, still includes the scala library dependency, as well as the test dependencies. Not sure, but did I do something wrong?

mlangc commented 5 years ago

@vickumar1981 no, that's perfectly fine as far as I can tell - after all you are depending on these libraries. Compare this to the pom of the cats library which looks quite similar: https://repo1.maven.org/maven2/org/typelevel/cats-core_2.12/1.6.1/cats-core_2.12-1.6.1.pom

vickumar1981 commented 5 years ago

@mlangc Published a 1.1.2 release that should be up on maven central shortly. I think everything is still working java-wise. Mind if I close the issue? Thanks.

mlangc commented 5 years ago

Yes, of course, thanks for the update!