-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove excluded filters from mima #14915
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
Conversation
I think mima is complaining because of new public methods defined inside traits, but isn't that binary-compatible? (/cc @dwijnand @sjrd). In any case, these traits are all defined inside Quotes which users are not supposed to inherit (I don't know if this is enforced?), so I think we can ignore those errors. |
Ah but they're new abstract methods in traits. That's definitely not backward binary compatible. It's only compatible if third-parties cannot extend the trait. For example because they're |
It looks like this isn't enforced, the following compiles: import scala.quoted.*
class A extends Quotes with runtime.QuoteUnpickler with runtime.QuoteMatching:
val ExprMatch: ExprMatchModule = ???
val TypeMatch: TypeMatchModule = ???
def unpickleExpr[T](pickled: String | List[String], typeHole: (Int, Seq[Any]) => Type[? <: AnyKind], termHole: (Int, Seq[Any], Quotes) => Expr[?]): Expr[T] = ???
def unpickleType[T <: AnyKind](pickled: String | List[String], typeHole: (Int, Seq[Any]) => Type[? <: AnyKind], termHole: (Int, Seq[Any], Quotes) => Expr[?]): Type[T] = ???
extension(self: Expr[Any])
def asExprOf[X](using Type[X]): Expr[X] = ???
def isExprOf[X](using Type[X]): Boolean = ???
val reflect: reflectModule = ???
extension [T](self: Expr[T])
def show: String = ???
def matches(that: Expr[Any]): Boolean = ???
def valueOrAbort(using FromExpr[T]): T = ??? @nicolasstucki Can we make |
Though I think we don't give any API/ABI guarantees for scala.runtime so I guess this is fine anyway? |
If user-level access to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, then I think this is fine as-is. @Kordyjan can you re-add the MimaFilters for abstract methods with a note that this is safe because user code is not allowed to inherit Quotes?
Done! |
If that's the case we can keep a rule as |
No description provided.