Skip to content
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

Publish for 2.13.0-M4 #2267

Closed
ghost opened this issue May 23, 2018 · 34 comments
Closed

Publish for 2.13.0-M4 #2267

ghost opened this issue May 23, 2018 · 34 comments

Comments

@ghost
Copy link

ghost commented May 23, 2018

Here we go again...

@djspiewak
Copy link
Member

djspiewak commented Jun 7, 2018

I took a few minutes to look at this. In no particular order:

@kailuowang
Copy link
Contributor

kailuowang commented Jun 19, 2018

@SethTisue
Copy link
Member

machinist 0.6.5 is out now for M4, so is ScalaTest 3.0.6-SNAP1

@kailuowang
Copy link
Contributor

kailuowang commented Jun 26, 2018

Awesome, if nobody beats me, I'll create a PR enable 2.13M4 and drop 2.10 after 1.2 release.

@djspiewak
Copy link
Member

1.3.x is kind of a long time to wait for 2.13 support. I'm a little vague on the timelines, but I get the impression that 2.13 will actually be released by that point. Given how foundational cats is to such a large swath of the ecosystem, waiting that long is probably not a good idea. I know the issues with scalacheck and what not, but it's probably worth fiddling around with annoying matrix builds, given the cross-build hell this kind of delay is about to unleash on the ecosystem.

@johnynek
Copy link
Contributor

johnynek commented Jul 3, 2018

This issue is another reminder of the non-zero costs of dependencies. It would be nice to see about minimizing dependencies (would some of our dependencies be open to being submodules, e.g. machinist, discipline, so more of the cats ecosystem is publishable atomically).

@djspiewak
Copy link
Member

djspiewak commented Jul 5, 2018

@johnynek The downside to moving things like machinist and discipline into cats as submodules is then they cannot be published apart from cats. So that's great for cats and everything self-contained within the repository… and terrible for everything else downstream. Philosophically, you either have to go all-in on the monorepo or all-in on polyrepo, and there's really no middle ground. OSS libraries can't be uniformly monorepo because the extension set is open, so it follows that we should actually avoid submodules unless they really are intrinsically connected to the main project (e.g. cats-laws).

