GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ✨ feat(scalafmt): enforce version consistency between library and config file by gaeljw · Pull Request #2499 · diffplug/spotless

Conversation

@gaeljw

@gaeljw gaeljw commented May 29, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Closes #2460

As suggested in #2460 (comment), this is a first step to raise awareness to users that the version declared in the config file is not used.

We might work on dynamically loading the right Scalafmt JAR in another PR.

I've tested this locally on a project of mine and this works, when versions are not aligned I got the following error:

[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.44.5-SNAPSHOT:check (default-cli) on project xxx: Unable to check file /home/xxx/src/test/scala/bdd/utils/DataTableTypeMappings.scala: java.lang.reflect.InvocationTargetException: Spotless is using 2.7.5 but the config file declares 3.9.6. Both must match. Update the version declared in the plugin's settings and/or the config file. 

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gaeljw added 2 commits May 29, 2025 16:30
@gaeljw
✨ feat(scalafmt): enforce version consistency in library and config f…
1313c4d
…ile (fix diffplug#2460)

fix diffplug#2460
@gaeljw
📝 docs: add CHANGELOG
cf225e4
@gaeljw
gaeljw marked this pull request as draft May 29, 2025 15:16
gaeljw added 2 commits May 29, 2025 17:20
@gaeljw
style: fix formatting
5508a34
@gaeljw
test: update tests
05fe1fe
@gaeljw
gaeljw marked this pull request as ready for review May 29, 2025 15:33
@gaeljw

gaeljw commented Jun 11, 2025

Copy link
Copy Markdown
Contributor Author

@nedtwigg no rush but any chance you could have a look at this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nedtwigg
nedtwigg merged commit 03e89b8 into diffplug:main Jul 7, 2025
@nedtwigg

nedtwigg commented Jul 7, 2025

Copy link
Copy Markdown
Member

Released in plugin-gradle 7.1.0 and plugin-maven 2.45.0.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

scalafmt: version from the config file is not dynamically used

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@gaeljw @nedtwigg
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.