Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
71beb41
Continue if `bloopGenerate` fails for a project
oyvindberg Jan 21, 2022
f88d64c
Delete old unused test resources
lolgab Jan 26, 2022
4cb0ba2
Fix mainClass for Scala Native 0.4.3+
lolgab Jan 26, 2022
2ad485d
Update test to use Scala Native 0.4.3
lolgab Jan 26, 2022
46c598d
Merge pull request #1663 from oyvindberg/on-error-resume-next
tgodzik Jan 26, 2022
2cef762
Merge pull request #1664 from lolgab/support-scala-native-0.4.3
tgodzik Jan 27, 2022
6ed532b
Force newest log4j version
tgodzik Jan 28, 2022
373bc94
Merge pull request #1667 from tgodzik/force-log4j
tgodzik Jan 28, 2022
16bc723
Update coursier-interface to 1.0.6
alexarchambault Feb 1, 2022
a8c876f
Merge pull request #1668 from scala-cli/coursier-interface-1.0.6
tgodzik Feb 2, 2022
8f8f223
chore: bump scala 2.12 and 2.13 minor versions
Feb 7, 2022
67f2b4c
chore: bump scalajs to minimal supported version
Feb 7, 2022
7ea68e4
scalajs
Feb 7, 2022
8554e0f
feat: implement more fine-grained debug request
Jan 20, 2022
a3ed9e2
refactor: change data model
Feb 8, 2022
f00b5f2
fix: scalafmt
Feb 8, 2022
3aa19c6
chore: add comments
Feb 8, 2022
0672eeb
refactor: remove unnecessary class
Feb 10, 2022
ac3f33f
Use JAVE_HOME for server
dos65 Feb 10, 2022
5ec2e87
feat: add duplicate project entries for scala 2.13
Feb 10, 2022
cdd593b
fix: bump semanticDB version
Feb 10, 2022
d37ef9d
fix: upload new semanticdb_scalac plugin for 2.12.15
Feb 10, 2022
919deec
scalafmt
Feb 10, 2022
f1fd388
fix: ConsoleSpec
Feb 10, 2022
5057503
fix: BuildLoaderSpec
Feb 10, 2022
3d783df
fix: BspMetalsClientSpec
Feb 10, 2022
13ccc22
fix: launcherTest module
Feb 10, 2022
4f11882
Bump debug adapter to 2.0.13
adpi2 Feb 11, 2022
e9d6e84
ci: bump graalVM version
Feb 11, 2022
2f6bd82
ci: run launcher test properly
Feb 11, 2022
cc0f72c
Merge pull request #1673 from adpi2/debug-adapter-2.0.13
tgodzik Feb 11, 2022
8e6243d
Merge pull request #1670 from kpodsiad/bump-scala
tgodzik Feb 11, 2022
5bfaa36
Bump ajv from 6.12.2 to 6.12.6 in /website
dependabot[bot] Feb 11, 2022
47861cb
Merge branch 'master' into publish-launcher
Feb 11, 2022
2c29123
Merge pull request #1674 from scalacenter/dependabot/npm_and_yarn/web…
tgodzik Feb 11, 2022
20ee9c3
Merge pull request #1672 from kpodsiad/publish-launcher
tgodzik Feb 11, 2022
6f1c90c
ci: fix hardcoded path to the native image
Feb 11, 2022
3940033
Merge pull request #1675 from kpodsiad/fix/native-image
tgodzik Feb 11, 2022
dffb94c
ci: windows native image
Feb 11, 2022
098ef18
Merge pull request #1676 from kpodsiad/fix/windows-native-image
tgodzik Feb 11, 2022
f6f7f2b
Merge pull request #1671 from dos65/use_java_home_for_server
tgodzik Feb 11, 2022
9acf8a7
ci, build: fix release command
Feb 11, 2022
0dc735a
Merge pull request #1677 from kpodsiad/fix/remove-undefined-command
tgodzik Feb 11, 2022
d77e21b
build, fix: bump mdoc plugin because of `java.lang.NoClassDefFoundErr…
Feb 11, 2022
81973d6
Merge pull request #1678 from kpodsiad/fix/bump-mdoc-plugin
tgodzik Feb 11, 2022
e13cd36
chore: bump sbt version
Feb 14, 2022
f7ac3c7
Merge branch 'master' into fine-grained-debug-request
Feb 14, 2022
f26c75e
chore: bump junit interface version
Feb 14, 2022
0bcecc2
test: add test for single test execution
Feb 14, 2022
82e2a27
fix: failing tests
Feb 14, 2022
8ea80fe
chore: bump graphviz version
Feb 15, 2022
2ff269b
chore: remove graphviz dependnecy
Feb 15, 2022
8160c94
feat: pass jvm options and env variables to the ForkMain for test req…
Feb 15, 2022
1102916
build: increase sbt max memory
Feb 15, 2022
ff0d8ba
misc: remove leftover debug
Feb 15, 2022
d04bf03
misc: remove unused munit entry in Dependencies.scala
Feb 16, 2022
da38aab
misc: do not alter sbtopts
Feb 16, 2022
858a594
Merge pull request #1661 from kpodsiad/fine-grained-debug-request
tgodzik Feb 16, 2022
67b50e4
Add release notes for Bloop 1.4.13
tgodzik Feb 17, 2022
989cfa3
Merge pull request #1681 from tgodzik/notes-1.4.13
tgodzik Feb 17, 2022
b99d7cb
Update reference from Windows 2019 to 2022
tgodzik Feb 17, 2022
0c7bfcb
Merge pull request #1683 from tgodzik/fix-window-version
tgodzik Feb 17, 2022
bc4e5aa
build(deps): bump url-parse from 1.5.3 to 1.5.7 in /website
dependabot[bot] Feb 17, 2022
4f0035e
Another try to fix the visual studio path
tgodzik Feb 17, 2022
12bdc7f
Merge pull request #1685 from tgodzik/change-path
tgodzik Feb 17, 2022
c3139ca
Merge pull request #1684 from scalacenter/dependabot/npm_and_yarn/web…
tgodzik Feb 18, 2022
52fccb5
Switch to the original fork of zinc and remove pipelining.
tgodzik Feb 8, 2021
44067bd
Update Zinc to 1.6.0
tgodzik Dec 30, 2021
f69f1a3
Apply refactorings after review
tgodzik Feb 2, 2022
7f377e9
Merge pull request #1662 from tgodzik/update-newest-zinc
tgodzik Feb 21, 2022
65fb27a
Fix timeouts on Windows tests
Feb 21, 2022
db0eac2
Merge pull request #1686 from tgodzik/fix-windows-timeouts
tgodzik Feb 21, 2022
09cec9f
Rename references to master to main
tgodzik Feb 21, 2022
92d17ed
Merge pull request #1687 from tgodzik/switch-to-main
tgodzik Feb 21, 2022
00f8b98
Fix upload artifacts version
tgodzik Feb 22, 2022
6d14a53
Merge pull request #1690 from tgodzik/fix-release
tgodzik Feb 22, 2022
450ee91
Merge branch 'main' into chore/bump-sbt
Feb 22, 2022
b1b2250
chore: update sbt version in resources' projects
Feb 22, 2022
51f1cf7
execute `git rm --cached ./zinc`
Feb 22, 2022
2d53073
Rename terms according to the Scala language guide
tgodzik Feb 21, 2022
8b7b3ee
misc: benchmark-bridge and scala 2.12.15 attempt2
Feb 22, 2022
4b53ae0
Merge pull request #1688 from tgodzik/rename-guide
tgodzik Feb 22, 2022
4d64dce
misc: checkout to the specific commit
Feb 23, 2022
3371f29
fix: remove benchmark step from CI
Feb 23, 2022
15c71fe
Merge pull request #1692 from kpodsiad/fix/remove-benchmark-step
tgodzik Feb 23, 2022
b5187ac
Merge branch 'main' into chore/bump-sbt
Feb 23, 2022
184f785
Add proper output option for the forked Java compiler
tgodzik Feb 23, 2022
3cc4983
Merge pull request #1694 from tgodzik/fix-ouput-forked
tgodzik Feb 24, 2022
153e320
Merge remote-tracking branch 'upstream/main' into master
alexarchambault Feb 24, 2022
de572d3
Merge remote-tracking branch 'upstream/master' into master
alexarchambault Feb 24, 2022
aeca044
Merge commit '8e6243dcd'
alexarchambault Feb 24, 2022
3fe3b13
Merge branch 'main' into chore/bump-sbt
Feb 25, 2022
341155a
chore: run scalfix with https://eed3si9n.com/syntactic-scalafix-rule-…
Feb 25, 2022
8e01381
bump: benchmark commit
Feb 25, 2022
bf12bf1
chore: migrate rest syntax manually
Feb 25, 2022
9f93e5e
scalafmt
Feb 25, 2022
f733fcc
build(deps): bump prismjs from 1.25.0 to 1.27.0 in /website
dependabot[bot] Feb 26, 2022
5ae9868
Merge pull request #1696 from scalacenter/dependabot/npm_and_yarn/web…
tgodzik Feb 26, 2022
6cf5666
build(deps): bump url-parse from 1.5.7 to 1.5.10 in /website
dependabot[bot] Feb 26, 2022
3cdfa19
Merge pull request #1697 from scalacenter/dependabot/npm_and_yarn/web…
tgodzik Feb 26, 2022
a31acba
fix: wrong gradle212 scala version
Mar 1, 2022
190d7e9
misc: remove old todo [skip ci]
Mar 1, 2022
b071679
Merge pull request #1679 from kpodsiad/chore/bump-sbt
tgodzik Mar 1, 2022
d7f3654
build(deps): bump actions/setup-node from 2.5.1 to 3
dependabot[bot] Mar 1, 2022
af59e70
Merge pull request #1698 from scalacenter/dependabot/github_actions/a…
tgodzik Mar 2, 2022
1b6633a
chore: adjust scala test suites to sbt's implementation. (#1699)
kpodsiad Mar 11, 2022
2580f21
feat: add framework field to the scala-test-classes bsp's endpoint (#…
kpodsiad Mar 14, 2022
123628b
Fix copying tasty files on incremental compilation
tgodzik Mar 14, 2022
7848b60
Merge pull request #1701 from tgodzik/fix-copy-testy
tgodzik Mar 15, 2022
f1fa1df
Fixing typo in README.md
jyoo980 Mar 15, 2022
46c0334
Merge pull request #1702 from jyoo980/patch-1
keynmol Mar 15, 2022
a9b3ea5
fix: update BloopBspServices.scala (#1703)
kpodsiad Mar 16, 2022
54ab563
Merge remote-tracking branch 'upstream/master' into master
alexarchambault Feb 24, 2022
f6120c3
Merge remote-tracking branch 'upstream/main' into master
alexarchambault Mar 17, 2022
434a426
Merge remote-tracking branch 'upstream/main' into master
alexarchambault Mar 17, 2022
303839b
Merge remote-tracking branch 'upstream/main' into master
alexarchambault Mar 17, 2022
d792885
Merge remote-tracking branch 'upstream/main' into master
alexarchambault Mar 17, 2022
6128073
Merge remote-tracking branch 'upstream/main' into master
alexarchambault Mar 17, 2022
40b1ebc
Merge remote-tracking branch 'upstream/main' into master
alexarchambault Mar 17, 2022
b2d86aa
Merge remote-tracking branch 'upstream/main' into master
alexarchambault Mar 17, 2022
21fbbf6
Merge commit '3cdfa19f4'
alexarchambault Mar 17, 2022
da8ed96
Merge commit 'b07167988'
alexarchambault Mar 17, 2022
c4259fd
Merge commit '2580f21cf'
alexarchambault Mar 17, 2022
c125136
Merge remote-tracking branch 'upstream/main'
alexarchambault Mar 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- v1.*
- v2.*
branches:
- master
- main
pull_request:

jobs:
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
./bin/sbt-ci.sh bloopgun/graalvm-native-image:packageBin
- name: Run launcher tests
run: |
./bin/sbt-ci.sh "launcher/test"
./bin/sbt-ci.sh "launcherTest/test"
shell: bash

publish-binaries:
Expand Down Expand Up @@ -134,9 +134,9 @@ jobs:
gu install native-image
./bin/sbt-ci.sh "bloopgun/graalvm-native-image:packageBin"
mkdir bloop-artifacts
cp bloopgun/target/graalvm-native-image/bloopgun bloop-artifacts/$ARTIFACT_NAME
cp bloopgun/target/bloopgun-2.12/graalvm-native-image/bloopgun bloop-artifacts/$ARTIFACT_NAME
shell: bash
- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v2
with:
name: bloop-artifacts
path: bloop-artifacts/${{ matrix.artifact }}
Expand Down Expand Up @@ -183,21 +183,21 @@ jobs:
# cmd.
# Keep the sbt version in sync with `sbt-ci-release.bat`.
run: |
sbt -sbt-version 1.3.3 version
sbt -sbt-version 1.6.2 version
shell: bash
- name: Publish GraalVM Native artifacts
run: >-
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" &&
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" &&
"%CD%"\bin\sbt-ci-release.bat
shell: cmd
- name: Prepare generated Windows GraalVM binary
run: |
echo $ARTIFACT_NAME
ls bloopgun/target/graalvm-native-image/bloopgun.exe
ls bloopgun/target/bloopgun-2.12/graalvm-native-image/bloopgun.exe
mkdir bloop-artifacts
cp bloopgun/target/graalvm-native-image/bloopgun.exe bloop-artifacts/$ARTIFACT_NAME
cp bloopgun/target/bloopgun-2.12/graalvm-native-image/bloopgun.exe bloop-artifacts/$ARTIFACT_NAME
shell: bash
- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v2
with:
name: bloop-artifacts
path: bloop-artifacts/${{ matrix.artifact }}
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

98 changes: 75 additions & 23 deletions backend/src/main/scala/bloop/BloopClassFileManager.scala
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
package bloop

import bloop.io.{Paths => BloopPaths}
import bloop.io.AbsolutePath
import bloop.tracing.BraveTracer
import bloop.io.ParallelOps
import bloop.io.ParallelOps.CopyMode
import bloop.io.{Paths => BloopPaths}
import bloop.reporter.Reporter
import bloop.tracing.BraveTracer
import monix.eval.Task
import xsbti.compile.ClassFileManager
import xsbti.compile.PreviousResult

import java.io.File
import java.io.IOException
import java.nio.file.CopyOption
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.Paths

import java.nio.file.StandardCopyOption
import scala.collection.mutable

import xsbti.compile.ClassFileManager
import monix.eval.Task
import bloop.reporter.Reporter
import xsbti.compile.PreviousResult
import java.nio.file.Files
import java.io.IOException
import scala.util.Try
import scala.util.Failure
import scala.util.Success
import scala.util.Try

final class BloopClassFileManager(
backupDir0: Path,
inputs: CompileInputs,
outPaths: CompileOutPaths,
allGeneratedRelativeClassFilePaths: mutable.HashMap[String, File],
readOnlyCopyBlacklist: mutable.HashSet[Path],
readOnlyCopyDenylist: mutable.HashSet[Path],
allInvalidatedClassFilesForProject: mutable.HashSet[File],
allInvalidatedExtraCompileProducts: mutable.HashSet[File],
backgroundTasksWhenNewSuccessfulAnalysis: mutable.ListBuffer[CompileBackgroundTasks.Sig],
Expand All @@ -38,9 +39,16 @@ final class BloopClassFileManager(
private[this] val newClassesDirPath = newClassesDir.toString
private[this] val dependentClassFilesLinks = new mutable.HashSet[Path]()
private[this] val weakClassFileInvalidations = new mutable.HashSet[Path]()
private[this] val generatedFiles = new mutable.HashSet[File]

// Supported compile products by the class file manager
private[this] val supportedCompileProducts = List(".sjsir", ".nir", ".tasty")
// Files backed up during compilation
private[this] val movedFiles = new mutable.HashMap[File, File]

private val backupDir = backupDir0.normalize
backupDir.toFile.delete()
Files.createDirectories(backupDir)

/**
* Returns the set of all invalidated class files.
Expand Down Expand Up @@ -114,22 +122,21 @@ final class BloopClassFileManager(
inputs.dependentResults
) match {
case None => ()
case Some(foundClassFile) =>
case Some(foundClassFilePath) =>
weakClassFileInvalidations.+=(classFilePath)
val newLink = newClassesDir.resolve(relativeFilePath)
BloopClassFileManager.link(newLink, foundClassFile.toPath) match {
BloopClassFileManager.link(newLink, foundClassFilePath) match {
case Success(_) => dependentClassFilesLinks.+=(newLink)
case Failure(exception) =>
inputs.logger.error(
s"Failed to create link for invalidated file $foundClassFile: ${exception.getMessage()}"
s"Failed to create link for invalidated file $foundClassFilePath: ${exception.getMessage()}"
)
inputs.logger.trace(exception)
}
()
}
}
}

allInvalidatedClassFilesForProject.++=(classes)

val invalidatedExtraCompileProducts = classes.flatMap { classFile =>
Expand All @@ -142,12 +149,28 @@ final class BloopClassFileManager(
}
}

// Idea taken from the default TransactionalClassFileManager in zinc
// https://github.com/sbt/zinc/blob/c18637c1b30f8ab7d1f702bb98301689ec75854b/internal/zinc-core/src/main/scala/sbt/internal/inc/ClassFileManager.scala#L183
val toBeBackedUp = (classes ++ invalidatedExtraCompileProducts).filter(c =>
!movedFiles.contains(c) && !generatedFiles(c)
)
for {
c <- toBeBackedUp
if c.exists()
} movedFiles.put(c, move(c)).foreach(move)

for {
f <- classes
if f.exists()
} f.delete()

allInvalidatedExtraCompileProducts.++=(invalidatedExtraCompileProducts)
}

def generated(generatedClassFiles: Array[File]): Unit = {
memoizedInvalidatedClassFiles = null
generatedClassFiles.foreach { generatedClassFile =>
generatedFiles += generatedClassFile
val newClassFile = generatedClassFile.getAbsolutePath
val relativeClassFilePath = newClassFile.replace(newClassesDirPath, "")
allGeneratedRelativeClassFilePaths.put(relativeClassFilePath, generatedClassFile)
Expand All @@ -157,16 +180,24 @@ final class BloopClassFileManager(
// invalidations can happen in both paths, no-op if missing
allInvalidatedClassFilesForProject.-=(generatedClassFile)
allInvalidatedClassFilesForProject.-=(rebasedClassFile)
supportedCompileProducts.foreach { supportedProductSuffix =>
val productName = rebasedClassFile

def productFile(classFile: File, supportedProductSuffix: String) = {
val productName = classFile
.getName()
.stripSuffix(".class") + supportedProductSuffix
val productAssociatedToClassFile =
new File(rebasedClassFile.getParentFile, productName)
if (productAssociatedToClassFile.exists())
allInvalidatedExtraCompileProducts.-=(productAssociatedToClassFile)
new File(classFile.getParentFile, productName)
}
supportedCompileProducts.foreach { supportedProductSuffix =>
val generatedProductName = productFile(generatedClassFile, supportedProductSuffix)
val rebasedProductName = productFile(rebasedClassFile, supportedProductSuffix)

if (generatedProductName.exists() || rebasedProductName.exists()) {
allInvalidatedExtraCompileProducts.-=(generatedProductName)
allInvalidatedExtraCompileProducts.-=(rebasedProductName)
}
}
}

}

def complete(success: Boolean): Unit = {
Expand All @@ -193,13 +224,28 @@ final class BloopClassFileManager(
enableCancellation = false
)
.map { walked =>
readOnlyCopyBlacklist.++=(walked.target)
readOnlyCopyDenylist.++=(walked.target)
()
}
}
}
)
} else {
/* Restore all files from backuped last successful compilation to make sure
* that they are still available.
*/
for {
(orig, tmp) <- movedFiles
if tmp.exists
} {
if (!orig.getParentFile.exists) {
Files.createDirectory(orig.getParentFile.toPath())
}
Files.move(tmp.toPath(), orig.toPath())
}
backupDir.toFile().delete()
()

// Delete all compilation products generated in the new classes directory
val deleteNewDir = Task { BloopPaths.delete(AbsolutePath(newClassesDir)); () }.memoize
backgroundTasksForFailedCompilation.+=(
Expand Down Expand Up @@ -245,6 +291,12 @@ final class BloopClassFileManager(
)
}
}

private def move(c: File): File = {
val target = Files.createTempFile(backupDir, "bloop", ".class").toFile
Files.move(c.toPath(), target.toPath(), StandardCopyOption.REPLACE_EXISTING)
target
}
}

object BloopClassFileManager {
Expand Down
62 changes: 36 additions & 26 deletions backend/src/main/scala/bloop/BloopClasspathEntryLookup.scala
Original file line number Diff line number Diff line change
@@ -1,45 +1,54 @@
package bloop

import java.io.File
import java.{util => ju}

import sbt.util.InterfaceUtil
import bloop.util.AnalysisUtils
import sbt.internal.inc.PlainVirtualFileConverter
import sbt.internal.inc.bloop.internal.BloopNameHashing
import sbt.internal.inc.bloop.internal.BloopStamps
import sbt.internal.inc.classpath.ClasspathUtil
import sbt.internal.inc.classpath.ClasspathUtilities

import xsbti.compile.PreviousResult
import xsbti.compile.PerClasspathEntryLookup
import sbt.util.InterfaceUtil
import xsbti.FileConverter
import xsbti.VirtualFile
import xsbti.compile.CompileAnalysis
import xsbti.compile.DefinesClass
import java.util.zip.ZipFile
import java.util.zip.ZipException
import java.util.concurrent.ConcurrentHashMap
import xsbti.compile.FileHash
import sbt.internal.inc.bloop.internal.BloopNameHashing
import sbt.internal.inc.bloop.internal.BloopStamps
import xsbti.compile.PerClasspathEntryLookup
import xsbti.compile.PreviousResult

import java.io.File
import java.nio.file.Path
import java.util.concurrent.ConcurrentHashMap
import java.util.zip.ZipException
import java.util.zip.ZipFile
import java.{util => ju}

final class BloopClasspathEntryLookup(
results: Map[File, PreviousResult],
classpathHashes: Vector[FileHash]
classpathHashes: Vector[FileHash],
converter: FileConverter
) extends PerClasspathEntryLookup {
override def analysis(classpathEntry: File): ju.Optional[CompileAnalysis] = {
InterfaceUtil.toOptional(results.get(classpathEntry)).flatMap(_.analysis())
override def analysis(classpathEntry: VirtualFile): ju.Optional[CompileAnalysis] = {
val file = converter.toPath(classpathEntry).toFile()
InterfaceUtil.toOptional(results.get(file)).flatMap(_.analysis())
}

override def definesClass(entry: File): DefinesClass = {
if (!entry.exists) FalseDefinesClass
override def definesClass(entry: VirtualFile): DefinesClass = {
val path = converter.toPath(entry)
val file = path.toFile()
if (!file.exists) FalseDefinesClass
else {
classpathHashes.find(fh => fh.file() == entry) match {
classpathHashes.find(fh => fh.file() == file) match {
case None => FalseDefinesClass
case Some(entryHash) =>
def computeDefinesClassForJar = {
if (!ClasspathUtilities.isArchive(entry, contentFallback = true)) FalseDefinesClass
else new JarDefinesClass(entry)
if (!ClasspathUtil.isArchive(path, contentFallback = true)) FalseDefinesClass
else new JarDefinesClass(file)
}

if (BloopStamps.isDirectoryHash(entryHash)) new DirectoryDefinesClass(entry)
if (BloopStamps.isDirectoryHash(entryHash)) new DirectoryDefinesClass(file)
else {
val (_, cachedDefinesClass) = BloopClasspathEntryLookup.definedClasses.compute(
entry,
file,
(entry, definesClass) => {
definesClass match {
case null =>
Expand Down Expand Up @@ -116,14 +125,15 @@ object BloopClasspathEntryLookup {
def definedClassFileInDependencies(
relativeClassFile: String,
results: Map[File, PreviousResult]
): Option[File] = {
def findClassFile(t: (File, PreviousResult)): Option[File] = {
): Option[Path] = {
def findClassFile(t: (File, PreviousResult)): Option[Path] = {
val (classesDir, result) = t
val targetClassFile = new File(classesDir, relativeClassFile)
val targetFile = classesDir.toPath().resolve(relativeClassFile)
val targetClassFile = PlainVirtualFileConverter.converter.toVirtualFile(targetFile)
InterfaceUtil.toOption(result.analysis()).flatMap { analysis0 =>
val analysis = analysis0.asInstanceOf[sbt.internal.inc.Analysis]
val definedClass = analysis.relations.allProducts.contains(targetClassFile)
if (definedClass) Some(targetClassFile) else None
if (definedClass) Some(targetFile) else None
}
}

Expand Down
27 changes: 0 additions & 27 deletions backend/src/main/scala/bloop/CompileMode.scala

This file was deleted.

3 changes: 1 addition & 2 deletions backend/src/main/scala/bloop/CompileProducts.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@ case class CompileProducts(
resultForDependentCompilationsInSameRun: PreviousResult,
resultForFutureCompilationRuns: PreviousResult,
invalidatedCompileProducts: Set[File],
generatedRelativeClassFilePaths: Map[String, File],
definedMacroSymbols: Array[String]
generatedRelativeClassFilePaths: Map[String, File]
)
Loading