Skip to content

Bump Scalafmt from 3.8.6 to 3.9.1 #1708

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

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

mbland
Copy link
Contributor

@mbland mbland commented Feb 27, 2025

Description

Also updates scripts/create_repository.py to prevent scala-collection-compat versions from flipping on subsequent runs by no longer comparing Scala versions. Part of #1482.

Both Scalafmt and ScalaPB depend on
org_scala_lang_modules_scala_collection_compat. Before removing the Scala version comparison, subsequent create_repository.py runs would flip between these two artifacts for Scala 3.3 through 3.6:

  • org.scala-lang.modules:scala-collection-compat_2.13:2.13.0
  • org.scala-lang.modules:scala-collection-compat_3:2.12.0

The artifact with the higher release version number is preferable to the artifact with the higher Scala version.

The change from FileOps to PlatformFileOps in ScalafmtAdapter is a consequence of an update first included in Scalafmt 3.9.0:

Motivation

As with #1692, this is to ensure Scalafmt is as current as can be before landing Bzlmod and Bazel 8 compatibility changes.

Also updates `scripts/create_repository.py` to prevent
`scala-collection-compat` versions from flipping on subsequent runs by
no longer comparing Scala versions. Part of bazel-contrib#1482.

Both Scalafmt and ScalaPB depend on
`org_scala_lang_modules_scala_collection_compat`. Before removing the
Scala version comparison, subsequent `create_repository.py` runs would
flip between these two artifacts for Scala 3.3 through 3.6:

- `org.scala-lang.modules:scala-collection-compat_2.13:2.13.0`
- `org.scala-lang.modules:scala-collection-compat_3:2.12.0`

The artifact with the higher release version number is preferable to the
artifact with the higher Scala version.

The change from `FileOps` to `PlatformFileOps` in `ScalafmtAdapter` is a
consequence of an update first included in Scalafmt 3.9.0:

- scalameta/scalafmt#4800
- scalameta/scalafmt@0bdbf03
Copy link
Collaborator

@simuons simuons left a comment

Choose a reason for hiding this comment

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

Thanks

@simuons simuons merged commit 78e860f into bazel-contrib:master Feb 28, 2025
2 checks passed
@mbland mbland deleted the scalafmt-3.9.1 branch February 28, 2025 14:15
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.

2 participants