More importantly, the problem at hand here has absolutely nothing to do with the loosely coupled nature of the cats ecosystem. Rather, it is simply the fact that part of the Scala ecosystem is dropping support for 2.10 before other parts. Scalacheck not providing a unified release across 2.10/2.11/2.12/2.13 is totally understandable (that's four versions!), but it ultimately prevents discipline from doing the same without matrix shenanigans, which in turn prevents cats from doing the same without matrix shenanigans. But cats effectively promises (via binary compatibility) to have 2.10 support for a while, which leads us to the pickle we're in now.

In my view, cross-build availability shouldn't be considered part of the binary compatibility contract. Doing so just bogs down the entire ecosystem and makes it effectively impossible for significantly-downstream projects from ever dropping support for Scala versions, or in this case makes it effectively impossible for significantly-downstream projects to keep up with the Scala release cadence (which is a much more serious problem!).

Cats is a foundational library. Without putting too fine a point on it, it seems absolutely unacceptable to the ecosystem if it does not have a viable 2.13 cross-build at least leading into the RC process. Lacking that cross-build delays the entire FP middleware ecosystem (e.g. fs2, http4s, etc), which is now several layers deep (e.g. cats-effect, shims). There are just so many moving parts here, most of which we don't control, all of which are blocked on this from the standpoint of cross-build availability.

Point being: punting until 1.3.0 really isn't a viable option. That's far, far too long to wait for a dependency which is as upstream as cats.

@milessabin
Copy link
Member

Cats is a foundational library. Without putting too fine a point on it, it seems absolutely unacceptable to the ecosystem if it does not have a viable 2.13 cross-build at least leading into the RC process.

s/cross-build/build/ and I agree. In addition, Cats binary compatibility guarantees should be off the table for Scala milestone/release candidate builds.

Would a non-cross-built release of 1.2 for for 2.13.0-M4 be too much of an effort to produce? That's pretty much what I did for shapeless 2.3.3 and that's allowed downstream libraries to start making progress on updates for 2.13.x.

Aside from holding up the rest of the ecosystem it makes it a lot harder to be confident that changes in 2.13.x haven't broken Cats in some subtle and unpredictable way. See here for an example ... I'd love to be able to got through the same exercise for Cats but, in the absence of a build, it's more effort than I have time for.

Bottom line: if you don't get a 2.13.x build out ASAP then you won't have a legitimate complaint if there are nasty surprises subsequently.

@kailuowang
Copy link
Contributor

The plan I suggested on gitter is to release 1.2.0 on 2.10 -2.12 first, cut a branch, update to 2.13.0-M4 and release 1.2.0 for 2.13.0-M4.

@ghost
Copy link
Author

ghost commented Jul 6, 2018

Also worth checking up on (these normally crop up when catalysts is compiled, but needed by cats as well:

  • scoverage
  • tut

Once tut is done, sbt-microsites is also needed.

sorry cant do these myself....holidays 😄

@SethTisue
Copy link
Member

SethTisue commented Jul 10, 2018

all of cats's dependencies (or the subset the community build actually uses/needs, anyway) are now green in the Scala 2.13 community build, which is good news

that means the door is now open to try to get cats itself green, too. but currently it doesn't compile

seen at https://scala-ci.typesafe.com/job/scala-2.13.x-integrate-community-build/1226/consoleFull

[cats] [error] /home/jenkins/workspace/scala-2.13.x-integrate-community-build/target-0.9.12/project-builds/cats-8859d1c8c150142ae3fb0f3be4c3a1a65bd7f0e6/kernel/src/main/scala/cats/kernel/Semigroup.scala:41:8: value reduceOption is not a member of TraversableOnce[A]
[cats] [error]     as.reduceOption(combine)
[cats] [error]        ^
[cats] [error] /home/jenkins/workspace/scala-2.13.x-integrate-community-build/target-0.9.12/project-builds/cats-8859d1c8c150142ae3fb0f3be4c3a1a65bd7f0e6/kernel/src/main/scala/cats/kernel/Semigroup.scala:41:21: missing argument list for method combine in trait Semigroup
[cats] [error] Unapplied methods are only converted to functions when a function type is expected.
[cats] [error] You can make this conversion explicit by writing `combine _` or `combine(_,_)` instead of `combine`.
[cats] [error]     as.reduceOption(combine)
[cats] [error]                     ^
[cats] [error] /home/jenkins/workspace/scala-2.13.x-integrate-community-build/target-0.9.12/project-builds/cats-8859d1c8c150142ae3fb0f3be4c3a1a65bd7f0e6/kernel/src/main/scala/cats/kernel/Semigroup.scala:41:8: value reduceOption is not a member of TraversableOnce[A]
[cats] [error]     as.reduceOption(combine)
[cats] [error]        ^
[cats] [error] /home/jenkins/workspace/scala-2.13.x-integrate-community-build/target-0.9.12/project-builds/cats-8859d1c8c150142ae3fb0f3be4c3a1a65bd7f0e6/kernel/src/main/scala/cats/kernel/Semigroup.scala:41:21: missing argument list for method combine in trait Semigroup
[cats] [error] Unapplied methods are only converted to functions when a function type is expected.
[cats] [error] You can make this conversion explicit by writing `combine _` or `combine(_,_)` instead of `combine`.
[cats] [error]     as.reduceOption(combine)
[cats] [error]                     ^
[cats] [error] two errors found

@SethTisue
Copy link
Member

SethTisue commented Jul 10, 2018

tut ticket is tpolecat/tut#205... maybe @tpolecat could use some volunteer help

@tpolecat
Copy link
Member

tut 0.6.6 is out for 2.13.0-M4, sorry for the delay

@xuwei-k
Copy link
Contributor

xuwei-k commented Jul 11, 2018

that means the door is now open to try to get cats itself green, too. but currently it doesn't compile

scala/scala#6918 I have sent pull request which add deprecated reduceOption etc.

@ghost
Copy link
Author

ghost commented Jul 11, 2018

I have a PR that I'm just finishing for the new sbt-crossBuild stuff...20 minutes

@ghost
Copy link
Author

ghost commented Jul 11, 2018

I have a PR that I'm just finishing for the new sbt-crossBuild stuff...20 minutes

#2323

@ghost
Copy link
Author

ghost commented Jul 11, 2018

For future reference, we need to add scala-logging to the (indirect) build deps see lightbend-labs/scala-logging#127 (used by scoverage scoverage/scalac-scoverage-plugin#225 (comment) )

@xuwei-k
Copy link
Contributor

xuwei-k commented Jul 13, 2018

scala/scala#6918 I have sent pull request which add deprecated reduceOption etc.

fixed. another new errors scala/bug#11009

https://scala-ci.typesafe.com/job/scala-2.13.x-integrate-community-build/1236/consoleFull

[cats] [error] /home/jenkins/workspace/scala-2.13.x-integrate-community-build/target-0.9.12/project-builds/cats-3b9d4d6a336f96c52963bcf0906f4731e65e5c3a/kernel/src/main/scala/cats/kernel/instances/StaticMethods.scala:15:9: overriding method + in trait MapOps of type [V1 >: V](kv: (K, V1))scala.collection.immutable.Map[K,V1];
[cats] [error]   method + needs `override' modifier
[cats] [error]     def +[V2 >: V](kv: (K, V2)): Map[K, V2] = m.toMap + kv
[cats] [error]         ^
[cats] [error] /home/jenkins/workspace/scala-2.13.x-integrate-community-build/target-0.9.12/project-builds/cats-3b9d4d6a336f96c52963bcf0906f4731e65e5c3a/kernel/src/main/scala/cats/kernel/instances/StaticMethods.scala:16:9: overriding method - in trait MapOps of type (key: K)scala.collection.immutable.Map[K,V];
[cats] [error]   method - needs `override' modifier
[cats] [error]     def -(key: K): Map[K, V] = m.toMap - key
[cats] [error]         ^
[cats] [error] /home/jenkins/workspace/scala-2.13.x-integrate-community-build/target-0.9.12/project-builds/cats-3b9d4d6a336f96c52963bcf0906f4731e65e5c3a/kernel/src/main/scala/cats/kernel/instances/StaticMethods.scala:11:25: class WrappedMutableMap needs to be abstract, since:
[cats] [error] it has 2 unimplemented members.
[cats] [error] /** As seen from class WrappedMutableMap, the missing signatures are as follows.
[cats] [error]  *  For convenience, these are usable as stub implementations.
[cats] [error]  */
[cats] [error]   def remove(key: K): scala.collection.immutable.Map[K,V] = ???
[cats] [error]   def updated[V1 >: V](key: K, value: V1): scala.collection.immutable.Map[K,V1] = ???
[cats] [error]   private[kernel] class WrappedMutableMap[K, V](m: mutable.Map[K, V]) extends Map[K, V] {
[cats] [error]                         ^
[cats] [error] three errors found
[cats] [error] (kernelJVM / Compile / compileIncremental) Compilation failed

@johnynek
Copy link
Contributor

Seeing these errors is making me nervous that 2.13 is going to be massively painful to adopt in big code bases. I saw the 2.8 -> 2.9, 2.9 -> 2.10 and 2.10 -> 2.11 transitions at Twitter. Those took months of effort. I’m worried big users will be putting off 2.13 for years.

Just free floating anxiety.

@ghost
Copy link
Author

ghost commented Jul 13, 2018

I’m worried big users will be putting off 2.13 for years.

All the more reason for users to try out 2.13.X, early . That currently excludes all cats users and users of cats related projects, as there have been zero releases of cats for 2.13.X.

Related open PR, btw - #2323

@SethTisue
Copy link
Member

SethTisue commented Jul 13, 2018

@johnynek y'all at Twitter might try a pilot with twitter-util? I've opened a ticket here: twitter/util#219

in general, the collective experience so far seems to be that we're discovering and fixing lots of little issues that are getting fixed for M5, but nobody that I know of has hit any actual blockers yet. (oops, jinxed it...)

we could discuss further on that ticket (if it's specific to stuff you're hitting) or discuss 2.13 upgrade stuff in general on https://contributors.scala-lang.org

available dependencies, and links to "please publish for M4" tickets, are listed at https://github.com/scala/make-release-notes/blob/2.13.x/projects-2.13.md

@mosesn
Copy link

mosesn commented Jul 14, 2018

@SethTisue, I sent some feedback to contributor.scala-lang.org before about issues we ran into with trying to migrate twitter/util. The verdict seemed to be that it was just going to be incredibly hard to migrate to 2.13 and there wasn't much you could do about it?

@SethTisue
Copy link
Member

SethTisue commented Jul 18, 2018

@mosesn @johnynek let's continue there, I guess, if there are points you've raised that haven't been covered yet. (we do consider it normal — not desirable, but the best we can do — that some projects that integrate especially closely with collections will need Scala-version-specific source directories.)

@SethTisue
Copy link
Member

@xuwei-k are you stuck, is there something we should be discussing? (perhaps this is a case where the file in question will need to be duplicated in Scala version specific source directories?)

@kailuowang
Copy link
Contributor

Update: I managed to get all dependencies to 2.13-M4 (had to publishLocal sbt-scoverage but I think they'll release soon).
That being said, I think cross compiling against the new collection seems to be more work than I thought.
There are many places that we encounter backward breaking deprecations. It means to cross compile we'll need to create 2.13 specific code for them. @SethTisue I assume this is a common issue among libraries that cross compile. Is there a defacto solution yet?
FWIW, here are the errors I got so far on core.

[info] Compiling 47 Scala sources to /Users/kailuowang/projects/cats/kernel/.jvm/target/scala-2.13.0-M4/classes ...
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/Eq.scala:113:39: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]     override def combineAllOption(es: TraversableOnce[Eq[A]]): Option[Eq[A]] =
[error]                                       ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/Eq.scala:114:14: method isEmpty in class IterableOnceExtensionMethods is deprecated (since 2.13.0): Use .iterator.isEmpty instead of .isEmpty on IterableOnce
[error]       if (es.isEmpty) None
[error]              ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/Eq.scala:116:31: method toVector in class IterableOnceExtensionMethods is deprecated (since 2.13.0): Use Vector.from(it) instead of it.toVector on IterableOnce
[error]         val materialized = es.toVector
[error]                               ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/Eq.scala:129:39: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]     override def combineAllOption(es: TraversableOnce[Eq[A]]): Option[Eq[A]] =
[error]                                       ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/Eq.scala:130:14: method isEmpty in class IterableOnceExtensionMethods is deprecated (since 2.13.0): Use .iterator.isEmpty instead of .isEmpty on IterableOnce
[error]       if (es.isEmpty) None
[error]              ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/Eq.scala:132:31: method toVector in class IterableOnceExtensionMethods is deprecated (since 2.13.0): Use Vector.from(it) instead of it.toVector on IterableOnce
[error]         val materialized = es.toVector
[error]                               ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/Monoid.scala:35:22: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]   def combineAll(as: TraversableOnce[A]): A =
[error]                      ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/Monoid.scala:36:8: method foldLeft in class IterableOnceExtensionMethods is deprecated (since 2.13.0): Use .iterator.foldLeft instead of .foldLeft on IterableOnce
[error]     as.foldLeft(empty)(combine)
[error]        ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/Monoid.scala:38:37: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]   override def combineAllOption(as: TraversableOnce[A]): Option[A] =
[error]                                     ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/Monoid.scala:39:12: method isEmpty in class IterableOnceExtensionMethods is deprecated (since 2.13.0): Use .iterator.isEmpty instead of .isEmpty on IterableOnce
[error]     if (as.isEmpty) None else Some(combineAll(as))
[error]            ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/Monoid.scala:49:55: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]   def combineAll[@sp(Int, Long, Float, Double) A](as: TraversableOnce[A])(implicit ev: M[A]): A =
[error]                                                       ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/Semigroup.scala:40:28: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]   def combineAllOption(as: TraversableOnce[A]): Option[A] =
[error]                            ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/Semigroup.scala:69:31: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]   def combineAllOption[A](as: TraversableOnce[A])(implicit ev: S[A]): Option[A] =
[error]                               ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/StaticMethods.scala:15:9: overriding method + in trait MapOps of type [V1 >: V](kv: (K, V1))scala.collection.immutable.Map[K,V1];
[error]   method + needs `override' modifier
[error]     def +[V2 >: V](kv: (K, V2)): Map[K, V2] = m.toMap + kv
[error]         ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/StaticMethods.scala:16:9: overriding method - in trait MapOps of type (key: K)scala.collection.immutable.Map[K,V];
[error]   method - cannot override final member
[error]     def -(key: K): Map[K, V] = m.toMap - key
[error]         ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/StaticMethods.scala:11:25: class WrappedMutableMap needs to be abstract, since:
[error] it has 2 unimplemented members.
[error] /** As seen from class WrappedMutableMap, the missing signatures are as follows.
[error]  *  For convenience, these are usable as stub implementations.
[error]  */
[error]   def remove(key: K): scala.collection.immutable.Map[K,V] = ???
[error]   def updated[V1 >: V](key: K,value: V1): scala.collection.immutable.Map[K,V1] = ???
[error]   private[kernel] class WrappedMutableMap[K, V](m: mutable.Map[K, V]) extends Map[K, V] {
[error]                         ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/StaticMethods.scala:78:62: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]   def combineAllIterable[A, R](b: mutable.Builder[A, R], xs: TraversableOnce[Iterable[A]]): R = {
[error]                                                              ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/StaticMethods.scala:79:8: method foreach in class IterableOnceExtensionMethods is deprecated (since 2.13.0): Use .iterator.foreach(...) instead of .foreach(...) on IterableOnce
[error]     xs.foreach(b ++= _)
[error]        ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/StaticMethods.scala:118:26: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]   def orderedHash[A](xs: TraversableOnce[A])(implicit A: Hash[A]): Int = {
[error]                          ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/StaticMethods.scala:122:8: method foreach in class IterableOnceExtensionMethods is deprecated (since 2.13.0): Use .iterator.foreach(...) instead of .foreach(...) on IterableOnce
[error]     xs foreach { x =>
[error]        ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/list.scala:93:31: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]   override def combineAll(xs: TraversableOnce[List[A]]): List[A] =
[error]                               ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/map.scala:72:32: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]   override def combineAll(xss: TraversableOnce[Map[K, V]]): Map[K, V] = {
[error]                                ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/map.scala:74:9: method foreach in class IterableOnceExtensionMethods is deprecated (since 2.13.0): Use .iterator.foreach(...) instead of .foreach(...) on IterableOnce
[error]     xss.foreach { m =>
[error]         ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/queue.scala:57:31: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]   override def combineAll(xs: TraversableOnce[Queue[A]]): Queue[A] =
[error]                               ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:7:55: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   implicit def catsKernelStdOrderForStream[A: Order]: Order[Stream[A]] =
[error]                                                       ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:9:49: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   implicit def catsKernelStdMonoidForStream[A]: Monoid[Stream[A]] =
[error]                                                 ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:14:69: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   implicit def catsKernelStdPartialOrderForStream[A: PartialOrder]: PartialOrder[Stream[A]] =
[error]                                                                     ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:17:53: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   implicit def catsKernelStdHashForStream[A: Hash]: Hash[Stream[A]] =
[error]                                                     ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:22:49: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   implicit def catsKernelStdEqForStream[A: Eq]: Eq[Stream[A]] =
[error]                                                 ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:26:53: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error] class StreamOrder[A](implicit ev: Order[A]) extends Order[Stream[A]] {
[error]                                                     ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:27:19: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   def compare(xs: Stream[A], ys: Stream[A]): Int =
[error]                   ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:27:34: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   def compare(xs: Stream[A], ys: Stream[A]): Int =
[error]                                  ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:32:67: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error] class StreamPartialOrder[A](implicit ev: PartialOrder[A]) extends PartialOrder[Stream[A]] {
[error]                                                                   ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:33:26: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   def partialCompare(xs: Stream[A], ys: Stream[A]): Double =
[error]                          ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:33:41: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   def partialCompare(xs: Stream[A], ys: Stream[A]): Double =
[error]                                         ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:38:74: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error] class StreamHash[A](implicit ev: Hash[A]) extends StreamEq[A]()(ev) with Hash[Stream[A]] {
[error]                                                                          ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:39:16: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   def hash(xs: Stream[A]): Int = StaticMethods.orderedHash(xs)
[error]                ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:42:47: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error] class StreamEq[A](implicit ev: Eq[A]) extends Eq[Stream[A]] {
[error]                                               ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:43:15: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   def eqv(xs: Stream[A], ys: Stream[A]): Boolean =
[error]               ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:43:30: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   def eqv(xs: Stream[A], ys: Stream[A]): Boolean =
[error]                              ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:48:31: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error] class StreamMonoid[A] extends Monoid[Stream[A]] {
[error]                               ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:49:14: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   def empty: Stream[A] = Stream.empty
[error]              ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:49:26: value Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   def empty: Stream[A] = Stream.empty
[error]                          ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:50:18: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   def combine(x: Stream[A], y: Stream[A]): Stream[A] = x ++ y
[error]                  ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:50:32: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   def combine(x: Stream[A], y: Stream[A]): Stream[A] = x ++ y
[error]                                ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:50:44: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   def combine(x: Stream[A], y: Stream[A]): Stream[A] = x ++ y
[error]                                            ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:52:28: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   override def combineN(x: Stream[A], n: Int): Stream[A] =
[error]                            ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:52:48: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   override def combineN(x: Stream[A], n: Int): Stream[A] =
[error]                                                ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:53:36: value Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]     StaticMethods.combineNIterable(Stream.newBuilder[A], x, n)
[error]                                    ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:55:31: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]   override def combineAll(xs: TraversableOnce[Stream[A]]): Stream[A] =
[error]                               ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:55:60: type Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]   override def combineAll(xs: TraversableOnce[Stream[A]]): Stream[A] =
[error]                                                            ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/stream.scala:56:38: value Stream in package scala is deprecated (since 2.13.0): Use LazyList instead of Stream
[error]     StaticMethods.combineAllIterable(Stream.newBuilder[A], xs)
[error]                                      ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/string.scala:25:31: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]   override def combineAll(xs: TraversableOnce[String]): String = {
[error]                               ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/string.scala:27:8: method foreach in class IterableOnceExtensionMethods is deprecated (since 2.13.0): Use .iterator.foreach(...) instead of .foreach(...) on IterableOnce
[error]     xs.foreach(sb.append)
[error]        ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/unit.scala:36:37: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]   override def combineAllOption(as: TraversableOnce[Unit]): Option[Unit] =
[error]                                     ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/unit.scala:37:12: method isEmpty in class IterableOnceExtensionMethods is deprecated (since 2.13.0): Use .iterator.isEmpty instead of .isEmpty on IterableOnce
[error]     if (as.isEmpty) None else Some(())
[error]            ^
[error] /Users/kailuowang/projects/cats/kernel/src/main/scala/cats/kernel/instances/vector.scala:55:31: type TraversableOnce in package scala is deprecated (since 2.13.0): Use IterableOnce instead of TraversableOnce
[error]   override def combineAll(xs: TraversableOnce[Vector[A]]): Vector[A] =
[error]                               ^
[error] 57 errors found
[error] (kernelJVM / Compile / compileIncremental) Compilation failed
[error] Total time: 8 s, completed Jul 24, 2018 2:33:39 PM

@SethTisue
Copy link
Member

SethTisue commented Jul 24, 2018

There are many places that we encounter backward breaking deprecations. It means to cross compile we'll need to create 2.13 specific code for them. @SethTisue I assume this is a common issue among libraries that cross compile. Is there a defacto solution yet?

deprecation warnings are expected when cross-compiling. (using scala-collection-compat would eliminate many of them; you could take it on as a dependency, or you might decide that you don't want to deal with the extra dependency, either as maintainers, or because you don't want to impose it on your users, or both. cherry-picking the source code for the pieces you need into your project seems like a possibility as well, e.g. type IterableOnce[+X] = collection.TraversableOnce[X]; val IterableOnce = collection.TraversableOnce to make IterableOnce warnings go away. I'm not sure if anyone else is taking this approach.)

it's unfortunate that scalac doesn't offer fine-grained suppression of warnings, but you might consider using a third-party solution such as https://github.com/ghik/silencer

most projects are getting by with having Scala-version-specific versions of a few key source files (typically ones that interact directly with CanBuildFrom), but making a separate branch for 2.13 isn't out of the question, either, at the expense of complicating development (mainline changes have to be merged onto the branch) and releasing

@ghost
Copy link
Author

ghost commented Jul 24, 2018

@kailuowang The build file is a mess, but I've got catalysts compiling/testing OK for 2.13.0-M4.

I'll continue later/tomorrow morning a final version, Please shout here if you need something pushed sooner

@kailuowang
Copy link
Contributor

@BennyHill thanks for the update. Take your time. Catalyst isn't a blocker right now.

@kailuowang
Copy link
Contributor

@SethTisue thanks for the info, very helpful

@ghost
Copy link
Author

ghost commented Jul 24, 2018

@SethTisue Only slightly annoying issue I had was with macro annotations, fixed by adding "-Ymacro-annotations" The error message was

enable macro paradise to expand macro annotations

I'm OK now, but for the next guy, where is that change nicely documented? And would a more friendly error message be suitable here? Like "add the option...."

@ghost
Copy link
Author

ghost commented Jul 24, 2018

fyi, I found it by greping the simulacrum build file

@SethTisue
Copy link
Member

where is that change nicely documented?

in the M4 release notes, https://github.com/scala/scala/releases/tag/v2.13.0-M4

fsvo of "nicely" anyway

The error message was "enable macro paradise to expand macro annotations"

note that this error message isn't coming from the Scala compiler, it's coming from some particular macro annotation in some dependency of yours

it's unfortunate that we ended up in a situation where everyone pasted this error message into their code from the example in macro annotation documentation, so we can't update it centrally.

@ghost
Copy link
Author

ghost commented Jul 24, 2018

it's coming from some particular macro annotation in some dependency of yours

Nope...from my code 😄

I'll fix that per scala version, but might be a helping hint to add for others, your call. Many thanks, btw 👍

@kailuowang
Copy link
Contributor

published. The residual issues can be tracked in #2347. Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants