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

scalafixDependencies not updated for scala 2.13 #1413

Closed
anilkumarmyla opened this issue Apr 28, 2020 · 7 comments · Fixed by #1423 or scala-steward-org/sbt-plugin#50
Closed

scalafixDependencies not updated for scala 2.13 #1413

anilkumarmyla opened this issue Apr 28, 2020 · 7 comments · Fixed by #1423 or scala-steward-org/sbt-plugin#50

Comments

@anilkumarmyla
Copy link
Contributor

We have the following in build.sbt

scalaVersion := "2.13.2"
...
scalafixDependencies in ThisBuild ++= Seq(
  "com.nequissimus" %% "sort-imports" % "0.3.2"
)

Strangely scala-steward does not find an update for sort-imports, but finds it when we downgrade scalaVersion to 2.12.11.

Interestingly that module is only published for scala 2.12 but somehow magically works on scala 2.13 as well 🤔

@anilkumarmyla
Copy link
Contributor Author

This may have strong connection to scalacenter/scalafix#998

@fthomas
Copy link
Member

fthomas commented Apr 29, 2020

Maybe an easy workaround could be to not use %% and define the Scalafix dependency as "com.nequissimus_2.12" % "sort-imports" % "0.3.2"?

@anilkumarmyla
Copy link
Contributor Author

anilkumarmyla commented Apr 29, 2020

nope, fails to download

[error] coursierapi.error.SimpleResolutionError$1: Error downloading com.nequissimus:sort-imports:0.3.2
[error]   not found: /Users/anilkumarmyla/.ivy2/local/com.nequissimus/sort-imports/0.3.2/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/com/nequissimus/sort-imports/0.3.2/sort-imports-0.3.2.pom
[error]   not found: https://oss.sonatype.org/content/repositories/public/com/nequissimus/sort-imports/0.3.2/sort-imports-0.3.2.pom
[error]   not found: https://oss.sonatype.org/content/repositories/snapshots/com/nequissimus/sort-imports/0.3.2/sort-imports-0.3.2.pom

Update: Sorry I missed the 2.12 part, this appears to not break the build, will try out scala-steward on this

scalafixDependencies in ThisBuild ++= Seq(
  "com.nequissimus" % "sort-imports_2.12" % "0.3.2"
)

@fthomas
Copy link
Member

fthomas commented Apr 30, 2020

🤣 Of course the Scala binary version goes onto the artifactId and not the groupId. Sorry for that silly mistake.

@anilkumarmyla
Copy link
Contributor Author

@fthomas Thanks for the pointer, scala-steward works with the _2.12 hack when scalaVersion is 2.13.x ! Feel free to close

@anilkumarmyla
Copy link
Contributor Author

@fthomas seems like after the workaround, we got bad PRs again, should we also include sort_imports_2.12 as done in #1354
Update sort-imports_2.12 to 36845576
Updates com.nequissimus:sort-imports_2.12 from 0.5.0 to 36845576.

@fthomas
Copy link
Member

fthomas commented May 4, 2020

Yes, I think it is reasonable to add sort-imports_2.12 there.

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