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

Support Scala 2.13 #62

Merged
merged 11 commits into from
Jan 18, 2020
Merged

Support Scala 2.13 #62

merged 11 commits into from
Jan 18, 2020

Conversation

jhnsmth
Copy link

@jhnsmth jhnsmth commented Jun 30, 2019

Unfortunately, I didn't notice that kafka isn't yet published for 2.13 and according to their JIRA it scheduled for 2.4.0, so we should not expect to get it pretty soon.

I'll try to setup some cross-build stuff in a couple of days.

@jhnsmth jhnsmth changed the title Support Scala 2.13 [WIP] Support Scala 2.13 Jun 30, 2019
@AdamChlupacek
Copy link
Member

@jhnsmth could you please try to get this into form where every other project than kafka compiles under 2.13? so that we are ready as we can be.

@jhnsmth
Copy link
Author

jhnsmth commented Jul 8, 2019

@AdamChlupacek sry, couldn't find some time. I hope to do it tomorrow

@AdamChlupacek
Copy link
Member

@jhnsmth This seems nearly finished now? Seems that tests are passing, weird that we do not see an issue with kafka anywhere.

@jhnsmth
Copy link
Author

jhnsmth commented Jul 11, 2019

@AdamChlupacek Sorry, for the delay. Yes, it should be finished now. But unfortunately there are some deprecation warnings on 2.13 related to the new collections api, so fatal warnings is turned off, is it ok for now ?
They can be fixed with some refactoring or by adding dependency on scala-collection-compat which I tried to avoid

@jhnsmth jhnsmth changed the title [WIP] Support Scala 2.13 Support Scala 2.13 Jul 11, 2019
@AdamChlupacek
Copy link
Member

@jhnsmth Sorry for such late response, been quite busy lately. I would prefer not to turn off fatal warnings, as we are depending on them, especially since they only appear when you are recompiling the given file, as such with incremental compilation it is quite hard to maintain code for production uses as this can hide some important errors.

@jhnsmth
Copy link
Author

jhnsmth commented Aug 22, 2019

@AdamChlupacek sry, for a long reply. I'm afraid it's not simple to enable fatal warnings for 2.13. Because of the deprecations in scala standard library. So it requires either adding dependency on https://github.com/scala/scala-collection-compat and rewriting using new syntax or breaking binary compatibility. Here is one of the examples. If I'm wrong please correct me.

I've added a commit that enables them for scala version below 2.13. But I'm open to any other suggestions

@guymers
Copy link
Contributor

guymers commented Sep 14, 2019

A possible solution to allow fatal warnings to be turned on for all Scala versions https://github.com/guymers/protocol/commit/00ebbb5e91765b849cce0e645ceeb971720fc85b

@AdamChlupacek
Copy link
Member

@jhnsmth I quite like @guymers solution, that seems to me to be the correct way to do it, as there are reasons for why scala 2.13 deprecated some of the constructors. Is it possible to update the PR with these changes? I will in the meanwhile create series/0.4 where we can put this.

@jhnsmth
Copy link
Author

jhnsmth commented Sep 18, 2019

@AdamChlupacek I'll do it late tonight or tomorrow.
@guymers If you do not mind I'll cherry-pick your commit

@guymers
Copy link
Contributor

guymers commented Sep 18, 2019

I do not mind. Looking forward to seeing Scala 2.13 support, thank you for creating this PR.

If you don't mind though could you please fix the commit message: lines is deprecated in 2.13 not 2.11 and linesIterator in 2.11 not 2.13.

guymers and others added 2 commits September 20, 2019 00:03
Add a `RightBiasedEither` implicit class for use by Scala 2.11

Replace `mapValues` with `map` to avoid Scala 2.13 deprecation warnings

Use `linesWithSeparators` over `lines` and `linesIterator` due to
`lines` being deprecated in 2.13 and `linesIterator` being deprecated in
2.11
@jhnsmth jhnsmth changed the base branch from series/0.3 to series/0.4 September 19, 2019 21:06
@jhnsmth
Copy link
Author

jhnsmth commented Sep 19, 2019

All done! Ready for a final review!

@lavrov
Copy link

lavrov commented Oct 7, 2019

Can this be merged to unblock Spinoco/fs2-http#37 ?

@s5bug
Copy link

s5bug commented Oct 12, 2019

@jhnsmth Any chance that, while the maintainers of fs2-http don't have 2.13 support merged in, you can publish 2.13 artifacts under your own organization so that projects can work on being migrated to 2.13?

@AdamChlupacek
Copy link
Member

Sorry for such a delay with this guys, i will get this out asap.

@AdamChlupacek AdamChlupacek merged commit d33a966 into Spinoco:series/0.4 Jan 18, 2020
@AdamChlupacek
Copy link
Member

So i tried to do the release, but it would seem we need to have all the cross builds in the main aggregating file, as such we need to get the kafka protocol to be building for 2.13, I will get a stab at it today.

@jhnsmth jhnsmth deleted the update/scala-2.13 branch January 19, 2020 15:51
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.

5 participants