Scala language support#5869
Merged
jkschneider merged 1 commit intomainfrom Mar 28, 2026
Merged
Conversation
Contributor
|
This PR is stale because it has been open for 90 days with no activity. Remove |
169c786 to
aee6375
Compare
aee6375 to
b4caec2
Compare
b4caec2 to
6b0a44f
Compare
jkschneider
added a commit
that referenced
this pull request
Mar 28, 2026
Jenson3210
added a commit
that referenced
this pull request
Apr 17, 2026
jkschneider
pushed a commit
that referenced
this pull request
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Scala 3 language support for OpenRewrite, enabling automated refactoring of Scala source code using the existing Java recipe ecosystem.
Parser
J(Java) LST types wherever possible, with Scala-specificStypes only where Java has no equivalent (S.CompilationUnit,S.TuplePattern,S.Wildcard,S.BlockExpression)SObject,InfixNotation,FunctionApplication,ScalaForLoop, etc.)ScalaPrinter) that round-trips Scala syntax faithfully (square bracket type params,val/var,trait,=>lambdas, etc.)Type Attribution
ScalaTypeMappingmaps Dotty types/symbols to OpenRewrite'sJavaTypemodelTreeTraverserShallowClassfor library types to avoid deep recursive type hierarchies$suffix stripping for Java recipe compatibilityRecipe Compatibility
Proven working with standard Java recipes on Scala code:
Collections.emptyList())java.langtypes)Test Coverage
Test plan
./gradlew :rewrite-scala:test— all 329 tests pass