Skip to content

Fix Config Cache External Process Issue - #1777

Merged
nedtwigg merged 3 commits into
diffplug:mainfrom
tylerbertrand:tylerbertrand/config-cache-exernal-process-issue
Aug 7, 2023
Merged

nedtwigg merged 3 commits into
diffplug:mainfrom
tylerbertrand:tylerbertrand/config-cache-exernal-process-issue

Conversation

@tylerbertrand

Copy link
Copy Markdown
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

nedtwigg commented Aug 3, 2023

Copy link
Copy Markdown
Member

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

@nedtwigg

nedtwigg commented Aug 3, 2023

Copy link
Copy Markdown
Member

Needs a spotlessApply.

@tylerbertrand

tylerbertrand commented Aug 4, 2023 •

Copy link
Copy Markdown
Contributor Author

#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