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

sbt-scalafix: default scalafixScalaBinaryVersion to scalaBinaryVersion #1658

Open
bjaglin opened this issue Aug 16, 2022 · 3 comments
Open

Comments

@bjaglin
Copy link
Collaborator

bjaglin commented Aug 16, 2022

For ExplicitResultTypes to work out of the box, it would better to set by default

scalafixScalaBinaryVersion := scalaBinaryVersion.value

Current blockers:

@ssanj
Copy link
Contributor

ssanj commented Aug 17, 2022

In the short term would a note about adding the scalafixScalaBinaryVersion to build.sbt in ExplicitResultTypes documentation be of any use?

Eg.

The ExplicitResultTypes rule needs to run with the same Scala binary version as the one used to compile target sources. Please add the following scalafixScalaBinaryVersion to your build.sbt file:

scalafixScalaBinaryVersion := scalaBinaryVersion.value //supported versions are 2.11, 2.12, 2.13

I stumbled across this issue recently and would have found some documentation about configuring scalafixScalaBinaryVersion at the location of the rule configuration helpful.

@bjaglin
Copy link
Collaborator Author

bjaglin commented Aug 17, 2022

In the short term would a note about adding the scalafixScalaBinaryVersion to build.sbt in ExplicitResultTypes documentation be of any use?

Feel free to open a PR to update the docs. Remember this page is about scalafix, so your message should mention that this hint is for sbt only.

I am not familiar with community clients, but it looks like the scala binary version is not configurable for the mill and the maven ones (to be confirmed):

@ssahayam-zd
Copy link

Feel free to open a PR to update the docs. Remember this page is about scalafix, so your message should mention that this hint is for sbt only.

Sure. The installation page only has explicit config for SBT, so I was going to do something similar to that.

I will mention that it's only for SBT.

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

3 participants