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

WIP Re-add support for Scala 2.13 #737

Closed
wants to merge 9 commits into from
Closed

WIP Re-add support for Scala 2.13 #737

wants to merge 9 commits into from

Conversation

denisgarci
Copy link
Contributor

This is a first attempt at #732.
A few dependencies haven't yet been published:

Also I get the following error when running coreJVM/test:

[error] /Users/denisgarcia/dev/github/scalaz-zio/core/jvm/src/test/scala/scalaz/zio/RTSSpec.scala:1082:25: object interruptible is not a member of package scalaz.zio.blocking
[error]       fiber <- blocking.interruptible { start.set(()); Thread.sleep(Long.MaxValue) }.ensuring(done.set(true)).fork
[error]                         ^
[error] /Users/denisgarcia/dev/github/scalaz-zio/core/jvm/src/test/scala/scalaz/zio/RTSSpec.scala:1068:16: object blockingExecutor is not a member of package scalaz.zio.blocking
[error]       blocking.blockingExecutor.map(_.metrics.get.workersCount)
[error]                ^
[error] /Users/denisgarcia/dev/github/scalaz-zio/core/jvm/src/test/scala/scalaz/zio/RTSSpec.scala:1071:28: object blocking is not a member of package scalaz.zio.blocking
[error] did you mean Blocking?
[error]       thread1  <- blocking.blocking(IO.effectTotal(Thread.currentThread()))
[error]                            ^
[error] three errors found

I think it has to do with package object but I'm not sure how to fix it.

@jdegoes
Copy link
Member

jdegoes commented Apr 14, 2019

@denisgarci Cats would hold up publishing for cats-interop. The other ones should work. Is it possible to publish 2.13 for everything but cats-interop?

I can help fix that error.

@denisgarci
Copy link
Contributor Author

@jdegoes Thanks for the feedback. I managed to make coreJVM test pass on my local branch!
To fix the blocking package object issue I removed the different specific 2.11 and 2.12 implementation and used the 2.11 package object (no inheritance) for all 3 versions.
Not sure if that's the best way to do it. Package object inheritance will be deprecated in 2.14 scala/scala#7857.
One of the problem I'm facing is that there are a lot of deprecation in scala.collection that makes some changes not backward compatible. What's the recommended approach? Copy the code in different 2.11_2.12 / 2.13 folder or maybe create a small collection utility wrapper?

@jdegoes
Copy link
Member

jdegoes commented Apr 15, 2019

@denisgarci

To fix the blocking package object issue I removed the different specific 2.11 and 2.12 implementation and used the 2.11 package object (no inheritance) for all 3 versions.

Arg. Not super happy about that. What if you change package object to just object? Does that make the errors go away?

Copy the code in different 2.11_2.12 / 2.13 folder or maybe create a small collection utility wrapper?

A small collection utility wrapper would work best! Then the core code will be common.

Also, it's possible there are already enough overlapping methods we can get it compiling without a common utility wrapper.

@jdegoes
Copy link
Member

jdegoes commented Apr 16, 2019

@denisgarci If you run fmt, it will fix the linting error. Then I'd add 2.13 to the Travis file to get it building on Travis too.

@denisgarci
Copy link
Contributor Author

So I've pushed all the 2.13 only changes with comments. I couldn't make the blocking package object work. It currently lives in 2.12/ folder. Should I rename it to 2.12+/?

@jdegoes
Copy link
Member

jdegoes commented May 4, 2019

@denisgarci Can you tell me the error? I'd be happy to help you with that.

I'd love to get this pull request merged in for RC5 (coming this week).

@denisgarci
Copy link
Contributor Author

I don't have access to a computer this weekend. I'll be able to work on it next week though.
My biggest problem right is method that have been deprecated for a a specific Scala version.
For example . lines (2.11 & 2.12) vs . linesIterator (2.12+ only). Or .enqueue vs .enqueueAll.

@jdegoes
Copy link
Member

jdegoes commented May 16, 2019

@denisgarci Please let me know if you need any help with this!

@denisgarci
Copy link
Contributor Author

Closing for now see #732 (comment)

@denisgarci denisgarci closed this May 29, 2019
@denisgarci denisgarci deleted the enable-scala-213 branch May 29, 2019 15:01
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

Successfully merging this pull request may close these issues.

2 participants