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

drop support for sbt 0.13 #225

Closed
wants to merge 3 commits into from
Closed

Conversation

bjaglin
Copy link
Collaborator

@bjaglin bjaglin commented May 28, 2021

Closes scalacenter/scalafix#1333

sbt 0.13 users will still be able to get the latest version of Scalafix by explicitly including it:

 // project/plugins.sbt
 addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.29") // last version published for sbt 0.13
+dependencyOverrides += "ch.epfl.scala" % "scalafix-interfaces" % "0.9.x"

Comment on lines +476 to +488
import sjsonnew._
import sjsonnew.BasicJsonProtocol._

val argWriter = new JsonWriter[Arg.CacheKey] {

override final def write[J](
obj: Arg.CacheKey,
builder: Builder[J]
): Unit = stamp(obj)(builder)

private def stamp[J](
obj: Arg.CacheKey
)(implicit builder: Builder[J]): Unit = obj match {
Copy link
Collaborator Author

@bjaglin bjaglin May 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is way too much logic in ScalafixPlugin.scala. I wanted to keep this minimal - I'll extract that in a separate PR.

@bjaglin
Copy link
Collaborator Author

bjaglin commented May 31, 2021

any objection @olafurpg ?

@olafurpg
Copy link
Contributor

No objections from me. If it’s easy to support, it might be worth releasing a 0.13 version that support loading a configurable version of Scalafix. That would allow the latest 0.13 version to call future versions of Scalafix. But I wouldn’t worry about it if it’s too much effort.

@bjaglin
Copy link
Collaborator Author

bjaglin commented May 31, 2021

If it’s easy to support, it might be worth releasing a 0.13 version that support loading a configurable version of Scalafix.

That was my initial thought too, and I have been postponing this until I get free time to tackle scalacenter/scalafix#1146, but the last PRs showed that it was getting increasingly annoying, so I got tired of it. Since getting a custom scalafix version is as simple as https://scalacenter.github.io/scalafix/docs/users/installation.html#snapshot, I assume we can write up something if there is interest.

I remember you posting stats about Sonatype downloads at some point, is that something you still have access to? I guess it's not very accurate but it could give an idea of the current sbt 0.13 user base.

@olafurpg
Copy link
Contributor

olafurpg commented Jun 1, 2021

That workaround is good enough (exactly what I was looking for).

Sonatype doesn’t provide download stats on sbt plugins unfortunately. I think it has something to do with how sbt plugins artifacts use Ivy patterns.

@bjaglin bjaglin requested a review from mlachkar June 1, 2021 06:07
@bjaglin bjaglin closed this Jun 1, 2021
@bjaglin bjaglin deleted the dropsbt013 branch June 1, 2021 07:24
@bjaglin bjaglin mentioned this pull request Jun 1, 2021
@bjaglin
Copy link
Collaborator Author

bjaglin commented Jun 1, 2021

Not sure why this got closed after my rebase against #228 🤔

Following up in #230.

I have added a note in https://github.com/scalacenter/scalafix/pull/1417/files#diff-2e28f911279567cbb268785581f61db7f687f49d4adedbd85a06b0943fbcd320 for the best-effort sbt 0.13.x support.

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