Skip to content

prePR doesn't generate reports on master #524

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

Closed
japgolly opened this issue Aug 30, 2021 · 11 comments · Fixed by #525
Closed

prePR doesn't generate reports on master #524

japgolly opened this issue Aug 30, 2021 · 11 comments · Fixed by #525
Assignees

Comments

@japgolly
Copy link
Contributor

Gotta add (root / Compile / scalafix).toTask("") back in

@armanbilge
Copy link
Member

Oops!

@armanbilge armanbilge self-assigned this Aug 30, 2021
@japgolly
Copy link
Contributor Author

Hehe. I think you disabled it cos of Scala 3. Gonna have to find a temporary workaround I think...

@armanbilge
Copy link
Member

We can just add a scala version check I think.

@armanbilge
Copy link
Member

Wait, maybe I did something stupid in #512 and deleted every line with "delete if scala 2.10" when what I should have done is delete the comment and otherwise leave alone.

@japgolly
Copy link
Contributor Author

Yeah I was just having a look at scalacenter/scalafix#1316 and it seems Scalafix still doesn't support Scala 3. I could've sworn a read a few weeks ago that it does now.

Edit: now I'm seeing some PRs that indicate that it might be supported after all, looking in to it atm....

@armanbilge
Copy link
Member

The sbt plugin supports scala 3 I think, but the core module was not published for scala3 which is why I snuck a for3Use213 into the build.

@japgolly
Copy link
Contributor Author

So is there a way to use it on Scala 3 builds? I'm a bit confused

@armanbilge
Copy link
Member

I restored (root / Compile / scalafix).toTask("") and I'm just about to give it a try, we'll see

@armanbilge
Copy link
Member

@japgolly this is what spits out:

To use Scalafix on Scala 3 projects, you must unset `scalafixBinaryScalaVersion`. Rules such as ExplicitResultTypes requiring the project version to match the Scalafix version are unsupported for the moment.

@japgolly
Copy link
Contributor Author

Problems:

  • RemoveUnused can't be used with Scala 3 because there isn't a -Wunused flag in Scala 3 yet
  • Setting scalafixBinaryScalaVersion to 2.13 and hardcoding scalaVersion := "2.13.4" in the scalafixRules settings works but unfortunately no semantic information is available so GenerateApiReports crashes

We're just gonna have to disable scalafix all together for Scala 3 in a way that

  • prePR works
  • we don't have source-patching hacks like we did for Scala 2.10

@armanbilge
Copy link
Member

I think that's doable, I'm on it in #525.

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 a pull request may close this issue.

2 participants