-
Notifications
You must be signed in to change notification settings - Fork 509
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
Cross-build with Scala 3 #3527
Cross-build with Scala 3 #3527
Conversation
... since it is not available for Scala 3
This fixes warnings like ``` -- [E175] Potential Issue Warning: modules/core/src/main/scala/org/scalasteward/core/client/ClientConfiguration.scala:52:31 52 | builder.sslParameters(params) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | discarded non-Unit value of type java.net.http.HttpClient#Builder ```
This fixes warnings like ``` -- Warning: modules/core/src/main/scala/org/scalasteward/core/nurture/UpdateInfoUrlFinder.scala:92:17 92 | customUrls(CustomReleaseNotes, possibleReleaseNotesFilenames) ++ | ^^^^^^^^^^^^^^^^^^ |The method `apply` is inserted. The auto insertion will be deprecated, please write `org.scalasteward.core.nurture.UpdateInfoUrl.CustomReleaseNotes.apply` explicitly. ```
... to fix these errors ``` -- [E008] Not Found Error: modules/core/src/main/scala/org/scalasteward/core/repoconfig/PullRequestFrequency.scala:33:43 33 | case CronExpr(expr) => expr.datePart.allOf(now.toLocalDateTime) | ^^^^^^^^^^^^^^^^^^^ |value allOf is not a member of cron4s.expr.DateCronExpr, but could be made available as an extension method. -- [E008] Not Found Error: modules/core/src/main/scala/org/scalasteward/core/repoconfig/PullRequestFrequency.scala:41:34 41 | case CronExpr(expr) => expr.next(lastCreated.toLocalDateTime).map(Timestamp.fromLocalDateTime) | ^^^^^^^^^ |value next is not a member of cron4s.CronExpr, but could be made available as an extension method. ```
This fixes ``` -- [E198] Unused Symbol Warning: modules/core/src/main/scala/org/scalasteward/core/repoconfig/UpdatesConfig.scala:29:54 29 |import org.scalasteward.core.repoconfig.UpdatesConfig.defaultLimit | ^^^^^^^^^^^^ | unused import ```
... to fix ``` -- [E008] Not Found Error: modules/core/src/test/scala/org/scalasteward/core/BuiltinConfigFilesTest.scala:37:9 35 | val migrations = artifactMigrationsLoader 36 | .loadAll(ArtifactCfg(List(), disableDefaults = false)) 37 | .runA(initialState) | ^ |value runA is not a member of org.scalasteward.core.mock.MockEff[ | List[org.scalasteward.core.update.artifact.ArtifactChange]], but could be made available as an extension method. | |The following import might fix the problem: | | import org.scalasteward.core.mock.MockEffOps ```
This fixes ``` -- [E178] Type Error: modules/core/src/test/scala/org/scalasteward/core/util/uriTest.scala:11:6 11 | uri.withUserInfo.replace(UserInfo("user", Some("pass")))(url).toString, | ^^^ | missing argument list for method uri in trait LiteralsSyntax | | inline def uri(ctx: StringContext)(args: Any*): org.http4s.Uri | | longer explanation available when compiling with `-explain` ``` which was caused by the ambiguous `uri` reference.
Adding Scala 3 to `doc/crossScalaVersions` results in the following error ``` sbt:scala-steward> doc/mdoc [error] Modules were resolved with conflicting cross-version suffixes in ProjectRef(uri("."), "docs"): [error] org.scala-lang.modules:scala-collection-compat _3, _2.13 [error] com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-core _3, _2.13 ``` which I believe is due to using `for3Use2_13` for Coursier. I therefore kept the `doc` project Scala 2-only and added the `-tasty-reader` scalac option to prevent this error ``` sbt:scala-steward> doc/mdoc [info] running mdoc.SbtMain error: error while loading Cli, Missing dependency 'Add -Ytasty-reader to scalac options to parse the TASTy in modules/core/.jvm/target/scala-3.3.4/classes/org/scalasteward/core/application/Cli.tasty', required by modules/core/.jvm/target/scala-3.3.4/classes/org/scalasteward/core/application/Cli.tasty [error] java.lang.RuntimeException: mdoc failed ```
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3527 +/- ##
==========================================
+ Coverage 89.73% 89.78% +0.04%
==========================================
Files 171 171
Lines 3537 4983 +1446
Branches 330 504 +174
==========================================
+ Hits 3174 4474 +1300
- Misses 363 509 +146 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally!!
Great job!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏🏼 👏🏼 👏🏼 🥳
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done 🚀
Thanks guys! |
No description provided.