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

pprint is only required on -cli for 0.9.x compat #1596

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

bjaglin
Copy link
Collaborator

@bjaglin bjaglin commented Apr 11, 2022

Follows #1546

Tested against regressions via

val args = scalafixAPI.newArguments
.withToolClasspath(
Seq[URL]().asJava,
Seq[String]("com.nequissimus::sort-imports:0.5.2").asJava,
Seq[Repository](Repository.central()).asJava
)
assert(
args.availableRules.asScala.map(_.name).contains("RemoveUnused")
) // built-in rule
assert(
args.availableRules.asScala.map(_.name).contains("SortImports")
) // community rule
(com.nequissimus::sort-imports:0.5.2 is built against 0.9.x)

@bjaglin bjaglin marked this pull request as ready for review April 11, 2022 17:12
@bjaglin bjaglin requested a review from mlachkar April 11, 2022 17:12
Comment on lines +52 to +55
Dependency scalafixCli = Dependency
.parse("ch.epfl.scala:::scalafix-cli:" + scalafixVersion, ScalaVersion.of(scalaVersion))
.withConfiguration("runtime");
return toURLs(fetch(repositories, Collections.singletonList(scalafixCli), ResolutionParams.create()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice that this code is simplified

@bjaglin bjaglin merged commit 71e6ca2 into scalacenter:main Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants