Skip to content

Remove stray [DEBUG-TMPL] debug prints from ScalaTreeVisitor#7439

Merged
knutwannheden merged 1 commit intomainfrom
remove-debug-tmpl-prints-from-scalatreevisitor
Apr 21, 2026
Merged

Remove stray [DEBUG-TMPL] debug prints from ScalaTreeVisitor#7439
knutwannheden merged 1 commit intomainfrom
remove-debug-tmpl-prints-from-scalatreevisitor

Conversation

@knutwannheden
Copy link
Copy Markdown
Contributor

Motivation

Two System.err.println calls tagged [DEBUG-TMPL] were left behind in ScalaTreeVisitor as temporary instrumentation. They flood stderr whenever any Scala source is parsed (e.g. during mod build on a repo that is partially Scala, such as openrewrite/rewrite itself):

[DEBUG-TMPL] template.body has 6 entries
[DEBUG-TMPL] stat class=DefDef span=[1742..1746..5896] isSynthetic=false text=DefDef(convertToCompilationUnit,...)
...

Summary

  • Delete the two System.err.println("[DEBUG-TMPL] ...") calls in ScalaTreeVisitor.scala. The surrounding sortedBody / for (stat <- sortedBody) logic is unchanged — only the prints are removed.

Test plan

  • grep -r DEBUG-TMPL returns no matches anywhere in the repo
  • ./gradlew :rewrite-scala:compileScala succeeds

These `System.err.println` calls were left behind as instrumentation and
flood stderr during `mod build` on any Scala sources.
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Apr 21, 2026
@knutwannheden knutwannheden merged commit 59c39db into main Apr 21, 2026
1 check passed
@knutwannheden knutwannheden deleted the remove-debug-tmpl-prints-from-scalatreevisitor branch April 21, 2026 07:09
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant