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

Fix spotless being slow #8395

Merged
merged 2 commits into from
Oct 23, 2024
Merged

Conversation

wmontwe
Copy link
Member

@wmontwe wmontwe commented Oct 23, 2024

This limits the scope of Spotless to the module it is applied to. This greatly improves the check and formatting speed. With version 7.0.0 of Spotless the configuration cache is better supported providing an additional boost. But that is currently in beta and not included yet in this changes.

Resolves #8362

@wmontwe wmontwe requested a review from cketti as a code owner October 23, 2024 14:26
@wmontwe wmontwe force-pushed the fix-spotless-being-slow branch from 0c73857 to 039a925 Compare October 23, 2024 14:34
Copy link
Member

@cketti cketti left a comment

Choose a reason for hiding this comment

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

LGTM

@wmontwe wmontwe merged commit fe5a07e into thunderbird:main Oct 23, 2024
3 checks passed
@wmontwe wmontwe deleted the fix-spotless-being-slow branch October 23, 2024 15:31
@cketti
Copy link
Member

cketti commented Oct 24, 2024

It looks like this introduced a problem. I now often have full builds (gradlew build) fail with an error similar to this:

Execution failed for task ':spotlessKotlinGradle'.
> Could not read path '…/app-thunderbird/build/intermediates/merged-not-compiled-resources/full/beta/values-lu/values-lu.xml'

I'm guessing this is because spotless gets the file listing of a directory first, then when it gets around to opening the files on that list some of them may have been deleted by another task already. Hopefully this is an easy fix because we don't want spotless to look at the build/ directories anyway.

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.

Spotless is very slow
2 participants