-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Incremental API and disk format for task caching (#210)
The Task.execute() call now can examine old results and changes to inputs to make decisions about incrementally building new outputs more efficiently. Fixes #176
- Loading branch information
Showing
23 changed files
with
886 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
build-caching/src/main/java/com/vertispan/j2cl/build/BuildService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
build-caching/src/main/java/com/vertispan/j2cl/build/ChangedCachedPath.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.vertispan.j2cl.build; | ||
|
||
import com.vertispan.j2cl.build.task.CachedPath; | ||
|
||
import java.nio.file.Path; | ||
import java.util.Optional; | ||
|
||
/** | ||
* Implementation of the ChangedCachedPath interface. | ||
*/ | ||
public class ChangedCachedPath implements com.vertispan.j2cl.build.task.ChangedCachedPath { | ||
private final ChangeType type; | ||
private final Path sourcePath; | ||
private final CachedPath newIfAny; | ||
|
||
public ChangedCachedPath(ChangeType type, Path sourcePath, CachedPath newPath) { | ||
this.type = type; | ||
this.sourcePath = sourcePath; | ||
this.newIfAny = newPath; | ||
} | ||
|
||
@Override | ||
public ChangeType changeType() { | ||
return type; | ||
} | ||
|
||
@Override | ||
public Path getSourcePath() { | ||
return sourcePath; | ||
} | ||
|
||
@Override | ||
public Optional<Path> getNewAbsolutePath() { | ||
return Optional.ofNullable(newIfAny).map(CachedPath::getAbsolutePath); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.