Skip to content

Commit

Permalink
Remove all references to unsupported rewrite rules (#2929)
Browse files Browse the repository at this point in the history
* Remove all references to unsupported rewrite rules

* fix up formatting issues
  • Loading branch information
johnduffell authored Dec 14, 2023
1 parent ce4b78d commit 02acc36
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The redesign of [contextual abstractions]({{ site.scala3ref }}/contextual) bring

|Incompatibility|Scala 2.13|Scala 3 Migration Rewrite|Scalafix Rule|Runtime Incompatibiltiy|
|--- |--- |--- |--- |--- |
|[Type of implicit def](#type-of-implicit-definition)|||[](https://github.com/ohze/scala-rewrites#fixexplicittypesexplicitimplicittypes)||
|[Type of implicit def](#type-of-implicit-definition)|||[](https://scalacenter.github.io/scalafix/docs/rules/ExplicitResultTypes.html)||
|[Implicit views](#implicit-views)||||**Possible**|
|[View bounds](#view-bounds)|Deprecation||||
|[Ambiguous conversion on `A` and `=> A`](#ambiguous-conversion-on-a-and--a)|||||
Expand All @@ -21,7 +21,7 @@ The redesign of [contextual abstractions]({{ site.scala3ref }}/contextual) bring
The type of implicit definitions (`val` or `def`) needs to be given explicitly in Scala 3.
They cannot be inferred anymore.

The Scalafix rule named `ExplicitImplicitTypes` in [ohze/scala-rewrites](https://github.com/ohze/scala-rewrites#fixexplicittypesexplicitimplicittypes) repository can write the missing type annotations automatically.
The Scalafix rule named [ExplicitResultTypes](https://scalacenter.github.io/scalafix/docs/rules/ExplicitResultTypes.html) can write the missing type annotations automatically.

## Implicit Views

Expand Down Expand Up @@ -147,4 +147,4 @@ implicit def lazyBoolFoo(lazyBool: => Boolean): Foo = ???

-true.foo()
+boolFoo(true).foo()
{% endhighlight %}
{% endhighlight %}
2 changes: 1 addition & 1 deletion _overviews/scala3-migration/incompat-syntactic.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It is worth noting that most of the changes can be automatically handled during
|--- |--- |--- |--- |
|[Restricted keywords](#restricted-keywords)||||
|[Procedure syntax](#procedure-syntax)|Deprecation||[](https://scalacenter.github.io/scalafix/docs/rules/ProcedureSyntax.html)|
|[Parentheses around lambda parameter](#parentheses-around-lambda-parameter)|||[](https://github.com/ohze/scala-rewrites/tree/dotty/#fixscala213parensaroundlambda)|
|[Parentheses around lambda parameter](#parentheses-around-lambda-parameter)||||
|[Open brace indentation for passing an argument](#open-brace-indentation-for-passing-an-argument)||||
|[Wrong indentation](#wrong-indentation)||||
|[`_` as a type parameter](#_-as-a-type-parameter)||||
Expand Down
4 changes: 2 additions & 2 deletions _overviews/scala3-migration/incompatibility-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Some of the old syntax is not supported anymore.
|--- |--- |--- |--- |
|[Restricted keywords](incompat-syntactic.html#restricted-keywords)||||
|[Procedure syntax](incompat-syntactic.html#procedure-syntax)|Deprecation||[](https://scalacenter.github.io/scalafix/docs/rules/ProcedureSyntax.html)|
|[Parentheses around lambda parameter](incompat-syntactic.html#parentheses-around-lambda-parameter)|||[](https://github.com/ohze/scala-rewrites/tree/dotty/#fixscala213parensaroundlambda)|
|[Parentheses around lambda parameter](incompat-syntactic.html#parentheses-around-lambda-parameter)||||
|[Open brace indentation for passing an argument](incompat-syntactic.html#open-brace-indentation-for-passing-an-argument)||||
|[Wrong indentation](incompat-syntactic.html#wrong-indentation)||||
|[`_` as a type parameter](incompat-syntactic.html#_-as-a-type-parameter)||||
Expand All @@ -63,7 +63,7 @@ The redesign of [contextual abstractions]({{ site.scala3ref }}/contextual) bring

|Incompatibility|Scala 2.13|Scala 3 Migration Rewrite|Scalafix Rule|Runtime Incompatibility|
|--- |--- |--- |--- |--- |
|[Type of implicit def](incompat-contextual-abstractions.html#type-of-implicit-definition)|||[](https://github.com/ohze/scala-rewrites#fixexplicittypesexplicitimplicittypes)||
|[Type of implicit def](incompat-contextual-abstractions.html#type-of-implicit-definition)|||[](https://scalacenter.github.io/scalafix/docs/rules/ExplicitResultTypes.html)||
|[Implicit views](incompat-contextual-abstractions.html#implicit-views)||||**Possible**|
|[View bounds](incompat-contextual-abstractions.html#view-bounds)|Deprecation||||
|[Ambiguous conversion on `A` and `=> A`](incompat-contextual-abstractions.html#ambiguous-conversion-on-a-and--a)|||||
Expand Down
4 changes: 2 additions & 2 deletions _overviews/scala3-migration/scala3-migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,11 @@ This command runs a number of Scalafix rules to patch some discarded syntax.

The list of applied Scalafix rules are:
- [ProcedureSyntax](https://scalacenter.github.io/scalafix/docs/rules/ProcedureSyntax.html)
- [fix.scala213.ConstructorProcedureSyntax](https://github.com/ohze/scala-rewrites/tree/dotty/#fixscala213constructorproceduresyntax)
- [fix.scala213.ExplicitNullaryEtaExpansion](https://github.com/lightbend-labs/scala-rewrites/blob/main/rewrites/src/main/scala/fix/scala213/ExplicitNullaryEtaExpansion.scala)
- [fix.scala213.ParensAroundLambda](https://github.com/ohze/scala-rewrites/tree/dotty/#fixscala213parensaroundlambda)
- [migrate.ParensAroundLambda](https://github.com/scalacenter/scala3-migrate/blob/ebb4a4087ed11899b9010f4c75eb365532694c0a/scalafix/rules/src/main/scala/migrate/ParensAroundParam.scala#L9)
- [fix.scala213.ExplicitNonNullaryApply](https://github.com/lightbend-labs/scala-rewrites/blob/main/rewrites/src/main/scala/fix/scala213/ExplicitNullaryEtaExpansion.scala)
- [fix.scala213.Any2StringAdd](https://github.com/lightbend-labs/scala-rewrites/blob/main/rewrites/src/main/scala/fix/scala213/Any2StringAdd.scala)
- [ExplicitResultTypes](https://scalacenter.github.io/scalafix/docs/rules/ExplicitResultTypes.html)

For more information about the syntax changes between Scala 2.13 and Scala 3, you can refer to [the Incompatibility Table](incompatibility-table.html).

Expand Down
1 change: 0 additions & 1 deletion _overviews/scala3-migration/tooling-tour.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ So far the relevant rules are:
- [Procedure Syntax](https://scalacenter.github.io/scalafix/docs/rules/ProcedureSyntax.html)
- [Explicit Result Types](https://scalacenter.github.io/scalafix/docs/rules/ExplicitResultTypes.html)
- Value Eta-Expansion: `fix.scala213.ExplicitNullaryEtaExpansion` in [scala/scala-rewrites](https://github.com/scala/scala-rewrites/blob/main/rewrites/src/main/scala/fix/scala213/ExplicitNullaryEtaExpansion.scala)
- Parentheses Around Lambda Parameter: `fix.scala213.ParensAroundLambda` in [ohze/scala-rewrites](https://github.com/ohze/scala-rewrites/blob/dotty/rewrites/src/main/scala/fix/scala213/ParensAroundLambda.scala)
- Auto Application: `fix.scala213.ExplicitNonNullaryApply` in [scala/scala-rewrites](https://github.com/scala/scala-rewrites/blob/main/rewrites/src/main/scala/fix/scala213/ExplicitNonNullaryApply.scala)
- `any2stringadd` Conversion: `fix.scala213.Any2StringAdd` in [scala/scala-rewrites](https://github.com/scala/scala-rewrites/blob/main/rewrites/src/main/scala/fix/scala213/Any2StringAdd.scala)

Expand Down

0 comments on commit 02acc36

Please sign in to comment.