Skip to content

Ease parallel support of scala 2.10 and scala 2.11 #30

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

Closed
tarmath opened this issue Feb 25, 2015 · 2 comments
Closed

Ease parallel support of scala 2.10 and scala 2.11 #30

tarmath opened this issue Feb 25, 2015 · 2 comments

Comments

@tarmath
Copy link

tarmath commented Feb 25, 2015

We have a few generic libraries that we use across a variety of projects that makes extensive usage of scalalogging. As it turns out, we need to migrate to scala 2.11 in some projects while some others will stay behind for a few months.

I was able to support both scala versions with no code changes at all, except for scalalogging. I minimized these changes to one file where I simply hide the diverging import. This is how it looks:

with scala 2.10 (scalalogging):

package com.tarmath.utils.logging
import com.typesafe.scalalogging.slf4j.{Logging => ScalaLogging}
trait Logging extends ScalaLogging

with scala 2.11 (scala-logging):

package com.tarmath.utils.logging
import com.typesafe.scalalogging.{LazyLogging => ScalaLogging}
trait Logging extends ScalaLogging

However, this needs to be replicated into several other libraries, and complicates our builds quite a bit. We are thus hoping that perhaps this tiny interface could be added directly to scalalogging (the older package) so as to allow the exact same import as what the newer scala-logging library requires.

This could help other users of this library who are looking at upgrading and may need to support both versions for a while?

Otherwise, we'll proceed to add this hack everywhere and change our build processes.

Thanks!

@jlandahl
Copy link

jlandahl commented Jul 9, 2015

+1

@tarmath
Copy link
Author

tarmath commented May 15, 2020

closing this since everyone obviously moved on since

@tarmath tarmath closed this as completed May 15, 2020
Atry added a commit to Atry/scala-logging that referenced this issue Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants