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 Config Cache External Process Issue #1777

Conversation

tylerbertrand
Copy link
Contributor

Fixes a configuration cache failure when applying Spotless Gradle Plugin.

The failure is caused by executing external processes during configuration time, which the configuration cache does not support. Specifically, the external processes are launched to determine the line ending policy when LineEnding.GIT_ATTRIBUTES is used.

This PR uses Providers to supply the line ending policy, which because they are lazily evaluated, move the external processes involved in creating the line ending policy from configuration to execution time.

Using spotless-plugin-gradle:6.21.0-SNAPSHOT published to mavenLocal containing these changes results in a successful configuration cache write.

This way the external git processes are launched at execution time and not during configuration
@nedtwigg
Copy link
Member

nedtwigg commented Aug 3, 2023

Amazing, thanks! This is a fix for #1764, correct?

@nedtwigg
Copy link
Member

nedtwigg commented Aug 3, 2023

Needs a spotlessApply.

@tylerbertrand
Copy link
Contributor Author

tylerbertrand commented Aug 4, 2023

#1644 is the specific issue I was looking to resolve. #1764 seems slightly different in that it executed 2 less external processes, but it looks like this fix should resolve that issue as well.

Needs a spotlessApply.

Done 🙂

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.

3 participants