Skip to content
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

ktfmt version 0.47 incompatible with spotless #439

Closed
hviranicitco opened this issue Jan 30, 2024 · 2 comments
Closed

ktfmt version 0.47 incompatible with spotless #439

hviranicitco opened this issue Jan 30, 2024 · 2 comments

Comments

@hviranicitco
Copy link

Running mvn:spotless apply gives below error

java.lang.NoSuchMethodError: 'com.facebook.ktfmt.format.FormattingOptions com.facebook.ktfmt.format.FormattingOptions.copy(com.facebook.ktfmt.format.FormattingOptions$Style, int, int, int, boolean, boolean)'
    at com.diffplug.spotless.glue.ktfmt.KtfmtFormatterFunc.createFormattingOptions (KtfmtFormatterFunc.java:77)
    at com.diffplug.spotless.glue.ktfmt.KtfmtFormatterFunc.apply (KtfmtFormatterFunc.java:54)
    at com.diffplug.spotless.FormatterFunc.apply (FormatterFunc.java:32)
    at com.diffplug.spotless.FormatterStepImpl$Standard.format (FormatterStepImpl.java:82)
    at com.diffplug.spotless.FormatterStep$Strict.format (FormatterStep.java:103)
    at com.diffplug.spotless.Formatter.compute (Formatter.java:246)
    at com.diffplug.spotless.PaddedCell.calculateDirtyState (PaddedCell.java:203)
    at com.diffplug.spotless.PaddedCell.calculateDirtyState (PaddedCell.java:190)
    at com.diffplug.spotless.maven.SpotlessApplyMojo.process (SpotlessApplyMojo.java:63)
    at com.diffplug.spotless.maven.AbstractSpotlessMojo.execute (AbstractSpotlessMojo.java:229)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)

Tried this with latest spotless plugin version:

<dependency>
    <groupId>com.diffplug.spotless</groupId>
    <artifactId>spotless-maven-plugin</artifactId>
    <version>2.43.0</version>
</dependency>
@Goooler
Copy link
Contributor

Goooler commented Feb 16, 2024

This has been tracked by diffplug/spotless#2043.

@hick209
Copy link
Contributor

hick209 commented Mar 25, 2024

Fixed with diffplug/spotless#2045

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

No branches or pull requests

3 participants