Skip to content

Commit

Permalink
Merge pull request #1382 from adpi2/fix-library-changed
Browse files Browse the repository at this point in the history
Fix #1140: overcompilation when using a class directory as a library
  • Loading branch information
eed3si9n authored Aug 7, 2024
2 parents 41aeab1 + 3962050 commit 9ea1a49
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -786,12 +786,11 @@ object IncrementalCommon {

def isLibraryChanged(file: VirtualFileRef): Boolean = {
def compareOriginClassFile(className: String, classpathEntry: VirtualFileRef): Boolean = {
if (
classpathEntry.id.endsWith(".jar") &&
(converter.toPath(classpathEntry).toString != converter.toPath(file).toString)
)
invalidateBinary(s"${className} is now provided by ${classpathEntry}")
else compareStamps(file, classpathEntry)
if (classpathEntry.id.endsWith(".jar")) compareStamps(file, classpathEntry)
else {
val resolved = Locate.classFile(converter.toPath(classpathEntry), className)
compareStamps(file, converter.toVirtualFile(resolved))
}
}

val classNames = previousRelations.libraryClassNames(file)
Expand Down

0 comments on commit 9ea1a49

Please sign in to comment.