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-rules_3 (GSoC 2022) #1643

Merged
merged 5 commits into from
Jul 22, 2022
Merged

Conversation

rvacaru
Copy link
Contributor

@rvacaru rvacaru commented Jul 22, 2022

Follows #1629
Part of the issues #1583 and #1680

Ready for review:

  • moved rules ExplicitResultTypes (with all related dependencies) and ProcedureSyntax in scala-2
    • did not check if also other rules should be moved to scala-2
  • provided another TPrintImplicits in scala-3, exact copy as the one in scala-2.12+
  • added rules3/compile in ci-3 check

@rvacaru rvacaru force-pushed the scalafix-rules-scala3 branch from 2a049b6 to 1fdbcb1 Compare July 22, 2022 14:24
@rvacaru rvacaru changed the title WIP - Scalafix-rules cross compiled in scala3 Scalafix-rules cross compiled in scala3 Jul 22, 2022
@bjaglin bjaglin force-pushed the scalafix-rules-scala3 branch from 1fdbcb1 to c5e019b Compare July 22, 2022 17:46
@bjaglin
Copy link
Collaborator

bjaglin commented Jul 22, 2022

rebased against #1629 to ease the review

@bjaglin bjaglin marked this pull request as ready for review July 22, 2022 18:01
Copy link
Collaborator

@bjaglin bjaglin left a comment

Choose a reason for hiding this comment

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

Nice!

We'll have to reflect on how to have different versions of https://github.com/scalacenter/scalafix/blob/main/scalafix-rules/src/main/resources/META-INF/services/scalafix.v1.Rule based on the scala version, as the presence of the reference to a non-existing ProcedureSyntax will cause a runtime failure for

def all(classLoader: ClassLoader): List[Rule] = {
import scala.jdk.CollectionConverters._
ServiceLoader
.load(classOf[Rule], classLoader)
.iterator()
.asScala
.toList
}

But this can be handled later, when working on unit3.

@bjaglin bjaglin merged commit 4e10544 into scalacenter:main Jul 22, 2022
@bjaglin bjaglin changed the title Scalafix-rules cross compiled in scala3 scalafix-rules_3 Oct 2, 2022
@bjaglin bjaglin changed the title scalafix-rules_3 scalafix-rules_3 (GSoC 2022) Oct 2, 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