-
Notifications
You must be signed in to change notification settings - Fork 24
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
confusion around necessity of adding explicit result types and implicits #334
Comments
You're right. It's not mentioned there. The readme is a outdated a little, the most recent documentation is here https://docs.scala-lang.org/scala3/guides/migration/scala3-migrate.html (which doesn't mention the explicitResultType rule neither)
this step is done in the |
@mlachkar i realize having explicit return types is a good practice, but it is not related to migration and actually hinders it |
@OlegYch Having explicit return types is a necessary prerequisite of the |
@adpi2 hm, can adding explicit result types be moved to |
Yes, maybe we could try to move the adding result types into the Or, as an alternative, you can add the sbt-scalafix plugin in your project and execute the rules used by |
@adpi2 i'm not sure if there is a separate rule for adding result types just to implicit definitions, can you perhaps give a hint? |
I don't think there is unfortunately. An "implicit only" configuration would be a good feature to add to the |
https://github.com/scalacenter/scala3-migrate#fix-syntax-incompatibilities does not mention adding result types to anything, but it currently does via
ExplicitResultTypes
ruleit looks like it should not because adding result types is not necessary to fix syntax
moreover afaik it is only necessary to add result types to implicits to compile with scala3, adding them everywhere is noisy
i guess it would be enough to just remove
ExplicitResultTypes
usage, sincemigrate
would later invokeInferTypes
anywayand is
ExplicitImplicitsRule
really necessary?The text was updated successfully, but these errors were encountered: