Skip to content

Update scalafmt-core to 3.11.0#2329

Closed
scala-steward wants to merge 3 commits into
johnynek:mainfrom
scala-steward:update/scalafmt-core-3.11.0
Closed

Update scalafmt-core to 3.11.0#2329
scala-steward wants to merge 3 commits into
johnynek:mainfrom
scala-steward:update/scalafmt-core-3.11.0

Conversation

@scala-steward

@scala-steward scala-steward commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

About this PR

📦 Updates org.scalameta:scalafmt-core from 3.10.7 to 3.11.0

📜 GitHub Release Notes - Version Diff

Usage

Please merge!

I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.

If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.

Configure Scala Steward for your repository with a .scala-steward.conf file.

Have a fantastic day writing Scala!

🔍 Files still referring to the old version number

The following files still refer to the old version number (3.10.7).
You might want to review and update them manually.

.git-blame-ignore-revs
⚙ Adjust future updates

Add this to your .scala-steward.conf file to ignore future updates of this dependency:

updates.ignore = [ { groupId = "org.scalameta", artifactId = "scalafmt-core" } ]

Or, add this to slow down future updates of this dependency:

dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.scalameta", artifactId = "scalafmt-core" }
}]
labels: library-update, early-semver-minor, semver-spec-minor, old-version-remains, commit-count:n:3

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request primarily focuses on reformatting the codebase using scalafmt 3.11.0 and applying various code style improvements, such as better line breaking and formatting of complex expressions. The review comments provided highlight opportunities to improve the construction of Doc objects by using combinators instead of string interpolation, which is a good practice for performance and formatting consistency.

Comment on lines +1009 to +1011
s"type mismatch in call to $fnLabel, argument ${appSite.argIndex + 1} of ${appSite.argCount}:"
) + Doc.hardLine +
Doc.text("expected: ") + tmap(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

When the final output is a Doc object, use Doc combinators directly for construction instead of intermediate string concatenation. This avoids unnecessary intermediate string allocations and leverages the library's ability to handle formatting more efficiently.

Suggested change
s"type mismatch in call to $fnLabel, argument ${appSite.argIndex + 1} of ${appSite.argCount}:"
) + Doc.hardLine +
Doc.text("expected: ") + tmap(
Doc.text("type mismatch in call to ") + Doc.text(fnLabel) + Doc.text(", argument ") + Doc.text((appSite.argIndex + 1).toString) + Doc.text(" of ") + Doc.text(appSite.argCount.toString) + Doc.text(":") + Doc.hardLine +
References
  1. When the final output is a Doc object, use Doc combinators directly for construction instead of intermediate string concatenation.

Comment on lines +1120 to +1122
Doc.text("pattern type mismatch:") + Doc.hardLine +
Doc.text("pattern: ") + Doc.text(
patternDoc

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

When the final output is a Doc object, use Doc combinators directly for construction instead of intermediate string concatenation. Here, patternDoc is a String that was likely constructed via render or similar; if possible, pass the underlying Doc or use combinators to build this section.

                    Doc.text("pattern type mismatch:") + Doc.hardLine +
                      Doc.text("pattern: ") + Doc.text(patternDoc) + Doc.hardLine +
References
  1. When the final output is a Doc object, use Doc combinators directly for construction instead of intermediate string concatenation.

Comment on lines +1447 to +1449
Doc.text("the type ") + tmap(tpe) + Doc.text(
" is not polymorphic enough"
) + Doc.hardLine + context

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

When the final output is a Doc object, use Doc combinators directly for construction instead of intermediate string concatenation.

                Doc.text("the type ") + tmap(tpe) + Doc.text(" is not polymorphic enough") + Doc.hardLine + context
References
  1. When the final output is a Doc object, use Doc combinators directly for construction instead of intermediate string concatenation.

@codecov

codecov Bot commented Apr 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.74311% with 424 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.20%. Comparing base (f8e187d) to head (14b1fbf).

Files with missing lines Patch % Lines
...in/scala/dev/bosatsu/TypedExprRecursionCheck.scala 86.68% 51 Missing ⚠️
...e/src/main/scala/dev/bosatsu/SourceConverter.scala 89.94% 38 Missing ⚠️
core/src/main/scala/dev/bosatsu/tool/ShowEdn.scala 81.73% 38 Missing ⚠️
...main/scala/dev/bosatsu/cruntime/VendoredDeps.scala 40.42% 28 Missing ⚠️
...src/main/scala/dev/bosatsu/EvalBenchmarkMain.scala 0.00% 27 Missing ⚠️
...e/src/main/scala/dev/bosatsu/library/Command.scala 87.74% 25 Missing ⚠️
...in/scala/dev/bosatsu/protobuf/ProtoToBosatsu.scala 86.95% 24 Missing ⚠️
core/src/main/scala/dev/bosatsu/ValueToJson.scala 67.64% 22 Missing ⚠️
...ain/scala/dev/bosatsu/protobuf/CodeGenerator.scala 50.00% 16 Missing ⚠️
...ore/src/main/scala/dev/bosatsu/TypeValidator.scala 81.92% 15 Missing ⚠️
... and 42 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2329      +/-   ##
==========================================
+ Coverage   85.14%   85.20%   +0.06%     
==========================================
  Files         196      196              
  Lines       49379    49916     +537     
  Branches    12196    12272      +76     
==========================================
+ Hits        42042    42531     +489     
- Misses       7337     7385      +48     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@scala-steward scala-steward force-pushed the update/scalafmt-core-3.11.0 branch 3 times, most recently from 4e23d0a to 6c346d8 Compare April 25, 2026 16:51
@scala-steward scala-steward force-pushed the update/scalafmt-core-3.11.0 branch from 6c346d8 to fea410d Compare May 1, 2026 17:23
@scala-steward scala-steward force-pushed the update/scalafmt-core-3.11.0 branch from fea410d to 14b1fbf Compare May 3, 2026 16:57
@scala-steward

Copy link
Copy Markdown
Contributor Author

Superseded by

@scala-steward scala-steward deleted the update/scalafmt-core-3.11.0 branch May 11, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant