Skip to content

Commit dfc9085

Browse files
committed
Add note about getCurrentBuildFileVersion
1 parent c30fd80 commit dfc9085

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

shared/src/main/kotlin/org/javacs/kt/classpath/ClassPathResolver.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ interface ClassPathResolver {
2929

3030
val classpathWithSources: Set<ClassPathEntry> get() = classpath
3131

32+
/**
33+
* This should return the current build file version.
34+
* It usually translates to the file's lastModified time.
35+
* Resolvers that don't have a build file use the default (i.e., 1).
36+
* We use 1, because this will prevent any attempt to cache non cacheable resolvers
37+
* (see [CachedClassPathResolver.dependenciesChanged]).
38+
*/
3239
fun getCurrentBuildFileVersion(): Long = 1L
3340

3441
companion object {

0 commit comments

Comments
 (0)