-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Adds version of mkString_ with no prefix/suffix, matching the std lib. #2709
Conversation
Fixes #2663 but as it stands, this is going to fail binary compatibility rules. Not sure how best to get around? I could change the name but I got no suggestions. |
I am not sure if this is going to break binary compatibility. Right now the build breaks due to format issue, a |
So this does fail with binary incompatibility as you can see here: https://travis-ci.org/typelevel/cats/jobs/484371830. I don't quite grok the FoldableOps/0/1 pattern but it looks like it has something to do with getting around bin incompatibility. If I this new method to
I'm find with either option but looking for input on how you'd like it. |
@matthughes thanks! The longer answer: |
Note: adding an overload to a regular class doesn't break binary compat but doing so to a value class does. The existence of an overload changes the scheme used for generation of the synthetic method names in the companion class. Consider these two classes, representing 2 different versions of the same class: class Foo1(val x: Int) extends AnyVal {
def foo(y: Int): Int = x + y
}
class Foo2(val x: Int) extends AnyVal {
def foo(y: Int): Int = x + y
def foo(y: Int, z: Int): Int = x + y + z
}
|
dde5a15
to
1c1da2a
Compare
@mpilquist ah, that makes sense, thanks for the detail! In hindsight, maybe the first one should've been made |
@matthughes I updated the CatsSuite which is missing the newly added syntax trait and caused the broken build. Hopefully this one will be ready to merge soon. |
Codecov Report
@@ Coverage Diff @@
## 1.6.x #2709 +/- ##
==========================================
+ Coverage 95.12% 95.12% +<.01%
==========================================
Files 365 365
Lines 6795 6796 +1
Branches 314 294 -20
==========================================
+ Hits 6464 6465 +1
Misses 331 331
Continue to review full report at Codecov.
|
Thank you for contributing to Cats!
This is a kind reminder to run
sbt prePR
and commit the changed files, if any, before submitting.