Log4s / log4s

High-performance SLF4J wrapper for Scala.
Other
171 stars 25 forks source link

Cross-build for 3.0.0-M1 (JVM only) #57

Closed rossabaker closed 3 years ago

rossabaker commented 4 years ago

Adds a JVM-only build for Scala 3.0.0-M1. Drops the vestiges of 2.10 support.

Fixes #51

rossabaker commented 4 years ago

This isn't perfect yet, but seems to work. I could release it as a milestone to unblock downstream.

sarahgerweck commented 4 years ago

@rossabaker Thanks for all the hard work on this! I'm cool with dropping 2.10 support (I think we did a while ago) and releasing a 1.10 milestone build. I'd like to make sure that the new mixin doesn't reduce runtime performance, else I'd rather go with copy/paste.

It would be nice to put back constant detection before a real 1.10 release, though I'm less concerned about that. (In practice, it's not super common to log a string value that you've already calculated.)

sarahgerweck commented 4 years ago

As I'm thinking about it, we should also make sure that the new mixin doesn't break binary compatibility.

rossabaker commented 4 years ago

MiMa ran clean on all three Scala 2 versions locally. But if we use the mixin in what we call 1.10, we're stuck with it, which might be an argument to remove it.

sarahgerweck commented 4 years ago

@rossabaker I could be persuaded, but I’m generally more inclined toward copy-paste that leads to a smaller, cleaner API.

rossabaker commented 4 years ago

Let's do it your way. It increases the risk of divergence, but it's more futureproof, and the compatibility story makes this project shine.

rossabaker commented 4 years ago

I think that approach also means the Logger in Scala 3 could use new Dotty syntax or features, but I don't want to go on any adventures that might compromise source compatibility for downstream libraries spanning 2 and 3.

sarahgerweck commented 4 years ago

Yeah, I think that’s the right call.

I’ve considered doing an API changes by allowing you to import a different package. It might be time to look at what that might look like.

(In retrospect, I wouldn’t use curried syntax for logging errors. I think it’s too cute and not that useful.)

rossabaker commented 4 years ago

Right. You can't partially apply the macro, and if you could, to what end? But that's probably a whole other ticket.

rossabaker commented 4 years ago

Ugh. I have my doubts that sbt-release is going to work as is, since we introduced testIfRelevant, and dottydoc still doesn't work.

rossabaker commented 4 years ago

I tried testing the release with tagRelease, commitNextVersion, and pushChanges commented, and it still wants to download those missing ScalaTest DottyJS artifacts.

rossabaker commented 4 years ago

With f6a6a5b, I successfully tested sbt release with the destructive steps commented.

I'll release this as 1.10.0-M1 with a thumbs up from both @sarahgerweck and Travis CI.

rossabaker commented 3 years ago

Since this is just a milestone, I'm going to go ahead and publish so we can try this out downstream. We can always toss the whole thing in the trash later.