-
-
Notifications
You must be signed in to change notification settings - Fork 303
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
[resolve] Add cache mode #5304
[resolve] Add cache mode #5304
Conversation
cache – Will use a cache file in the workspace cache. If that file is stale relative to the workspace or project or it does not exist, then the bnd(run) file will be resolved and the result is stored in the cache file. Signed-off-by: Peter Kriens <Peter.Kriens@aqute.biz>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments/questions.
@@ -185,4 +194,100 @@ public Collection<Container> getRunbundles() throws Exception { | |||
return super.getRunbundles(); | |||
} | |||
|
|||
private Collection<Container> cache() throws Exception { | |||
File ours = getPropertiesFile(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about included files in the bndrun file and in the workspace?
In the gradle plugin all of the files factor in to out-of-date checks:
bnd/gradle-plugins/biz.aQute.bnd.gradle/src/main/java/aQute/bnd/gradle/BndPlugin.java
Lines 981 to 986 in 16607b1
private ConfigurableFileCollection bndConfiguration() { | |
Workspace bndWorkspace = bndProject.getWorkspace(); | |
return objects.fileCollection() | |
.from(bndWorkspace.getPropertiesFile(), bndWorkspace.getIncluded(), bndProject.getPropertiesFile(), | |
bndProject.getIncluded()); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense
- Uses the project/workspace lastmodifiedtime, which includes include files - Removed removal of container errors in test, uses a resolve file that has proper dependencies - Added a testReason so the caching choice could be tested from outside - Increased test coverage Signed-off-by: Peter Kriens <Peter.Kriens@aqute.biz>
I guess we can close this PR since you merged #5305. |
cache – Will use a cache file in the workspace cache. If that file is stale relative to the workspace or project or it does not exist, then the bnd(run) file will be resolved and the result is stored in the cache file.
Signed-off-by: Peter Kriens Peter.Kriens@aqute.biz