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

scalafix CLI should include scala-library on the classpath by default #1712

Open
mackenziestarr opened this issue Dec 7, 2022 · 0 comments

Comments

@mackenziestarr
Copy link

In order to test out the ExplicitResultTypes semantic rule with scalafix CLI like the example in the docs, one currently has to include scala-library in the --classpath argument.

$ scalafix --scala-version 2.13.10 --verbose --rules ExplicitResultTypes --classpath=/tmp/scala-library-2.13.10.jar --semanticdb-targetroots . --stdout
info: Processing (0/1) /tmp/scalafix-sandbox/Main.scala
package com.example
object Main {
  def myComplexMethod: Map[Int,String] = 1.to(10).map(i => i -> i.toString).toMap
}

I think it'd be a smoother developer experience to include scala-library (and possibly other org.scala-lang.* libraries) on the classpath by default so that small examples with semantic rules work when people are using scalafix CLI as a means to try out the tooling for the first time.

originally surfaced in scalameta/scalameta#2979

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

No branches or pull requests

2 participants