question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Run task without cache vs cleaning

See original GitHub issue

We want to support a way for clients to run tasks, especially compiles, without cache, i.e. a non-incremental build.

One way to do this is to support a clean request that asks to remove any products of a build target.

Another way would be to add a flag to the compile request, and potentially other tasks, that requests a full rebuild.

What considerations affect the choice of these options, and are there other options?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
olafurpgcommented, Oct 17, 2018

When I think of it more I agree that adding a clean request makes sense. A lot of build tools do support clean and I see value in having a tool-agnostic endpoint for this functionality. The build tool can declare that it doesn’t support clean during the initialize handshake.

0reactions
olafurpgcommented, Oct 25, 2018

To fix this ticket I propose to add a new request endpoint buildTarget/clean

// buildTarget/clean: request from client to server
trait CleanParams {
  def targets: List[BuildTargetIdentifier]
}
trait CleanResult {
  
}

Any suggestion what to put in CleanResult? We could add def cleaned: Boolean, where cleaned=true means the clean succeeded and cleaned=false means nothing was cleaned. This would be consistent with LSP workspace/applyEdit https://microsoft.github.io/language-server-protocol/specification#workspace_applyEdit

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to clear build cache for a specific task? - Help/Discuss
What I want to know is if a task says FROM-CACHE , how do I make it forcefully rebuild and run the actual...
Read more >
android - How to clear gradle cache? - Stack Overflow
caching of all normal Android builder tasks is handled by Gradle. executing cleanBuildCache does not clear or affect the build cache in any...
Read more >
Gradle Build Cache Basics - Baeldung
The Gradle build cache is semi-permanent storage that saves the build tasks' outputs. It enables the reuse of already generated artifacts ...
Read more >
Understanding Different Gradle Caches for ... - Jason Atwood
There are several ways Gradle stores information between builds to drastically reduce subsequent build times. You may be familiar with some ...
Read more >
Caching for faster builds | Gradle Enterprise Docs
Oftentimes, CI nodes and developers run the same tasks with the same set of changes. ... Clean build with outputs taken from the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found