-
Notifications
You must be signed in to change notification settings - Fork 92
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
Move to Scala 2.13.0-M4 #222
Conversation
import scala.collection.SeqLike | ||
import scala.collection.generic.CanBuildFrom | ||
|
||
object ScalaVersionSpecific { |
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.
Shouldn't this be marked private?
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 good point. i did this only in #223, sorry for the confusion
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.
So we made these traits private
. This means people can't use it as a trait. However, the traits are published, and they are revealed in the type signatures.
:type -v <x y="z"/>.attributes
// Type signature
scala.xml.MetaData
// Internal Type structure
TypeRef(
TypeSymbol(
abstract class MetaData extends AbstractIterable[scala.xml.MetaData]
with Iterable[scala.xml.MetaData]
with Equality
with ScalaVersionSpecificIterableSerializable[scala.xml.MetaData]
with Serializable
)
)
Cost of doing business or should we do something else?
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.
Fortunately, dropping such a trait from a future version will be caught by Mima:
> xml/mimaReportBinaryIssues
[info] scala-xml: found 13 potential binary incompatibilities while checking
[info] against org.scala-lang.modules:scala-xml_2.13.0-M5:1.1.1
...
[error] * the type hierarchy of class scala.xml.NodeSeq is different in
[error] current version. Missing types {scala.xml.ScalaVersionSpecificIterableSerializable}
[error] filter with: ProblemFilters.exclude[MissingTypesProblem]("scala.xml.NodeSeq")
My effort to keep your branch up-to-date was in no way a tacit approval of the changes it contained. Like most Scala programmers, I am generally confused about the 2.13 changes, so I have a lot of questions. Since this is my first opportunity to review the changes here, I guess the first practical question I have is: "If we merge this, can we still make a 1.1.1 release from master? Can we trust MiMa here?" |
Very good question. I'll look in more detail next week. |
I looked at the change again in detail with the goal to find binary incmopatible changes. I'm confident that this PR doesn't break binary compatibility.
I did a few tests with scala-xml 1.1.0 and a local version published from this PR, both with 2.11 and 2.12. |
c749f38
to
f2aea77
Compare
Rebased this PR on top of #223 (to avoid future conflicts). |
f2aea77
to
16e53de
Compare
16e53de
to
33e5c85
Compare
Needs rebase after merge of #223? |
Done! |
Thanks for this analysis. So presumably a user who was cross-compiling with 2.13.0-M3 and 1.1.0 would still be able to cross-compile with a 1.1.1 release and 2.13.0-M4? Maybe not if the underlying collection calls were changed out from under them? |
Or... when 2.13.0 finally drops, they technically lose source compatibility with scala-xml 1.1.0. |
1.1.1 on 2.12 has the same API as 1.1.0 on 2.12. Changes are only required if a project needs to cross-compile with 2.13. For most users of scala-xml, it is possible to adapt the code to cross-compile between 2.12 and 2.13. A goal of the collections redesign is that user code can cross-compile. But yes, See https://github.com/scala/scala/releases/tag/v2.13.0-M4 and https://github.com/scala/collection-strawman/wiki/FAQ for details (end-user documentation is coming for the final release). |
@ashawley do you have any remaining concerns about this...? |
No, I have no remaining concerns. Will be releasing 1.1.1 relatively soon, and will probably work on getting these changes merged after that. |
Scala 2.13.0-M5 is now out |
there are some M5 commits at https://github.com/scalacommunitybuild/scala-xml/commits/community-build-2.13 |
Thanks, Seth. Working on updating Test build here: https://travis-ci.org/ashawley/scala-xml/jobs/422693328 Only the M5 builds will succeed. Fortunately, the build is separated out, so I think publishing will work when we tag. |
Any updates on this? |
Changes for 2.13.0-M5 will continue in to #260. |
Rebased the
newCollectionsRebase
branch on current master. This can go in now, no?