Widen parLiftN's constraint to NonEmptyParallel#4702
Widen parLiftN's constraint to NonEmptyParallel#4702kubukoz wants to merge 4 commits intotypelevel:mainfrom
Conversation
|
Unfortunately we have no MiMa support here, because syntax classes are It's arguably a bug that methods on private classes are publicly usable. |
|
okay, I was able to follow your advice from Discord and just created a new copy of the syntax class, except the old implicit conversion has been made non-implicit. I tested it with the following:
//> using dep org.typelevel::cats-core:2.13.0
import cats.syntax.all.*
case class Foo(a: Int, b: String)
object demo extends App {
def foo(a: Either[String, Int], b: Either[String, String]) = (Foo.apply _).parLiftN(a, b)
println(foo(Left("error"), Right("hello")))
}
#!/usr/bin/env bash
set -e
set -x
for sv in 2.12 2.13 3
do
echo "compiling $sv"
if [ "$sv" == "2.12" ]; then
EXTRA_FLAGS="-Ypartial-unification"
else
EXTRA_FLAGS=""
fi
scala-cli compile main.scala --output-directory out --scala "$sv" -Xsource:3 $EXTRA_FLAGS
DEPS=$(cs fetch org.typelevel:cats-core_$sv:2.13.0-4-2d82b53-SNAPSHOT --classpath)
echo "running: "
java -cp "$DEPS:out" 'demo'
doneIt succeeds in all versions. Does that sound about right? |
|
I mean... Maybe no one even notice :) |
|
Your call 😅 |
| @@ -1,4 +1,4 @@ | |||
| ThisBuild / tlBaseVersion := "2.12" | |||
| ThisBuild / tlBaseVersion := "2.13" | |||
There was a problem hiding this comment.
Actually, this PR should bump to 2.14. It's making source-breaking changes and forwards binary-breaking changes, with respect to Cats v2.13.x so we need to bump the minor to reflect that.
There was a problem hiding this comment.
How are the changes source-breaking?
There was a problem hiding this comment.
@kubukoz , I'm wondering too: #4704 (comment)
Perhaps there's some mystery to be unraveled :)
There was a problem hiding this comment.
How are the changes source-breaking?
This code compiles in 2.13, but won't after these changes.
object syntax extends cats.syntax.FunctionApplySyntax
import syntax.*
fn.liftN(...)There was a problem hiding this comment.
hmm I wonder if we can make the old syntax trait extend the new. Still, if someone hand-picks their imports they'll be source-broken. Do we care about this use case?
I don't suppose we'll release a 0.14 soon...
There was a problem hiding this comment.
Still, if someone hand-picks their imports they'll be source-broken. Do we care about this use case?
Yes, that's the point. Whenever we make any change like this, it is technically source-breaking.
To clarify, I'm not saying we should avoid source-breaking changes: this makes it impossible to add new features. What I'm saying is that, because these typical changes are source-breaking, we have to bump the base version.
Drafting to see what mima says...