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

Update sbt-scalafix to 0.13.0 #751

Closed
wants to merge 1 commit into from

Conversation

alexcardell
Copy link

@alexcardell alexcardell commented Oct 5, 2024

0.13.0 allows using OrganizeImports.removeUnused in Scala 3.3.4, which is very helpful

@mergify mergify bot added the scalafix label Oct 5, 2024
@armanbilge
Copy link
Member

Dupe of #749, although we didn't bump the base version 🤔

@alexcardell
Copy link
Author

Oh my bad, I only checked the latest release, doh.

I bumped because I assumed it would be incompatible for any plugins depending on the scalafix plugin

@alexcardell alexcardell closed this Oct 5, 2024
@armanbilge
Copy link
Member

I bumped because I assumed it would be incompatible for any plugins depending on the scalafix plugin

Yes, I think you did the right thing. I am going to think more about it.

@mzuehlke
Copy link
Collaborator

Bumping the version because one of our dependency did a change is not an easy question.
I often argued that a library tool is only responsible for the their own API. If I as a client use sbt-typelevel and rely on the functionality on one of the dependencies of sbt-typelevel than I need to make sure I add this to my own. In other words never rely on transitive dependencies.

When we would follow this argumentation we won't have to bump our base version.

@armanbilge
Copy link
Member

armanbilge commented Oct 10, 2024

@mzuehlke thanks for explaining your reasoning.

When we would follow this argumentation we won't have to bump our base version.

When I follow your argument (and I think it's a reasonable one), I come to the conclusion that we should not bump the Scalafix dependency.

If I as a client use sbt-typelevel and rely on the functionality on one of the dependencies of sbt-typelevel than I need to make sure I add this to my own. In other words never rely on transitive dependencies.

Yes, I can agree with this. If you want the latest Scalafix features, then you can directly add the Scalafix dependency to your build. This is opt-in.

The problem is that when we ship the latest (breaking) Scalafix, then we force the breakage onto users without an ability for them to opt-out.

So I think your argument about users/clients taking responsibility for transitive dependencies, only makes sense if we don't force breaking versions onto them.


However ... there is also an argument that sbt-typelevel should make builds easy without needing to add all the dependencies (similar to the scala-cli philosophy).


Thoughts? Thanks for the discussion.


I was about to post, but I had an idea for how I want to move forward.

We'll publish the Scalafix bump without bumping the sbt-typelevel base version. If this causes breakage for a user, they can choose to pin sbt-typelevel-scalafix to v0.7.3 while continuing to use the latest sbt-typelevel until they are able to complete the Scalafix upgrade. This works because sbt-typelevel doesn't include sbt-typelevel-scalafix. It's already a separate dependency, which offers some flexibility for versioning.

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

Successfully merging this pull request may close these issues.

3 participants