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

Rethink format task approach #306

Closed
Tapchicoma opened this issue Nov 17, 2019 · 4 comments · Fixed by #520
Closed

Rethink format task approach #306

Tapchicoma opened this issue Nov 17, 2019 · 4 comments · Fixed by #520

Comments

@Tapchicoma
Copy link
Collaborator

Currently format tasks works the same as common lint tasks, except that they may modify inputs. This leads to the several problems with this tasks caching: #302 or #194

Possible solutions to this problem:

  • actually run lint tasks first, don't fail the tasks, then run format only on files with files violations. Format task is never cacheable, but uses lint tasks reports as input.
  • something else?

@JLLeitschuh maybe something else comes to your mind how to solve it as well?

@Tapchicoma Tapchicoma changed the title Rething format task approach Rethink format task approach Nov 17, 2019
@JLLeitschuh
Copy link
Owner

Diffplug spotless solved this, somehow. @nedtwigg do you have any insights here?

@nedtwigg
Copy link

You can make the format task incremental / up-to-date-able, but there are a few tricky corner cases. The high level is here, the actual implementation is everything that touches this little class.

@vlsi
Copy link

vlsi commented Dec 28, 2019

@JLLeitschuh
Copy link
Owner

@Tapchicoma what are your thoughts on @vlsi's suggestion here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants