spotless icon indicating copy to clipboard operation
spotless copied to clipboard

UP-TO-DATE checking for npm based step config

Open simschla opened this issue 1 year ago • 3 comments

[DRAFT!] This PR introduces correct UP-TO-DATE checking for the npm based steps.

As discussed in #2140 I've tried both ways: Using (1) the current "serialization-as-equality-hack" or (2) implementing FormatterStep directly. After playing around, I think approach (2) leads to a simpler and clearer implementation.

So in this PR, I'd like to discuss this second approach based on the changed implementation of the EslintFormatterStep before I go all the way and change also TsFmt and Prettier.

simschla avatar Jul 03 '24 05:07 simschla

(1) the current "serialization-as-equality-hack" or (2) implementing FormatterStep directly.

Hi @simschla, unfortunately I've just learned that maybe (1) isn't going to work with build-cache. Details at

  • https://github.com/gradle/gradle/issues/29816

nedtwigg avatar Jul 03 '24 20:07 nedtwigg

(1) the current "serialization-as-equality-hack" or (2) implementing FormatterStep directly.

Hi @simschla, unfortunately I've just learned that maybe (1) isn't going to work with build-cache. Details at

So it is a good thing I went with (2) 👍

Do you see any issues with the general concept or should I go ahead and transform the other two steps also?

simschla avatar Jul 10 '24 05:07 simschla

Sorry, a better description of the problem:

  • implementing FormatterStep directly -> definitely can't work with shared build cache and configuration cache at the same time (without a change in Gradle)
  • serialization-as-equality-hack -> possible to work with shared build cache and configuration cache at the same time using a hack, but the whole point of this whole mess was to get rid of hacks

For now I think best to wait and see if Gradle has any thoughts on the core problem.

nedtwigg avatar Jul 10 '24 05:07 nedtwigg

Closing this until we know if and how we need to take action.

simschla avatar May 09 '25 18:05 simschla