GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — scalafmt: version from the config file is not dynamically used · Issue #2460 · diffplug/spotless Closed Labels DescriptionScalafmt binaries (JARs) are supposed to parse the version declared in the config file and use this version to dynamically download the appropriate scalafmt release to then run. This behaviour works fine in with sbt or IDEs but it doesn't seem to work with Spotless: the version declared in the config file ( Reproduction caseHave the following And in the <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> <version>2.44.3</version> <configuration> <scala> <scalafmt> <version>3.2.0</version> <file>${project.basedir}/.scalafmt.conf</file> <scalaMajorVersion>2.13</scalaMajorVersion> </scalafmt> </scala> </configuration> </plugin> Then, running Now, change the version in the POM to Whereas it should have run in "3.2.0 mode" because it's the version specified in the config file. Referenceshttps://scalameta.org/scalafmt/docs/configuration.html#version
Possible fixesScalafmt uses a "scalafmt-dynamic" JAR to do this. My guess is that Spotless doesn't use it. They document how to use it from Java: https://scalameta.org/scalafmt/docs/installation.html#calling-from-java Additional infoI guess the other way around may also happen: in the config file has a newer version than the one declared in the POM. IMHO, in medium term, the POM version should be removed (it's already optional) and it should aways use the default version hardcoded in Spotless to then dynamically download the version mentioned in the config file. Activity
MetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| 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. |