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..

Home Page:https://vickumar1981.github.io/stringdistance/api/com/github/vickumar1981/stringdistance/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Published JAR contains Scala Standard Library

mlangc opened this issue · comments

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.

👍 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.

@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.

1ac6b0e

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?

@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

@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.

Yes, of course, thanks for the update!