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

Migrate to 2.13 #1118

Merged
merged 5 commits into from
May 26, 2020
Merged

Migrate to 2.13 #1118

merged 5 commits into from
May 26, 2020

Conversation

mlachkar
Copy link
Collaborator

@mlachkar mlachkar commented May 11, 2020

The missing points that need to be addressed to complete this migration to 2.13:

  • Rule NoAutoTupling: unitAdaptations doesn't work (it should be some missing ScalaOption)
  • ExplicitResultTypes: will be handled in another issue Make ExplicitResultTypes work with more Scala versions #998
  • test AnchorPatches: Workes only for 2.12 (contains ExplicitResultTypes rule)
  • Doc: I had trouble with doc compilation, and just removed the lines that do not compile, which is not a solution.

@mlachkar mlachkar changed the title update scalatest 3.1.2 update librairies May 11, 2020
@@ -21,7 +21,8 @@ object Dependencies {
def metacp = "org.scalameta" %% "metacp" % scalametaV
def semanticdbPluginLibrary = "org.scalameta" % "semanticdb-scalac-core" % scalametaV cross CrossVersion.full
def scalameta = "org.scalameta" %% "scalameta" % scalametaV
def scalatest = "org.scalatest" %% "scalatest" % "3.0.8"
def bijectionCore = "com.twitter" %% "bijection-core" % "0.9.7"
def scalatest = "org.scalatest" %% "scalatest" % "3.1.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason this upgrade is needed? The upgrade was reverted in #1083

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is no real reason for that. I was just updating some libs, removing some todo, and adding the real change on top of that.
I will remove that.

@mlachkar mlachkar changed the title update librairies Migrate to 2.13 May 12, 2020
Copy link
Contributor

@olafurpg olafurpg left a comment

Choose a reason for hiding this comment

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

This looks great! I'm excited to finally cross-build against 2.13. Just a few non-critical comments. Feel free to merge

One thought, we may want to replace usage of scala.Seq with scala.collection.Seq in all places of the public API to smoothen the migration for 3rdparty rules. For example, in the method below we previously accepted mutable collections in PatchOps.replaceSymbol() but in 2.13 it would only accept immutable collections. I think it would be nice to continue to allow mutable collections there, but I don't feel strongly about it

private val results: List[Int] = List.empty
protected val results2: List[Int] = List.empty
}
//todo: in 2.13, the type found is AnyRef
Copy link
Contributor

Choose a reason for hiding this comment

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

It's usually better to open an issue in my experience and link to from here instead of adding a todo comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will create all corresponding issues.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@ohze
Copy link

ohze commented May 25, 2020

I think this line

if (isScala213.value) "-Ywarn-unused:imports"

should be ... "-Wunused:imports" ?

@mlachkar
Copy link
Collaborator Author

You're right @ohze. Thanks for noticing that.

Copy link
Contributor

@olafurpg olafurpg left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Thank you @mlachkar for driving this upgrade!

@mlachkar mlachkar merged commit 73a63d5 into scalacenter:master May 26, 2020
bjaglin pushed a commit to bjaglin/scalafix that referenced this pull request May 27, 2020
* update bijection-core 0.9.7

* Migrate to 2.13

* remove fixed todo

* Fix warnings in 2.13 and keep scala.collection.Seq for the api

* Fix scalaOption for unused import in 2.13
@mlachkar mlachkar deleted the update branch October 8, 2020 09:48
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.

3 participants