-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix #11939: Set up MiMa for scala3-interfaces in scala3-library. #12371
Conversation
project/MiMaFilters.scala
Outdated
// !!! These things are already violating the source compatibility guarantees of 3.0.1 | ||
// They need to be reverted, or we need to set the next version to 3.1.0 | ||
exclude[DirectMissingMethodProblem]("scala.quoted.Quotes#reflectModule#TermParamClauseMethods.isErased"), | ||
exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#TermParamClauseMethods.isErased"), | ||
exclude[MissingClassProblem]("scala.annotation.internal.ErasedParam"), | ||
exclude[MissingClassProblem]("scala.annotation.internal.Stable"), |
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.
@nicolasstucki WDYT? Should we revert or mark these things as @experimental
?
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.
isErased
should be reverted and added in 3.1
. This includes scala.annotation.internal.ErasedParam
. I guess adding @experimental
would make sense here as some users might be using it already from nightly.
No idea about scala.annotation.internal.Stable
. @odersky can we revert this or add @experimental
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.
Added the @exerimental
on ErasedParam
and isErased
in #12102
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.
No idea about scala.annotation.internal.Stable. @odersky can we revert this or add @experimental
It was introduced in #12159. Could we use the existing scala.annotation.unchecked.uncheckedStable
instead? /cc @abgruszecki
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.
It's possible we could, yes. Does the fact that @Stable
is only added by the compiler change anything here? I'm not sure what's the exact problem here, is it that at runtime we could have an older version of stdlib and there could be no scala.annotation.internal.Stable
?
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.
Does the fact that @stable is only added by the compiler change anything here?
That helps with source compatibility but not binary/tasty-compatibility.
is it that at runtime we could have an older version of stdlib and there could be no scala.annotation.internal.Stable?
Exactly, and we have to consider not only binary-compatibility but tasty-compatibility (e.g. if I'm in a 3.0.0 project and I call an inline def defined in a 3.0.1 project that contains @Stable
somewhere in its body, that would likely lead to a compiler error).
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.
@sjrd we will need to exclude scala.annotation.experimental
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.
@smarter so how should I go about fixing @Stable
? In a separate PR?
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.
@abgruszecki Sure.
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.
@sjrd if you rebase all remaining excludes (experimental, isErased and ErasedParam) should now be @experimental
.
/** Version against which we check binary compatibility. | ||
* | ||
* This must be the latest published release in the same versioning line. | ||
* For example, if the next version is going to be 3.1.4, then this must be | ||
* set to 3.1.3. If it is going to be 3.1.0, it must be set to the latest | ||
* 3.0.x release. | ||
*/ |
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.
Can't we derive this from the version number?
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.
No. When the base version is 3.1.0, how do you know what's the previous version? It could be any 3.0.x for any value of x. You don't know without going through all the published version to determine which one is the latest 3.0.x.
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.
but couldn't you use 3.0.0 as a base (likewise for 3.0.2)? That means we can't reset the whitelist after every release but I don't think that's a big deal?
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.
We could get away with that. That's not the established practice, though. And it means that you lose the ability to reasonably check experimental stuff that you introduce in the meantime, which you'd like not to accidentally break, at least.
IMO that's not a good trade off, but I can change if you prefer that it be automatically determined.
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.
I think it's fine as is if it's established practice, but we need to add the need to update these variables to the release checklist /cc @anatoliykmetyuk
Rebased. |
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.
Otherwise LGTM.
project/MiMaFilters.scala
Outdated
exclude[DirectMissingMethodProblem]("scala.quoted.Quotes#reflectModule#TermParamClauseMethods.isErased"), | ||
exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#TermParamClauseMethods.isErased"), | ||
exclude[MissingClassProblem]("scala.annotation.internal.ErasedParam"), | ||
exclude[MissingClassProblem]("scala.annotation.internal.Stable"), |
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.
This class doesn't exist anymore.
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.
Also isn't this missing experimental itself?
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.
Yes
Why can't you automate looking up the last version? If checking Maven
Central is too expensive, can you use v* git tags?
…On Fri, May 7, 2021, 10:47 AM Sébastien Doeraene ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In project/Build.scala
<#12371 (comment)>:
> + /** Version against which we check binary compatibility.
+ *
+ * This must be the latest published release in the same versioning line.
+ * For example, if the next version is going to be 3.1.4, then this must be
+ * set to 3.1.3. If it is going to be 3.1.0, it must be set to the latest
+ * 3.0.x release.
+ */
No. When the base version is 3.1.0, how do you know what's the previous
version? It could be any 3.0.x for any value of *x*. You don't know
without going through all the published version to determine which one is
the latest 3.0.x.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#12371 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAYAUG2VF7KUKWJTNXEY4TTMP4PLANCNFSM44KG6EOA>
.
|
It's not a question of efficiency. It's a question of build reproducibility. A commit that builds today may fail to build in the future if we publish a new patch version in the meantime that introduces a new experimental method. Therefore, the git tag has the same issue as the Maven Central lookup. |
project/MiMaFilters.scala
Outdated
exclude[DirectMissingMethodProblem]("scala.quoted.Quotes#reflectModule#TermParamClauseMethods.isErased"), | ||
exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#TermParamClauseMethods.isErased"), | ||
exclude[MissingClassProblem]("scala.annotation.internal.ErasedParam"), | ||
exclude[MissingClassProblem]("scala.annotation.internal.Stable"), |
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.
exclude[MissingClassProblem]("scala.annotation.internal.Stable"), | |
exclude[MissingClassProblem]("scala.annotation.experimental"), |
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.
Oops, yes. Fixed.
The |
Didn't happen after restarting the jobs so I'll assume this is spurious. |
This already detects a couple things that break the backward source compatibility guarantee. They are excluded in
project/MiMaFilters.scala
. They should be reverted before we publish 3.0.1, or we should jump straight to 3.1.0.