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

Scala 2.13: Replace deprecated procedure syntax with explicit ': Unit =' #25188

Conversation

ioannakok
Copy link
Contributor

@ioannakok ioannakok commented Jul 5, 2022

What does this change?

We're trying to fix as many syntax errors as possible while we're still in Scala 2.12. For this PR, we added: addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1") in plugins.sbt and ran scalafixAll ProcedureSyntax in the sbt shell.

@ioannakok ioannakok force-pushed the roberto-ioanna/scala-2.13-replace-deprecated-procedure-syntax branch from 7791d8d to affbdf3 Compare July 5, 2022 14:54
We're trying to fix as many syntax errors as possible while we're still in Scala 2.12.

For this PR, we added: `addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1")` in
`plugins.sbt` and ran `scalafixAll ProcedureSyntax` in the `sbt` shell.
@rtyley rtyley force-pushed the roberto-ioanna/scala-2.13-replace-deprecated-procedure-syntax branch from affbdf3 to d0c9a74 Compare July 5, 2022 15:01
@ioannakok ioannakok marked this pull request as ready for review July 6, 2022 08:34
@ioannakok ioannakok requested a review from a team as a code owner July 6, 2022 08:34
Copy link
Contributor

@jamesgorrie jamesgorrie left a comment

Choose a reason for hiding this comment

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

Nice!

Been digging to find out why Unit is called Unit.

The definition in Scala is:

There is only one value of type Unit, ()

Which then led me to the Maths Wikipedia page... which was hard to read. Thought the rust description was pretty good.

Thought it relatively interesting if you're into that.

@ioannakok
Copy link
Contributor Author

ioannakok commented Jul 6, 2022

@jamesgorrie This is great! Thank you!

@ioannakok ioannakok merged commit db16c96 into main Jul 6, 2022
@ioannakok ioannakok deleted the roberto-ioanna/scala-2.13-replace-deprecated-procedure-syntax branch July 6, 2022 08:46
@prout-bot
Copy link
Collaborator

Overdue on PROD (merged by @ioannakok 30 minutes and 7 seconds ago) What's gone wrong?

@prout-bot
Copy link
Collaborator

Seen on PROD (merged by @ioannakok 16 hours, 38 minutes and 54 seconds ago)

@rtyley rtyley mentioned this pull request Jul 27, 2022
2 tasks
@rtyley rtyley added the Scala 2.13 See https://github.com/guardian/maintaining-scala-projects/issues/2 label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scala 2.13 See https://github.com/guardian/maintaining-scala-projects/issues/2 Seen-on-PROD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants