Skip to content

Non reproducible index serialization #1642

@gnodet

Description

@gnodet

I was experimenting with switching Apache Camel to use spotless instead of impsort/formatter plugins.
While doing so, and experimenting with the performance cost of running the spotless plugin, I realised the plugin was running again on subsequent builds.
Here's the maven output I end up with in roughly 20 out of 500 modules:

[INFO] --- spotless:2.35.0:apply (default) @ camel-seda ---
[INFO] Index file corresponds to a different configuration of the plugin. Either the plugin version or its configuration has changed. Fallback to an empty index
[INFO] Sorting file /var/folders/27/cvb78knj3xbdvty_5406llg40000gn/T/pom4948897720195268327.xml
[INFO] Pom file is already sorted, exiting
[INFO] Spotless.Pom is keeping 1 files clean - 0 were changed to be clean, 1 were already clean, 0 were skipped because caching determined they were already clean
[INFO] Spotless.Java is keeping 12 files clean - 0 were changed to be clean, 12 were already clean, 0 were skipped because caching determined they were already clean

The configuration obviously does not change, as I run the same maven command multiple times in a raw.

I thus suspect a non-reproductible serialisation issue in the Formatter.

Environment:

Apache Maven 3.9.0 (9b58d2bad23a66be161c4664ef21ce219c2c8584)
Maven home: /Users/gnodet/.sdkman/candidates/maven/3.9.0
Java version: 17.0.6, vendor: GraalVM Community, runtime: /Users/gnodet/.sdkman/candidates/java/22.3.1.r17-grl
Default locale: en_FR, platform encoding: UTF-8
OS name: "mac os x", version: "13.2.1", arch: "aarch64", family: "mac"

Not sure why, but the problem is much more easily reproducible using maven daemon, but it also happens with stock maven 3.9.0 as seen above.

Steps to reproduce:

git clone https://github.com/gnodet/camel.git
cd camel
git checkout build-improvements
mvn install -DskipTests
cd components/camel-seda
for i in $(seq 1 100)
do
    echo -n .
    mvn install -DskipTests | grep "Index file corresponds to a different configuration of the plugin"
done

the last command must be run continuously until the line Index file corresponds to a different configuration of the plugin appears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions